Professional Documents
Culture Documents
Learning Objectives
● Definition of a random variable
● Types- discrete and continuous
● Probability Distribution Function (PDF) OR Cumulative Distribution Function (CDF)
○ Examples
● Probability Density Function (pdf)
● Examples of famous random variables
● Expectation & Variance
● Joint distribution and density functions
● Central and non-central moments
● Independence, uncorrelatedness, orthogonality of random variables
● Central limit theorem
● Random vector: mean vector, covariance matrix
Reference Text.: Stark, Henry, and John William Woods. "Probability and random processes with applications to signal processing." (2002).
Machine Learning in Hindi
Random Variable
X: → R
If the coin is fair (unbiased or not biased to generate any specific outcome)
P[X=1]=P[H]=0.5; P[X=0]=P[T]= 0.5
Compute:
(a) P[X < 0] event is: {X < 0}
(b) P[X ≤ 0] event is: {X ≤ 0}
(c) P[X ≤ 0.4] event is: {X ≤ 0.4}
(d) P[X ≤ 1] event is: {X ≤ 1}
Or, an event is specified as {X ≤ x}
Machine Learning in Hindi
Random Variable
X: (, F, P) → (R, B, Px)
X is a random variable (r.v.) only if the inverse image under X of all Borel subsets in R
making up the Borel field B are valid events in .
Or, X-1(B) = EB = valid event in F
where B B
Machine Learning in Hindi
Let us Try!
A bus arrives at random in [0,T]. Let t be the time of arrival of bus. The bus is equally likely to
arrive at any time t between the interval [0,T]. The arrival time is uniformly distributed over [0, T].
(a) P[X(t) = 1] =
(b) P[X(t) = 0] =
(c) P[X(t) ≤ 2] =
Example 2: Define a continuous random variable X [0, T] as below:
Define X = time of arrival t
(a) P[X(t) ≤ 0] =
(b) P[X(t) ≤ T] =
(c) P[X(t) > T] =
Machine Learning in Hindi
Examples of CDF
A bus arrives at random in [0,T]. Let t be the time of arrival of bus. The bus is equally likely to
arrive at any time t between the interval [0,T]. The arrival time is uniformly distributed over [0, T].
Examples of CDF
A bus arrives at random in [0,T]. Let t be the time of arrival of bus. The bus is equally likely to
arrive at any time t between the interval [0,T]. The arrival time is uniformly distributed over [0, T].
2) Case 2:
FX(x) = P[X ≤ 1] = 1 because the train would have arrived
and hence, P[X ≤ ∞] = P[X ≤ 1] =…. = 1;
Machine Learning in Hindi
Examples of CDF
A bus arrives at random in [0,T]. Let t be the time of arrival of bus. The bus is equally likely to
arrive at any time t between the interval [0,T]. The arrival time is uniformly distributed over [0, T].
Example 2: Define a continuous random variable X as the time of arrival t. Compute and plot the
CDF of the above random variable.
Machine Learning in Hindi
Examples of CDF
A bus arrives at random in [0,T]. Let t be the time of arrival of bus. The bus is equally likely to
arrive at any time t between the interval [0,T]. The arrival time is uniformly distributed over [0, T].
Example 2: Define a continuous random variable X as the time of arrival t. Compute and plot the
CDF of the above random variable.
Solution:
1) For T ≤ t ≤ ∞
FX(t) = P[X ≤ t] = 1 because the train would have arrived upto time T and hence,
P[X ≤ ∞] = P[X ≤ T] =…. = 1;
2) For t ≤ 0
FX(t) = P[X ≤ t] = 0 because the train arrives only after time t 0
FX(- ∞) = 0
Machine Learning in Hindi
1. 𝑓𝑋 𝑥 ≥ 0
𝑥
2. 𝐹𝑋 𝑥 = −∞ 𝑓𝑋 𝜉 𝑑𝜉
∞
𝐹𝑋 ∞ = 1 ⟹ න 𝑓𝑋 𝜉 𝑑𝜉 = 1
−∞
Area under pdf = 1
𝑥2
3. P 𝑥1 < 𝑋 ≤ 𝑥2 = 𝑋𝑓 𝑥 𝜉 𝑑𝜉
1
Machine Learning in Hindi
• Variance (𝜎 2 ) :
𝜎 2 = 𝐸 𝑋 − 𝜇𝑋 2
∞
= න 𝑥 − 𝜇𝑋 2 𝑓𝑋 𝑥 𝑑𝑥
−∞
𝜎= 𝐸 𝑋 − 𝜇𝑋 2
Machine Learning in Hindi
∞ 𝑥2 𝑥2
1 1 𝑥1 = 2, 𝑥2 = 3, number of samples= 10 Lakh
න 𝑓𝑋 𝑥 𝑑𝑥 = න 𝑑𝑥 = න 𝑑𝑥
−∞ 𝑥1 𝑥2 − 𝑥1 𝑥2 − 𝑥1 𝑥1
1 𝑥 1
= [𝑥]𝑥12 = 𝑥 − 𝑥1 = 1
𝑥2 − 𝑥1 𝑥2 − 𝑥1 2
Machine Learning in Hindi
𝜇 1
o −∞ < 𝑥 ≤ 𝜇 ∶ −∞ 𝑓𝑋 𝑥 𝑑𝑥 =
2
∞ 1
o 𝜇 < 𝑥 ≤ ∞ ∶ = 𝑥𝑑 𝑥 𝑋𝑓 𝜇
2
∞
• Mean (𝜇): E [X] = 𝜇 = −∞ 𝑥𝑓𝑋 𝑥 𝑑𝑥
number of samples= 1,000
𝑑 𝑓𝑋 𝑥
• Mode: Mo[X] = =0
𝑑𝑥
𝑥𝑚 ∞
• Median (𝑥𝑚 ) ∶ −∞ 𝑓𝑋 𝑥 𝑑𝑥 = 𝑋𝑓 𝑥 𝑥 𝑑𝑥
𝑚
𝑋−𝜇
Let us define 𝑌 = ≡ 𝒩(0,1)
𝜎
1 𝑦2
−
𝑓𝑌 𝑦 = 𝑒 2
2𝜋
Machine Learning in Hindi
𝜇 = 0, 𝜎 2 = 1
Machine Learning in Hindi
where,
scale parameter, 𝜎 > 0
𝜋
• Mean = 𝜎
2
𝜋
• Variance = 𝜎 2 2 −
2
Machine Learning in Hindi
where,
scale parameter, 𝑐 > 0
Machine Learning in Hindi
where,
scale parameter, 𝜆 > 0
1
• Mean:
𝜆
1
• Variance:
𝜆2
Machine Learning in Hindi
𝑝, 𝑥=1
𝑓 𝑥 =ቊ
𝑞, 𝑥=0
where,
𝑝: probability of success
𝑞: probability of failure
• Mean = 𝑝
• Variance = 𝑝(1 − 𝑝)
Machine Learning in Hindi
𝑛
𝑓𝑋 𝑋 = 𝑘 = 𝐶𝑘 𝑝𝑘 𝑞 𝑛−𝑘
where,
p: probability of success
q: probability of failure
n: number of trials
𝑘: number of successes
• 𝑝+𝑞 = 1
• Mean = 𝑛𝑝
• Variance = 𝑛𝑝𝑞
Machine Learning in Hindi
𝑒 −𝑎 𝑎𝑘
𝑃𝑋 𝑋 = 𝑘 =
𝑘!
where,
𝑘 = 0,1, …
𝑎>0
• Mean = a
• Variance = a
Machine Learning in Hindi
i.e.,
𝐸 𝑋 − 𝜇𝑋 𝑌 − 𝜇𝑌
𝜌=
𝐸 𝑋 − 𝜇𝑋 2 𝐸[ 𝑋 − 𝜇𝑌 2 ]
Machine Learning in Hindi
Proof:
If A and B are two independent events, then
𝑃 𝐴𝐵 = 𝑃 𝐴 ∩ 𝐵 = 𝑃 𝐴 𝑃 𝐵
[S.I.R.V.]
𝐹𝑋𝑌 𝑥, 𝑦 = 𝐹𝑋 𝑥 𝐹𝑌 (𝑦)
𝑥,𝑦 𝑥 𝑦
ඵ 𝑓𝑋𝑌 𝜉, 𝜂 𝑑𝜉 𝑑𝜂 = න 𝑓𝑋 𝜉 𝑑𝜉 න 𝑓𝑌 𝜂 𝑑𝜂
−∞ −∞ −∞
𝑓𝑋𝑌 𝑥, 𝑦 = 𝑓𝑋 𝑥 𝑓𝑌 (𝑦)
= 𝑓𝑋 𝑥 𝑓𝑌 (𝑦)
Thus, X & Y are jointly Gaussian random variables but they are statistically independent (S.I.)
random variable.
I.I.D.: Independent and identically distributed random variable: Having identical density
function & being statistically independent.
Machine Learning in Hindi
Example
2
• Central moments: 𝐸[ 𝑥 − 𝜇 ], 𝐸 𝑥 − 𝜇 , … , 𝐸[ 𝑥 − 𝜇 𝑖 ]
where
∞
𝑖
𝐸 𝑥−𝜇 =න 𝑥 − 𝜇 𝑖 𝑓𝑋 𝑥 𝑑𝑥
−∞
Define
𝑋1 + 𝑋2 + ⋯ + 𝑋𝑛
𝑍𝑛 ≜
𝑠𝑛
𝐹𝐱 (𝐱) = ම 𝑓𝑿 𝐱 𝐝𝐱
−∞
(X1−1)2 … (X1−1)(Xn−n)
= ⋮ ⋱ ⋮
(Xn−n)(X1−1) … (Xn−n)2
Verify if K21=K12?
𝑓𝑿 𝑥1 , … , 𝑥𝑛 = ෑ 𝑓𝑋𝑖 (𝑥𝑖 )
𝑖=1
In general, the probability density function of a Gaussian random vector X is given by
1 1
𝑓𝑿 𝑥1 , … , 𝑥𝑛 = 1/2 𝑛 /2
𝑒𝑥𝑝 − 𝐱 − 𝑇𝐊 −𝟏 (𝐱 − )
det 𝐊 2𝜋 2
Some Theorems
Theorem: Let X be an n-dimensional normal random vector with a positive definite
covariance matrix K and a mean vector . Let A be an mxn matrix of rank m.
Then, Y=AX has an m-dimensional normal pdf with positive definite covariance matrix Q and
a mean vector given by
Q= AKAT
= A
Learning Objectives
● Definition of a random variable
● Types- discrete and continuous
● Probability Distribution Function (PDF) OR Cumulative Distribution Function (CDF)
○ Examples
● Probability Density Function (pdf)
● Examples of famous random variables
● Expectation & Variance
● Joint distribution and density functions
● Central and non-central moments
● Independence, uncorrelatedness, orthogonality of random variables
● Central limit theorem
● Random vector: mean vector, covariance matrix