Random Variables
Random Variables
Study Material for Week 5
Lecture Three
Let X be a discrete random variable taking values x1 , x2 ,, xn with probability mass
function
X xi x1 x2 x3 xn
p( X xi ) p1 p2 p3 pn
1. Mathematical Expectation / Theoretical Mean (analogous to Centre of Gravity)
Theoretical mean or expectation of X denoted as E ( X ) or is defined as
n
E ( X ) xi pi .
i 1
Expectation value of X provides a central point of the distribution.
Note: Expected value of a random variable may not be actually taken by the variable.
2. Variance
Variance of X denoted as Var ( X ) .
n
Var ( X ) xi E ( X ) pi . This can be simplified as
2
i 1
n
Var ( X ) E ( X 2 ) E ( X ) , where E ( X 2 ) xi 2 pi
2
i 1
3. Standard Deviation sd Var ( X )
Results : Let X and Y be two random variables. Let a and b be any non zero constants.
i) E (a) a
ii) E (aX b) aE ( X ) b
iii) E ( X Y ) E ( X ) E (Y )
iv) Var (aX b) a Var ( X )
2
v) sd (aX b) a sd ( X )
Example
1. A box contains 8 items of which 2 are defective. A person draws 3 items from
the box. Determine the expected number of defective items he has drawn.
n
Sol . Let X be the number of defective items drawn by a person. The pmf of X is
Random Variables
0 1 2
The expected number of defects .
1
2. A random variable has mean 2 and standard deviation . Find
2
i) E (2 X 1)
ii) Var ( X 2)
3X 1
iii) sd
4
1 1
Soln. Given E ( X ) 2 and sd ( X ) Va r( X )
2 4
i) E (2 X 1) 2 E ( X ) 1 2*2 1 3 .
1
ii) Var ( X 2) Var ( X ) .
4
3X 1 3 3 1 3
iii) sd sd ( X ) * .
4 4 4 2 8
3. A sample space of size 3 is selected at random from a box containing 12 items of
which 3 are defective. Let X denote the number of defective items in the sample.
Write the probability mass function and distribution function of X. Find the expected
number of defective items.
Soln. X be the number of defective items in the sample.
0 1 2 3
84/220 108/220 27/220 1/220
84/220 192/220 219/220 220/220=1
The expected number of defective items in a sample is
4. A player tosses two fair coins. The player wins $2 if two heads occur, and $1 if one
head occur. On the other hand, the player losses $3 if no heads occur. Find the
expected gain of the player. Is the game fair?
Soln. The sample space is HH , HT , TH , TT . Since coins are fair,
Random Variables
1
p HH p HT p TH p TT .
4
Let X be the player’s gain. Then X takes values 3, 1 and 2 with
1 2 1
p 3 , p 1 and p 2 .
4 4 4
1 2 1 1
Expected gain E X 3 1 2 0.25 .
4 4 4 4
Thus the expected gain of the player is $ 0.25 . Further E X 0 , the game is
Favourable to the player.
Problem Session
Q. 1. Attempt the following
1) A men’s soccer team plays soccer zero, one, or two days a week. The
probability that they play zero days is 0.2, the probability that they play one
day is 0.5, and the probability that they play two days is 0.3.
Find the expected value, μ, of the number of days per week the men’s soccer
team plays soccer.
2) 2
The probability that a newborn baby does not cry after midnight is
50
11
The probability that a newborn baby cries once after midnight is .
50
23
The probability that a newborn baby cries twice after midnight is .
50
9
The probability that a newborn baby cries thrice after midnight is .
50
45
The probability that a newborn baby cries for 4 times after midnight is
50
1
The probability that a newborn baby cries for 5 times after midnight is
50
Find the expected value of the number of times a newborn baby’s crying
wakes its mother after midnight.
(The expected value is the expected number of times per week a newborn
baby’s crying wakes its mother after midnight. ) . Also calculate the standard
deviation of the variable as well.
3) Suppose you play a game of chance in which five numbers are chosen from 0,
1, 2, 3, 4, 5, 6, 7, 8, 9. A computer randomly selects five numbers from zero to
nine with replacement. You pay $2 to play and could profit $100,000 if you
match all five numbers in order (you get your $2 back plus $100,000). Over
the long term, what is your expected profit of playing the game?