0% found this document useful (0 votes)
7 views

Notes

Uploaded by

neospirit29
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Notes

Uploaded by

neospirit29
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Random Variables

A random variable (RV) X is a function from sample space S to set of real


numbers.
It can be classified into two,(i) discrete RV, (ii) continuous RV

Discrete random variable:


The RV, X is said to be discrete if X has finite values or countably infinite
values

Probability distribution/ Probability Mass function/Probability


function (pmf)
Let 𝑋 = 𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 , … be a discrete RV. The function P is said to be pmf if
(i) 𝑃(𝑥 = 𝑥𝑖 ) = 𝑝𝑖 ≥ 0, 𝑖 = 1,2,3, …
(ii) ∑𝑖 𝑝𝑖 = 1
That is the pmf is
𝑥𝑖 𝑥1 𝑥2 𝑥3 𝑥4 𝑥5 𝑥6 …. 𝑥𝑛−1 𝑥𝑛
𝑝𝑖 𝑝1 𝑝2 𝑝3 𝑝4 𝑝5 𝑝6 …. 𝑝𝑛−1 𝑝𝑛

Cumulative distribution function (cdf)


Let 𝑋 = 𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 , … be a discrete RV. The cdf of X is defined as
𝐹(𝑥) = 𝑃(𝑋 ≤ 𝑥) = 𝑃(−∞ < 𝑋 ≤ 𝑥)

𝐹(𝑥) = ∑ 𝑃(𝑋 = 𝑥𝑖 )
𝑥𝑖 ≤𝑥

For example if, 𝑥 ≤ 𝑥5 , then

𝐹(𝑥) = ∑ 𝑃(𝑋 = 𝑥𝑖 ) = 𝑝1 + 𝑝2 + 𝑝3 + 𝑝4 + 𝑝5
𝑥𝑖 ≤𝑥

if, 𝑥 < 𝑥5 , then


𝐹(𝑥) = ∑ 𝑃(𝑋 = 𝑥𝑖 ) = 𝑝1 + 𝑝2 + 𝑝3 + 𝑝4
𝑥𝑖 ≤𝑥

Continuous random variable:


The RV, X is said to be continuous if X is defined on an
interval like: (a,b), (-∞,a), (a,∞) or (-∞,∞)

Probability distribution/ Probability density


function/Probability function (pdf)
Let 𝑋 be a continuous RV. The function f is said to be pdf if
(i) 𝑓(𝑥) ≥ 0,

(ii) ∫−∞ 𝑓(𝑥)𝑑𝑥 = 1

Cumulative distribution function (cdf)


Let 𝑋 be a continuous RV. The cdf of X is defined as
𝐹(𝑥) = 𝑃(𝑋 ≤ 𝑥) = 𝑃(−∞ < 𝑋 ≤ 𝑥)
𝑥
𝐹(𝑥) = 𝑃(−∞ < 𝑋 ≤ 𝑥) = ∫ 𝑓(𝑡)𝑑𝑡
−∞

Properties of cdf
1. F(x) is non decreasing function , that is 𝑥𝑖 < 𝑥𝑗 , 𝑡ℎ𝑒𝑛 𝐹(𝑥𝑖 ) ≤ 𝐹(𝑥𝑗 )
2. 𝐹(−∞) = 0; 𝐹(∞) = 1
3. If X is discrete RV, then 𝑃(𝑋 = 𝑥𝑖 ) = 𝐹(𝑥𝑖 ) − 𝐹(𝑥𝑖−1 )
4. If X is continuous RV then
𝑏 𝑎
𝑃(𝑎 < 𝑋 < 𝑏) = 𝐹(𝑏) − 𝐹(𝑎) = ∫ 𝑓(𝑡)𝑑𝑡 − ∫ 𝑓(𝑡)𝑑𝑡 ;
−∞ −∞

𝑃(𝑎 ≤ 𝑋 ≤ 𝑏) = 𝐹(𝑏) − 𝐹(𝑎),


𝑃(𝑎 ≤ 𝑋 < 𝑏) = 𝐹(𝑏) − 𝐹(𝑎);
𝑃(𝑎 < 𝑋 ≤ 𝑏) = 𝐹(𝑏) − 𝐹(𝑎)
5. If X is continuous the 𝑓(𝑥) = 𝑑𝐹
𝑑𝑥

