Professional Documents
Culture Documents
Statistics: Probability Density and Cumulative Distribution
Statistics: Probability Density and Cumulative Distribution
x 2 1.9 4
0.8
pnorm ( x 2 1) 0.6
dnorm ( x 2 1) 0.4
0.2
0
1 0 1 2 3 4
x
The dnorm function generates the familiar bell curve, here shown with
mean = 2.
The pnorm function is the running area under the dnorm curve.
How big does x have to be before the area under the curve reaches
0.5? As expected, this is the mean, 2:
qnorm( 0.5 2 1) 2
25
x dnorm( x 2 1) dx 2
25
Plugging this back into pnorm shows that the two functions are
inverses of each other.
pnorm ( 2 2 1) 0.5
The 75th, 90th, and 95th percentiles of the normal (2,1)
distribution:
a qnorm ( 0.75 2 1) a 2.674
y 0 1
0.8
pnorm( x 2 1)
dnorm( x 2 1)
0.6
y
y 0.4
y
0.2
0
1 0 1 2 3 4
x x a b c
Distribution
Density
75%-tile
90%-tile
95%-tile