Professional Documents
Culture Documents
Common Continuous Distributions: Statistics 104 Autumn 2004
Common Continuous Distributions: Statistics 104 Autumn 2004
Statistics 104
Autumn 2004
• Uniform
• Exponential
• Normal
• Gamma
• Cauchy
Continuous Distributions 1
Uniform Distributions
This distribution describes events that are equally likely in a range (a, b).
As mentioned before, it is what people often consider as a random number.
The PDF for the for the uniform distribution (U (a, b)) is
1
f (x) = ; a≤x≤b
b−a
The CDF is
0 x<a
x−a
F (x) = b−a a≤x≤b
1 x>b
Continuous Distributions 2
Uniform Densities U(−k,k) Densities
2.0
U(0,1) k=3
U(2,3) k=2
1.5
k=1
k=0.25
f(x)
f(x)
1.0
0.5
0.0
−4 −2 0 2 4 −4 −2 0 2 4
x x
f(x)
−4 −2 0 2 4 −4 −2 0 2 4
x x
Continuous Distributions 3
Exponential Distribution
The CDF is ½
1 − e−λx x ≥ 0
F (x) =
0 x<0
1 1 1
E[X] = ; Var(X) = 2
; SD(X) =
λ λ λ
Continuous Distributions 4
Exponential Densities Exponential CDFs
0.8
lambda=1
lambda=2
f(x)
f(x)
0.4
lambda=0.5
lambda=1
lambda=2
0.0
0 2 4 6 8 10 0 2 4 6 8 10
x x
Continuous Distributions 5
So the chance that what we are observing survives another t units of time
doesn’t depend on how long we have observed it so far.
This property limits where the exponential distribution can be used. For
example, we wouldn’t want to use it to model human lifetimes.
Another potential drawback is that the parameter λ describes the
distribution completely. Once you know this, you also know the standard
deviation, skewness, kurtosis, etc.
Continuous Distributions 6
The parameter λ can often be thought of as a rate or a speed parameter.
The exponential distribution can be parameterized in terms of the mean
time to the event, µ = λ1 . With this parameterization the PDF and CDF
are
½
e−x/µ 1 − e−x/µ x ≥ 0
f (x) = µ ; x≥0 F (x) =
0 x<0
Continuous Distributions 7
Normal Distributions
The PDF for the for the normal distribution (N (µ, σ 2)) is
1 −(x−µ)2 /2σ 2
f (x) = √ e
σ 2π
Continuous Distributions 8
The two parameters of the distribution are the mean (µ) and the variance
(σ 2). A special case is the standard normal density which has µ = 0
and σ 2 = 1 and its PDF is often denoted by φ(x). As we shall see, once
we understand the standard normal (N (0, 1)), we understand all normal
distributions.
The CDF for the normal distribution doesn’t have a nice form. The CDF
for the standard normal is often denoted by Φ(x) which is of the form
Z x
1 2
Φ(x) = √ e−u /2du
−∞ 2π
Continuous Distributions 9
N(mu,1) Densities N(0,sigma^2) Densities
0.4
0.8
0 sigma = 1
−1 sigma = 0.5
0.6
0.3
1 sigma = 2
f(x)
f(x)
0.4
0.2
0.2
0.1
0.0
0.0
−4 −2 0 2 4 −4 −2 0 2 4
x x
f(x)
−4 −2 0 2 4 −4 −2 0 2 4
x x
Continuous Distributions 10
The normal distribution is an example of a symmetric distribution, with the
point of symmetry being the mean µ. For a symmetric distribution with
mean 0
P [X ≤ −x] = P [X ≥ x]
−4 −2 −x 0 x 2 4
Continuous Distributions 11
Proof.
FY (y) = P [Y ≤ y]
= P [aX + b ≤ y]
· ¸
y−b
= P X≤
a
µ ¶
y−b
= FX
a
Therefore
µ ¶
d y−b
fY (y) = FX
dy a
µ ¶
1 y−b
= fX
|a| a
Note that to this point, we haven’t made any assumptions about the
distribution of X. Any linear transformation of a RV gives this relationship.
Continuous Distributions 12
Now if X ∼ N (µ, σ 2), then
½ µ ¶¾
1 1 y − b − aµ
fY (y) = √ exp −
|a|σ 2π 2 aσ
and µ ¶
x−µ
F (x) = Φ
σ
One consequence of this, is that to get probabilities involving normal
distributions we only need a single function, or table.
Continuous Distributions 13
If X ∼ N (µ, σ 2), then
X −µ
Z= ∼ N (0, 1)
σ
The values Z are sometimes
referred to as the standard scores.
Suppose for example that blood X ~ N(mu,sigma^2) x = mu + z sigma
pressure (X) can be modelled Z ~ N(0,1) z
(approximately) by a normal
−4 −2 0 2 4
distribution with µ = 120 and
σ = 20.
If we are interested in the
P [X ≤ 140], this is the same as the P [Z ≤ 1] since
140 − 120
z= =1
20
Continuous Distributions 14
Note that this table
is actually taken from
Moore and McCabe’s
Introduction to the
Practice of Statistics.
However it is the same
a Table 2 in Rice.
z is the standard
normal variable. The
value of P for −z
equals 1 minus the
value of P for +z; for
example P for −1.62
equals 1 − 0.9474 =
0.0526.
Continuous Distributions 15
We can use the table to get the
Blood Pressure Density
following probabilities
0.020
• P [X ≤ 140]
0.010
f(x)
P [X ≤ 140] = P [Z ≤ 1] = 0.8413
0.000
60 80 95100 120 140 160 180
Blood Pressure
• P [X ≥ 95]
· ¸
95 − 120
P [X ≥ 95] = P Z ≥
20
= P [Z ≥ −1.25]
= 1 − P [Z ≤ −1.25]
Continuous Distributions 16
Using the fact that P [Z ≤ −1.25] = 1 − P [Z ≤ 1.25] (table flip),
P [Z ≤ −1.25] = 1 − 0.8944 = 0.1056. Therefore
• P [95 ≤ X ≤ 140]
Blood Pressure Density
0.020
0.010
f(x)
0.000
60 80 95100 120 140 160 180
Blood Pressure
P [95 ≤ X ≤ 140] = P [X ≤ 140] − P [X ≤ 95]
= P [Z ≤ 1] − P [Z ≤ −1.25]
= 0.8413 − 0.1056 = 0.7357
Continuous Distributions 17
Gamma Distributions
The PDF for the for the gamma distribution (G(α, λ)) is
λα α−1 −λx
f (x) = x e ; x≥0
Γ(α)
1
The parameter α is the shape parameter of the gamma distribution and λ
is the scale parameter.
Continuous Distributions 18
G(alpha,1) Densities G(2,lamdba) Densities
1.2
1.2
alpha=1 alpha=1
alpha=0.75 alpha=0.75
alpha=2 alpha=2
0.8
0.8
alpha=4 alpha=4
f(x)
f(x)
0.4
0.4
0.0
0.0
0 2 4 6 8 0 2 4 6 8
x x
f(x)
alpha=1 alpha=1
alpha=0.75 alpha=0.75
alpha=2 alpha=2
alpha=4 alpha=4
0 2 4 6 8 0 2 4 6 8
x x
Continuous Distributions 19
The “normalization constant”
Z ∞
Γ(α) = xα−1e−xdx
0
The CDF of the gamma doesn’t have a nice closed form so you need tables
or a computer to find probabilities involving the gamma.
Continuous Distributions 20
The first two moments of the gamma are
√
α α α
E[X] = ; Var(X) = 2
; SD(X) =
λ λ λ
Z ∞ α−1 −x
n nx e
E[X ] = x dx
0 Γ(α)
Z ∞
xα+n−1e−x
= dx
0 Γ(α)
Γ(α + n)
=
Γ(α)
So
Γ(α + 1) αΓ(α)
E[X] = = =α
Γ(α) Γ(α)
Continuous Distributions 21
and
Γ(α + 2) (α + 1)αΓ(α)
E[X] = = = (α + 1)α
Γ(α) Γ(α)
X
Let Y = λ. Then Y ∼ G(α, λ) as
λ(λy)α−1e−λy
fY (y) =
Γ(α)
Thus
E[X] α Var(X) α
E[Y ] = = ; Var(Y ) = = 2;
λ λ λ2 λ
2
Continuous Distributions 22
Beta Distributions
Beta distributions are useful for data that occur in fixed, finite intervals
The PDF for the for the beta distribution (Beta(α, β)) is
xa−1(1 − x)b−1
f (x) = ; 0≤x≤1
β(a, b)
Z 1
β(a, b) = xa−1(1 − x)b−1dx
0
Γ(a)Γ(b)
=
Γ(a + b)
Continuous Distributions 23
Beta(a,a) Densities Beta(a,6)Densities
6
2.5 0.8 1
1 2
5
2.0
2 3
4 4
4
6 8
1.5
f(x)
f(x)
3
1.0
2
0.5
1
0.0
0
0.0 0.2 0.4 0.6 0.8 1.0 0.0 0.2 0.4 0.6 0.8 1.0
x x
Like many continuous distributions, the CDF for the beta does not have a
nice form and must be determined through tables or software.
Continuous Distributions 24
The first two moments of the uniform are
a ab
E[X] = ; Var(X) =
a+b (a + b + 1)(a + b)2
Proof.
Z 1
1
E[X n] = xnxa−1(1 − x)b−1
β(a, b) 0
β(a + n, b)
=
β(a, b)
So
β(a + 1, b) Γ(a + 1)Γ(b) Γ(a + b) a
E[X] = = =
β(a, b) Γ(a + b + 1) Γ(a)Γ(b) a + b
and
2 β(a + 1, b) (a + 1)a
E[X ] = =
β(a, b) (a + b + 1)(a + b)
Continuous Distributions 25
which implies
µ ¶
a a+1 a a b
Var(X) = − =
a+b a+b+1 a+b a + b (a + b + 1)(a + b)
Continuous Distributions 26
Cauchy Distributions
The PDF for the for the Cauchy distribution (C(µ, σ)) is
1
f (x) = ¡ x−µ 2
¢
πσ 1 + ( σ )
The CDF is
µ ¶
1 1 x−µ
F (x) = + Arctan
2 π σ
Continuous Distributions 27
C(mu,1) Densities C(0,sigma) Densities
f(x)
0.15
0.05
−4 −2 0 2 4 −4 −2 0 2 4
x x
Continuous Distributions 28
The Cauchy distribution is known as a heavy tailed distribution. Its tails
decay to 0 very slowly.
Normal vs Cauchy
0.4
N(0,1)
C(0,1)
0.3
f(x)
0.2
0.1
0.0
−4 −2 0 2 4
Continuous Distributions 29