CLASS Statistics
09 Continuous Random Variables
Continuous rv compared with Discrete rv
Discrete Variable Continuous Variable
Countable support Uncountable support
Probability mass function Probability density function
Probability assigned to Probability assigned to
single values intervals of values
Each possible value has Each possible value has
strictly positive probability zero probability
Comparison between CDF and PDF
Continuous Random Variables:
Probability distribution function (pdf):
P{X B} = f(x)dx
▪ Properties:
∞
1= P{X ϵ(-∞, ∞)} = ∫ f(x)dx
-∞
▪ All probability statements about X can be answered by f(x):
≤ b
P{a ≤ X ≤ b} = ∫ f(x)dx
a
a
P{X = a} = ∫ f(x)dx = 0
a
f(y)
P(a < x ≤ b)
F(t)
y
t a b
PDF
Cumulative distribution function (CDF):
x
F x (x) = P(X ≤ x) = ∫ f x (t)dt, - ∞ < x < ∞
-∞
▪ Properties:
d
F(a) = f(a)
da
▪ Acontinuous function
f(x)
P(a < x ≤ b)
x
t a b
f(t)
CDF
Valid PDF vs CDF
PDF CDF
1 1
x,0≤x≤2
3
(3x - 2), x = 0,1,2,3
f(x) = 4 p(x) = 10
0, otherwise 0, otherwise
∞ 3
1. f(x) ≥ 0 1. Σ p(x=k) = Σ p(x=k) = 1
k=0 k=0
∞ 2
1 -2
2. ∫ f(x)dx = ∫ x dx = 1
3
2. However, p(x=0) = <0
-∞ 0 4 10
Therfore, it is a valid PDF. Therfore, it is not a valid PMF.
Example to find out CDF
b
x - 3; 0 < x < 1 P(a < x < b) = F(b) - F(a) = ∫ f(x)d(x)
a
F(x) = 5 - x; 1< x < 3 2
= F(2) - F(1) = ∫ f(x)d(x)
0; x > 3
1
2
= ∫ f(x)d(x)
1
Find P(1 < x <2)
2
= ∫ f(5 - x)d(x)
1
x2
= (5x - 2
) 2
1
22 12 7
= (5 x 2 - 2
) - (5 x 1 - 2
)= 2
Uniform Distribution
P(x)
1
b-a
a c d b
a+b
Mean : μ =
2
(a + b) 2
S.D. : σ =
12
d-c
Probability : P(c ≤ X ≤ d) =
b-a
Uniform Distribution Expectation value
1
E(X) = ∫
b
x
dx f(x) = a≤x≤b
b-a
a b-a
0 otherwise
b
x 2
= 2(b - a) 1
a
= 2(b - a)
(b + a) (b - a)
1 (b - a )
=
2 2
2(b - a) a+b
E(x) =
2
Variance of Uniform Distribution
E(X ) = ∫
2
x 2
f(x) dx
a||x
2
x
∫ dx
b
E(x ) =
2
a b - a
b
x 3
= 3(b - a) a
1 (b - a )
=
3 3
3(b - a)
1 (a 2
= + ab + b 2)
3
Var(X) = E(X ) - E (X) 2 2
( (
2
2 2
a + ab + b a+b
Var(X) = -
3 2
2 2 2 2
a + ab + b (a + 2ab + b )
= -
3 4
2 2 2 2
4a + 4ab + 4b - 3a -6ab - 3b
=
12
2 2
a - 2ab + b
=
12
2
(a + b)
=
12
Normal Distribution or Gaussian Distribution
( (
2
1 x-μ Note Constants:
1 -
f(x) = .e 2 σ π = 3.14159
e = 2.71828
σ 2π
This is a bell shaped curve with different
centers and spreads depending on μ and σ
It's a probability function, so no matter what the values of μ and σ,
must integrate to 1!
( (
2
1 x-μ
+∞ 1 -
∫ .e 2 σ
dx = 1
-∞ σ 2π
More on Normal Distribution
μ = 0, σ2 = 0.2,
1.0 μ = 0, σ2 = 1.0,
μ = 0, σ2 = 5.0,
μ = -2, σ2 = 0.5,
0.8
Øμσ (x)
2
0.6
0.4
0.2
0.0
-5 -4 -3 -2 -1 0 1 2 3 4 5
f(x) Changing μ shifts the
distribution left or right.
Changing σ increases
σ or decreases the spread.
x
μ