Expected Values
Let X be a random variable (R.V). The expected value of X is defined as
⮚ If X is discrete RV then 𝐸(𝑋) = ∑𝑖 𝑥𝑖 𝑃(𝑋 = 𝑥𝑖 )

⮚ If X is discrete RV then 𝐸(𝑋) = ∫−∞ 𝑥𝑓(𝑥)𝑑𝑥
Properties
1. 𝐸(𝑎) = 𝑎
2. 𝐸(𝑎𝑋 + 𝑏) = 𝑎𝐸(𝑋) + 𝑏
2
3. 𝜎2 = 𝑉𝑎𝑟(𝑋) = 𝐸(𝑋 2 ) − (𝐸 (𝑋))
4. 𝑉𝑎𝑟(𝑎𝑋 + 𝑏) = 𝑎2 𝑉𝑎𝑟(𝑋)

Moments
A. The rth moment about origin is denoted as 𝜇′𝑟 = 𝐸(𝑋 𝑟 )
⮚ If X is discrete RV then 𝜇′𝑟 = 𝐸(𝑋 𝑟 ) = ∑𝑖 𝑥𝑖𝑟 𝑃(𝑋 = 𝑥𝑖 )

⮚ If X is continuous RV then 𝜇′𝑟 = 𝐸(𝑋 𝑟 ) = ∫−∞ 𝑥 𝑟 𝑓(𝑥)𝑑𝑥
B. The rth moment about mean is denoted as 𝜇𝑟 = 𝐸[(𝑋 − 𝑥̅ )𝑟 ]
⮚ If X is discrete RV then 𝜇𝑟 = 𝐸[(𝑋 − 𝑥̅ )𝑟 ] = ∑𝑖 (𝑥𝑖 − 𝑥̅ )𝑟 𝑃(𝑋 = 𝑥𝑖 )

⮚ If X is continuous RV then 𝜇𝑟 = 𝐸[(𝑋 − 𝑥̅ )𝑟 ] = ∫−∞(𝑥 − 𝑥̅ )𝑟 𝑓(𝑥)𝑑𝑥

𝜇1 = 𝐸(𝑋 − 𝑥̅ ) = 𝐸(𝑋) − 𝑥̅ = 𝑥̅ − 𝑥̅ = 0
2
𝜇2 = 𝐸[(𝑋 − 𝑥̅ )2 ] = 𝐸(𝑋 2 ) − 𝐸(𝑋)2 = 𝜇2′ − 𝜇1′
𝜇3 = 𝐸[(𝑋 − 𝑥̅ )3 ] = 𝐸(𝑋 3 ) − 3𝐸(𝑋 2 )𝑥̅ + 3𝐸(𝑋)𝑥̅ 2 − 𝑥̅ 3
3
= 𝜇3′ − 3𝜇2′ 𝜇1′ + 2𝜇1′
𝜇4 = 𝐸[(𝑋 − 𝑥̅ )4 ] = 𝐸(𝑋 4 ) − 4𝐸(𝑋 3 )𝑥̅ + 6𝐸(𝑋 2 )𝑥̅ 2 − 4𝑥̅ 3 𝐸(𝑋) + 𝑥̅ 4
2 4
= 𝜇4′ − 4𝜇3′ 𝜇1′ + 6𝜇1′ 𝜇2′ − 3𝜇1′

C. The rth moment about a point A is denoted as 𝑚𝑟 = 𝐸[(𝑋 − 𝐴)𝑟 ]


𝑚1 = 𝐸(𝑋 − 𝐴) = 𝑥̅ − 𝐴
𝑚2 = 𝐸[(𝑋 − 𝐴)2 ] = 𝐸(𝑋 2 ) − 2𝐴𝐸(𝑋) + 𝐴2
𝑚3 = 𝐸[(𝑋 − 𝐴)3 ] = 𝐸(𝑋 3 ) − 3𝐸(𝑋 2 )𝐴 + 3𝐸(𝑋)𝐴2 − 𝐴3
𝑚4 = 𝐸[(𝑋 − 𝐴)4 ] = 𝐸(𝑋 4 ) − 4𝐸(𝑋 3 )𝐴 + 6𝐸(𝑋 2 )𝐴2 − 4𝐴3 𝐸(𝑋) + 𝐴4
Moment generating function MGF
𝑡𝐸(𝑋) 𝑡 2 𝐸(𝑋 2 ) 𝑡 3 𝐸(𝑋 3 )
The MGF of discrete RV is 𝑀𝑋 (𝑡) = 𝐸(𝑒 𝑡𝑋 ) = 1 + + + +
1! 2! 3!
𝑡 4 𝐸(𝑋 4 )
+⋯
4!

