Week 4
Week 4
Andrew Thangaraj
IIT Madras
Introduction
Example 2
I Binomial(n, p)
F n grows very large
F p is a constant
F can happen in Bernoulli trials
Example 2
I Binomial(n, p)
F n grows very large
F p is a constant
F can happen in Bernoulli trials
Calculations with the PMF is not very easy even in this case
Working with intervals and histograms can be much simpler
FX (x ) = P(X ≤ x ).
FX (x ) = P(X ≤ x ).
Properties
FX (b) − FX (a) = P(a < X ≤ b)
FX : non-decreasing function taking non-negative values
As x → −∞, FX goes to 0.
As x → ∞, FX goes to 1.
1−p p
X ∼ { 0 , 1}
0
x <0
FX (x ) = 1−p 0≤x <1
1≤x
1
0
x <1
1/6 1≤x <2
2/6
2≤x <3
FX (x ) = 3/6 3 ≤ x < 4
4/6 4 ≤ x < 5
5/6 5 ≤ x < 6
6≤x
1
X ∼ Uniform{1, 2, . . . , 100}
0
x ≤0
FX (x ) = k/100 k ≤ x < k + 1, k = 1, 2, . . . , 99
x ≥ 100
1
X ∼ Uniform{1, 2, . . . , 100}
0
x ≤0
FX (x ) = k/100 k ≤ x < k + 1, k = 1, 2, . . . , 99
x ≥ 100
1
Definition (CDF)
A function F : R → [0, 1] is said to be a Cumulative Distribution Function
(CDF) if
1 F is a non-decreasing function taking values between 0 and 1.
2 As x → −∞, F goes to 0.
x
3 As x → ∞, F goes to 1.
x
4 Technical: F is continuous from the right.
Definition (CDF)
A function F : R → [0, 1] is said to be a Cumulative Distribution Function
(CDF) if
1 F is a non-decreasing function taking values between 0 and 1.
2 As x → −∞, F goes to 0.
x
3 As x → ∞, F goes to 1.
x
4 Technical: F is continuous from the right.
X ∼ Uniform{1, 2, . . . , 100}
0
x ≤0
0
x ≤0
k/100 k ≤x <k +1
FX (x ) = F (x ) = x /100 0 ≤ x ≤ 100
k = 1, . . . , 99
x ≥ 100
1
1 x ≥ 100
X ∼ Uniform{1, 2, . . . , 100}
0
x ≤0
0
x ≤0
k/100 k ≤x <k +1
FX (x ) = F (x ) = x /100 0 ≤ x ≤ 100
k = 1, . . . , 99
x ≥ 100
1
1 x ≥ 100
X ∼ Uniform{1, 2, . . . , 100}
0
x ≤0
0
x ≤0
k/100 k ≤x <k +1
FX (x ) = F (x ) = x /100 0 ≤ x ≤ 100
k = 1, . . . , 99
x ≥ 100
1
1 x ≥ 100
X ∼ Binomial(100, 0.6)
k 1
!
X 100 F (x ) =
FX (k) = (0.6)j (0.4)n−j
−1.65451(x −60)
j=0
j 1 + exp √
24
X ∼ Binomial(100, 0.6)
k 1
!
X 100 F (x ) =
FX (k) = (0.6)j (0.4)n−j
−1.65451(x −60)
j=0
j 1 + exp √
24
X ∼ Binomial(100, 0.6)
k 1
!
X 100 F (x ) =
FX (k) = (0.6)j (0.4)n−j
−1.65451(x −60)
j=0
j 1 + exp √
24
Properties
P(a < X ≤ b) = F (b) − F (a)
Properties
P(a < X ≤ b) = F (b) − F (a)
If F (x ) rises from F1 to F2 at x1 , P(X = x1 ) = F2 − F1
Properties
P(a < X ≤ b) = F (b) − F (a)
If F (x ) rises from F1 to F2 at x1 , P(X = x1 ) = F2 − F1
If F (x ) is continuous at x0 , P(X = x0 ) = 0 (non-intuitive!)
0 x <0
F (x ) = 0.5 + 0.1x 0≤x ≤5
1 x >5
0 x <0
F (x ) = 0.5 + 0.1x 0≤x ≤5
1 x >5
P(X = 0) = 0.5
0 x <0
F (x ) = 0.5 + 0.1x 0≤x ≤5
1 x >5
P(X = 0) = 0.5
P(1.99 < X ≤ 2.01) = F (2.01) − F (1.99) = 0.002
0 x <0
F (x ) = 0.5 + 0.1x 0≤x ≤5
1 x >5
P(X = 0) = 0.5
P(1.99 < X ≤ 2.01) = F (2.01) − F (1.99) = 0.002
I Value with finite precision taken with positive probability
0 x <0
F (x ) = 0.5 + 0.1x 0≤x ≤5
1 x >5
P(X = 0) = 0.5
P(1.99 < X ≤ 2.01) = F (2.01) − F (1.99) = 0.002
I Value with finite precision taken with positive probability
P(1.9999999 < X ≤ 2.0000001) = 0.00000002
0 x <0
F (x ) = 0.5 + 0.1x 0≤x ≤5
1 x >5
P(X = 0) = 0.5
P(1.99 < X ≤ 2.01) = F (2.01) − F (1.99) = 0.002
I Value with finite precision taken with positive probability
P(1.9999999 < X ≤ 2.0000001) = 0.00000002
I As precision increases, probability decreases
0 x <0
F (x ) = 0.5 + 0.1x 0≤x ≤5
1 x >5
P(X = 0) = 0.5
P(1.99 < X ≤ 2.01) = F (2.01) − F (1.99) = 0.002
I Value with finite precision taken with positive probability
P(1.9999999 < X ≤ 2.0000001) = 0.00000002
I As precision increases, probability decreases
P(X = 2.00000 · · · ) = 0
0 x <0
F (x ) = 0.5 + 0.1x 0≤x ≤5
1 x >5
P(X = 0) = 0.5
P(1.99 < X ≤ 2.01) = F (2.01) − F (1.99) = 0.002
I Value with finite precision taken with positive probability
P(1.9999999 < X ≤ 2.0000001) = 0.00000002
I As precision increases, probability decreases
P(X = 2.00000 · · · ) = 0
I Values with infinte precision cannot be taken, when F (x ) is continuous
at that point
Andrew Thangaraj (IIT Madras) Continuous random variables 20 / 64
Continuous random variable
Definition (Continuous random variable)
A random variable X with CDF FX (x ) is said to be a continuous random
variable if FX (x ) is continuous at every x .
Find P(X < −3), P(−3 < X < −1), P(−1 < X < 1), P(X ≤ −3),
P(0 ≤ X < 3). Is there an x0 for which P(X = x0 ) > 0? Is X a continuous
random variable?
Find P(X < −3), P(−3 < X < −1), P(−1 < X < 1), P(X ≤ −3),
P(0 ≤ X < 3). Is there an x0 for which P(X = x0 ) > 0? Is X a continuous
random variable?
Why PDF?
I Value of PDF around fX (x0 ) is related to X taking a value around x0
F Higher the PDF, higher the chance that X lies there
F Contrast with value of CDF at x0 , FX (x0 )
F PDF is much easier in probability computations
3 f (x ) is piecewise continuous
3 f (x ) is piecewise continuous
Find P(X ∈ [0.1, 0.3]), P(X ∈ (0.1, 0.03]), P(X ∈ [0.1, 0.03)),
P(X ∈ (0.1, 0.03)).
X ∼ Uniform[a, b]
PDF
(
1
b−a a<x <b
fX (x ) =
0 otherwise
CDF
0
x ≤a
FX (x ) = x −a
a<x <b
b−a
x ≥b
1
X ∼ Exp(λ)
PDF
(
λ exp(−λx ) x >0
fX (x ) =
0 otherwise
CDF
(
0 x ≤0
FX (x ) =
1 − exp(−λx ) x >0
X ∼ Normal(µ, σ 2 )
PDF
!
1 (x − µ)2
fX (x ) = √ exp −
σ 2π 2σ 2
CDF
Z x
FX (x ) = fX (u)du
−∞