𝑡𝜇1′ 𝑡 2 𝜇2′ 𝑡 3 𝜇3′ 𝑡 4 𝜇4′


=1+ + + + +⋯
1! 2! 3! 4!

𝑡 𝑟 𝜇𝑟′
=∑
𝑟!
𝑟=0

Properties :

𝑡𝑟
I. 𝜇′𝑟 𝑟
= 𝐸(𝑋 ) is the coefficient of
𝑟!
𝑑𝑟
II. 𝜇′𝑟 = 𝐸(𝑋 𝑟 ) = [ 𝑀𝑋 (𝑡)]
𝑑𝑡 𝑟 𝑡=0
III. If the MGF of X is 𝑀𝑋 (𝑡) and if 𝑌 = 𝑎𝑋 + 𝑏 then 𝑀𝑌 (𝑡) = 𝑒 𝑏𝑡 𝑀𝑋 (𝑎𝑡)

Problems:

1. Two fair coins are tossed simultaneously. The RV X is the number of heads
appear. The find the following: (i) pmf, (ii) mean and variance, (iii) mgf,
(iv) E(2X+3), (v) cdf
Solution:
The sample space S={TT,TH,HT,HH}
X= the number of heads appears= 0,1,2
Therefore (i) the probability mass function is

x 0 1 2

p 1/4 2/4 1/4

(ii) For mean and variance

x x2 p xp x2p

0 0 1/4 0 0
1 1 1/2 1/2 1/2

2 4 1/4 1/2 1

Summation 1 1 3/2

Therefore the mean 𝜇1′ = 𝑥̅ = ∑ 𝑥𝑝 = 1


2
The Variance 𝜎2 = 𝑉𝑎𝑟(𝑋) = 𝐸(𝑋 2 ) − (𝐸 (𝑋))
2 3 1
𝜎 2 = ∑ 𝑥 2 𝑝 − (∑ 𝑥𝑝) = − 1 =
2 2

(iii) The mgf 𝑀𝑋 (𝑡) = 𝐸(𝑒 𝑡𝑋 )


2
1 1 1
𝑀𝑋 (𝑡) = 𝐸(𝑒 𝑡𝑋 ) = ∑ 𝑒 𝑡𝑘 𝑃(𝑥 = 𝑘) = 𝑒 0∗𝑡 + 𝑒 1∗𝑡 + 𝑒 2∗𝑡
4 2 4
𝑘=0

1 1 1
= + 𝑒 𝑡 + 𝑒 2𝑡
4 2 4

(iv) E(2X+3)=2E(X)+3=2*1+3=5

(v) 𝐹(𝑥) = 0, 𝑥<0


1
= , 𝑥<1
4
1 2
= + , 𝑥<2
4 4
1 2 1
= + + ,𝑥 > 2
4 4 4
2. A rv X has the following probability function
𝑥
0 1 2 3 4 5 6 7
𝑝 0 𝑘 2𝑘 2𝑘 3𝑘 𝑘2 2𝑘 2 7𝑘 2 + 𝑘
Find the following: (i) The value of k (ii) 𝑃(𝑋 < 6); 𝑃(𝑋 ≥ 6), (iii) the
1
smallest value of 𝛼 for which 𝑃(𝑋 ≤ 𝛼) > (iv) 𝑃(1.5 < 𝑋 < 4.5/𝑋 > 2)
2
(v) The mean and variance
Solution:
(i) We know that ∑𝑖 𝑝𝑖 = 1
Therefore ∑𝑖 𝑝𝑖 = 𝑘 + 2𝑘 + 2𝑘 + 3𝑘 + 𝑘 2 + 2𝑘 2 + 7𝑘 2 + 𝑘 = 1
10𝑘 2 + 9𝑘 − 1 = 0 ⇒ 𝑘 = 1/10

(ii) 𝑃(𝑋 < 6) = 𝑃(𝑋 = 0) + 𝑃(𝑋 = 1) + 𝑃(𝑋 = 2) + 𝑃(𝑋 = 3) +


81
+𝑃(𝑋 = 4) + 𝑃(𝑋 = 5) = 𝑘 2 + 8𝑘 =
100
19
𝑃(𝑋 ≥ 6) = 𝑃(𝑋 = 6) + 𝑃(𝑋 = 7) = 9𝑘 2 + 𝑘 =
100
4.5 𝑃([1.5<𝑋<4.5]∩[𝑋>2]) 𝑃(𝑋=3)+𝑃(𝑋=4)
(iii) 𝑃 (1.5 < 𝑋 < > 2) = = =
𝑋 𝑃(𝑋>2) 𝑃(𝑋=3,4,5,6,7)

(iv) The mean 𝑥̅ = ∑𝑖 𝑥𝑖 𝑝𝑖 and the variance 𝜎 2 = 𝜇2′ − (𝜇1 )2


x X2 p xp X2p
0 0 0 0 0
1 1 1/10 1/10 10/100
2 4 2/10 4/10 80/100
3 9 2/10 6/10 180/100
4 16 3/10 12/10 480/100
5 25 1/100 5/100 25/100
6 36 2/100 12/100 72/100
7 49 17/100 119/100 833/100
Summation 366/100 1680/100
366 1680 366 2
𝑥̅ = ∑𝑖 𝑥𝑖 𝑝𝑖 = ; 𝜎2 = −( )
100 100 100

3. The first four moments about the origin are 2, 6, 22, 124 then find the first
four moments about the mean.
Solution
𝜇1′ = 2; 𝜇2′ = 6; 𝜇3′ = 22; 𝜇4′ = 124 then

𝜇1 = 0
𝜇2 = 𝜇2′ − (𝜇1′ )2 = 6 − 22 = 2
𝜇3 = 𝜇3′ − 3𝜇2′ 𝜇1′ + 2(𝜇1′ )3 = 22 − 3 × 6 × 2 + 2 × 23 = 2
2
𝜇4 = 𝜇4′ − 4𝜇3′ 𝜇1′ + 6𝜇2′ 𝜇1′ − 3(𝜇1′ )3
= 124 − 4 × 22 × 2 + 6 × 6 × 4 − 3 × 16 = 44
𝑘𝑒 −𝑥 , 𝑥 ≥ 0
4. The pdf of X is 𝑓(𝑥) = { . Then find the value of k, first 3
0, 𝑥 < 0
moments about origin and hence first 3 moments about mean.
Solution

∫ 𝑓(𝑥)𝑑𝑥 = 1
−∞

∞ ∞
= ∫ 𝑓(𝑥)𝑑𝑥 = ∫ 𝑘𝑒 −𝑥 𝑑𝑥 = − 𝑘[𝑒 −𝑥 ]∞
0 =𝑘 =1
−∞ 0


𝜇1′ = 𝐸(𝑋) = ∫ 𝑥𝑒 −𝑥 𝑑𝑥 = [𝑥(−𝑒 −𝑥 ) − 1(𝑒 −𝑥 )]∞
0 =1
0

𝜇2′ = 𝐸(𝑋 2)
= ∫ 𝑥 2 𝑒 −𝑥 𝑑𝑥 = [𝑥 2 (−𝑒 −𝑥 ) − (2𝑥)(𝑒 −𝑥 )+2(−𝑒 −𝑥 )]∞
0 =2
0

𝜇3′ = 𝐸(𝑋 3 ) = ∫ 𝑥 3 𝑒 −𝑥 𝑑𝑥 = [𝑥 3 (−𝑒 −𝑥 )
0
− (3𝑥 2 )(𝑒 −𝑥 )+6𝑥(−𝑒 −𝑥 ) − 6(𝑒 −𝑥 )]∞
0 =6
Hence
𝜇1 = 0
𝜇2 = 𝜇2′ − (𝜇1′ )2 = 2 − 12 = 1
𝜇3 = 𝜇3′ − 3𝜇2′ 𝜇1′ + 2(𝜇1′ )3 = 6 − 3 × 2 × 1 + 2 × 13 = 2
5. The pdf of X is 𝑓(𝑥) = 𝑘𝑒 −|𝑥| , −∞ < 𝑥 < ∞. Then find the value of k,
first 3 moments about origin and hence first 3 moments about mean.

You might also like