You are on page 1of 24

Probability and Statistics Unit 3

Unit 3 Mathematical Expectation


Structure:
3.1 Introduction
Objectives
3.2 Mathematical Expectation
Mathematical expectation of one dimensional random variable
Mathematical expectation of two dimensional random variable
3.3 Properties of Expectation (Mean) of single variable
Variance
3.4 Covariance
3.5 Conditional Expectation and Conditional Variance
3.6 Summary
3.7 Terminal Questions
3.8 Answers

3.1 Introduction
In the last unit we studied about Random variables of single and double
variables. In this unit based on these types of random variables we will
study their expected values. Expectation is used almost in every sphere of
life. For example, in a year what is the expectation of getting good rain, a
gambler might be interested in his average winnings at a game, for a
business person he will be interested in his average profits on a product, all
these answers can be well given with the help of expectation. Mathematical
expectation is the average value of a random phenomenon.
Objectives:
At the end of the unit the student should be able to :
explain the concept of expectation of random variables
explain variance and covariance of functions of one and two dimensional
random variables.

3.2 Expectaion
3.2.1 Mathematical expectation of one dimensional random variable
Let X be a discrete random variable and be probability mass function
(p.m.f.). Then the mathematical expectation or expectation of is defined
as
(3.1)
Sikkim Manipal University Page No.: 49
Probability and Statistics Unit 3

If X is a continuous random variable and be a probability density


function (p.d.f), then the expectation is defined as
(3.2)

provided that the integral and summation of (3.1) and (3.2) converges
absolutely. It is also known as mean of random variable X.

Example: Suppose a dice is tossed and let the random variable X denotes
the numbers on the dice i.e., X = 1,2,3,4,5,6. The p.m.f of X is

Then,

Example: Let a random variable X has p.m.f as


where R = (-1,0,1)

Then,

Example: Let X be a random variable with the following probability


distribution function

X f(x)
2 1/6
3 1/2
4 1/3

Find (a) E(X) (b) E(X2) (c) E( 2X+1)2

Solution: (a) E(X) =

(b) E(X2) =

(c) E( 2X+1)2 =

Sikkim Manipal University Page No.: 50


Probability and Statistics Unit 3

Example: Find the expected values of the sum of numbers of points when
two unbiased dices are thrown simultaneously.

Solution: The probability function of X for sum of numbers obtained on two


dices is
x 2 3 4 5 6 7 8 9 10 11 12
f(x) 1/36 2/36 3/36 4/36 5/36 6/36 5/36 4/36 3/36 2/36 1/36

E(X) =

3 2 1
10. 11. 12.
36 36 36
=

Example: An urn contains 7 white and three red balls. Two balls are drawn
together, at random from this urn. Compute the probability that (a) neither of
them is white (b) one white one red. Hence compute the expected number
of white balls drawn.

Solution: let x denotes the number of white balls drawn. Then the
probability of X is
X : 0 1 2

f(x) :

Hence, expected number of white balls drawn is:


E(X) =

Example: From a bag containing 2 rupee-coins and 3 twenty paise coins, a


person is asked to draw two coins at random. Find the value of his
expectation.

Sikkim Manipal University Page No.: 51


Probability and Statistics Unit 3

Solution:
There are three following possibilities of drawing two coins at random.
2
C2 1
(1) both of these coins be rupee-coins, its probability = =
5C 2 10

(2) both of these coins be twenty-paise coins, and its probability =


3
C 2 3.2 6 3
5

C 2 5.4 20 10
(3) one of these coins be a rupee-coin and the other a twenty paise coin
2
C1 .3 C1 2 6 3
and its probability =
5
C2 5 4 5
Also 2 rupee-coin=10 twenty-paise coins
1 rupee-coin and 1 twenty-paise coin = 6 twenty-paise coins.
Required expectation = p i x i
1 3 3
10 2 6 twenty paise coins.
10 10 5

3 18 26
= 1 twenty paise coins
5 5 5
26
= 20 paise
5
=104 paise

SAQ 1: Two coins are thrown simultaneously and let X denotes the number
of heads. Calculate all possible outcomes and find probability distribution of
X. Also calculate the expected values of X.

SAQ 2: Let pmf of discrete random variable is , where x =

1,2,3,4,.. Find E(X).


SAQ 3: Let a random variable X has p.m.f as

Sikkim Manipal University Page No.: 52


Probability and Statistics Unit 3

Find expectation of X.
SAQ 4: Given that . Find the expected value.

SAQ 5: By throwing a fair die, a game is played. A player wins Rs. 20 if 2


turns up, Rs. 40 if 4 turns up and loses Rs.30 if 6 turns up. And he never
loses or gains if any other number turns up. Find the expected value of
money won.
SAQ 6: The density function of a continuous random variable X is given

x
f ( x) , if 0 x 2
2
by 0 otherwise

Find (i) the expectation of X (ii) Variance of X.


SAQ 7: X is a random variable whose density function is
f ( x) A e x , 0 x
, find the value of (i) A (ii) mean of X.
0 otherwise

3.2.2 Mathematical expectation of two dimensional random variable


Let X and Y be random variable with joint probability distribution function
. Then the mean or expected value of random variable is
given by

Where X, Y are continuous random variables


=
=
Where X, Y are discrete random variables

Sikkim Manipal University Page No.: 53


Probability and Statistics Unit 3

3.3 Properties of Expectation (Mean) of single variable


1. If X and Y are two random variables, then E(X+Y) = E(X) + E(Y)
2. If X and Y are independent random variables, then E(XY) = E(X).E(Y)
3. IF X is a random variable and a and b are constants, then
E(aX+b) = a E(X) + b.
4. If X 0, E(X) 0
5. If X and Y are two random variables such that Y X, then E(X) E(Y)

3.3.1 Variance
Another important measure of variability of a random variable is variance.
Let X be a random variable with probability distribution and mean .
Then the variance of X is defined as
where X is discrete
= X is continuous

Variance is also denoted as .

Note:

1. The positive square root of variance is known as standard deviation. It is


denoted as .
That is
2. For the computation of variance we use the formula

=
Hence, .

Properties
1. If X is a random variable, then where a and b are
constants.
Proof: Let . Then

Sikkim Manipal University Page No.: 54


Probability and Statistics Unit 3

Squaring both sides, we get

Taking expectation of both sides, we get

2. Variance of constant is zero, i.e.,


Example: Suppose X is discrete random variable and let the p.m.f. of X is
given by

Where m is a fixed integer larger than 1. Find the variance of X

Solution: We know that

So lets calculate

Therefore,

Example: A random variable X has the following probability function


X -2 -1 0 1 2 3
f(X) 0.1 K 0.2 2k 0.3 k

Find the value of k and calculate mean, variance and standard deviation.

Solution: We know that


=> 0.1+ k + 0.2 + 2k + 0.3 + k = 1

Sikkim Manipal University Page No.: 55


Probability and Statistics Unit 3

= > k = 0.1
Now mean = E(X) =
= (-2)(0.1) + (-1) (0.1)+ 1(0.2) + 2(0.3) + 3(0.1)
= 0.8
Variance =
=
= (4)(0.1) + (1) (0.1)+ 1(0.2) + 4(0.3) + 9(0.1)
= 2.8
Therefore,
Standard Deviation =

Example: Let the random variable X have the distribution:


P(X = 0) =P(X = 2) = p; P(X = 1) = 1-2p, for 0 p
Then for what value of p is the Variance of X is maximum.

Solution: Here X = 0, 1, 2
E(X) = 0(p) + 1(1-2p) + 2(p)= 1

So, for 0 p , Var (X) is maximum when p = 1/2 .


That is V(X) = 2p = 2(1/2)= 1

Example: The weather bureau classifies the type of sky that is visible in
terms of degree of cloudiness. A scale of 11 categories is used: 0, 1, 2, ,
10, where 0 represents a perfectly clear sky, 10 represents a completely
overcast sky, while the other values represent various intermediate
conditions. Suppose that such a classification is made at a particular
weather station on a particular day and time. Let X be the random variable
assuming one of the above 11 values. Suppose that the probability
distribution of X is
p0 = p10 = 0.5

Sikkim Manipal University Page No.: 56


Probability and Statistics Unit 3

p1 = p2 = p8 = p9 = 0.15
p3 = p4 = p5 = p6 = p7 = 0.06

Hence
E(x) = 1 (0.15) + 2(0.15) + 3(0.06) + 4(0.06) + 5(0.06) + 6(0.06) + 7(0.06) +
8(0.15) + 9(0.15) + 10(0.05) = 5.0

In order to compute V(X) we need to evaluate E(X2)


E(X2) = 1(0.15) + 4(0.15) + 9(0.06) + 16(0.06) + 25(0.06) + 36(0.06) +
49(0.06) + 64(0.15) + 81(0.15) + 100(0.05)
= 35.6
Hence
V(X) = E(X2) (E(X))2
= 35.6 25
= 10.6

Example : Suppose that the random variable `X is uniformly distributed over


[a, b]. Then we have E(X) = (a + b)/2. Compute V(x)

Solution: We have
E(X) = (a + b)/2
b
1
x
2 2
E(X ) = dx
b a
a

1 b 3 a 3
=
b a 3

Hence
V(X) = E(X2) (E(X))2

1 b 3 a 3 a b
2
=
b a 3 2

Sikkim Manipal University Page No.: 57


Probability and Statistics Unit 3

After a simple computation

V(X) =
b a 2
12

SAQ 8: Let X be discreet random variable assuming values 1,2,3,and let


the corresponding p.m.f. is . Find E(X) and Var(X) of
the distribution.
SAQ 9: A discrete random variable X has the probability distribution given in
the following table:
X 1 3 5 7 9
P(X=x) 1/5 k 3/10 1/5

(a) find the value of constant k, (b) Find P(X )(c) Find E(X) and Var(X)
SAQ 10: Find the mean of the random variable X, if its pdf is given by
f(x)= 6x(1-x), 0x1.

SAQ 11: If the pdf of f ( x) kxe x , x 0 , Find k and E(X).


0 elsewhere

3.4 Covariance
It is a measure of association between two random variables.
Let X and Y be two random variables. Then the covariance is defined as
Cov (X,Y) = E[{X-E(X)}{Y-E(Y)}]
= E[XY-XE(Y)-YE(X) +E(X)E(Y)]
= E(XY) E(Y)E(X) E(X)E(Y)+E(X)E(Y)
= E(XY)-E(X)E(Y)
Note: If X and y are independent random variables ,then Cov (X,Y) = 0
Properties:
1. Cov (aX,bY) = ab Cov(XY)
2. Cov(X+a, Y+b) = Cov (X,Y)

3. Cov ( , )=

4. Cov (aX+b, cY+d) = ac Cov (X,Y)

Sikkim Manipal University Page No.: 58


Probability and Statistics Unit 3

5. Cov (X+Y,Z) = Cov (X,Z) + Cov (Y,Z)


6. Cov (aX+by, cX+dY) = ac + bd + (ad+bc) Cov (X,Y)
7. If be n random variables, then
V( )=
8. If be n independent random variables, then
V( )=
Example: The score of 12 students in mathematics and physics classes
are:
M 2 3 4 4 5 6 6 7 7 8 10 10
P 1 3 2 4 4 4 6 4 6 7 9 10

Find the covariance of the distribution.

Solution: We know that Cov (X,Y) = E(XY)-E(X)E(Y)


Example: Let X and Y be two random variables such that Var(X) = 4,
Cov(X,Y) = 2. Compute the Cov(3X,X+3Y).

Solution: By the properties of covariance operator, we have


Cov(3X, X+3Y) = 3 Cov (X, X+3Y)
= 3 Cov (X,Y)+ 9 Cov(X,Y)
= 3 Var (X) +9Cov (X,Y)
=
Example: Let (X,Y) be an absolutely continuous random variable with
support and its joint probability density function be

Compute covariance between X and Y.

Solution: Note that the support of Y is . When


, the marginal probability density function of Y is
0, while when , the marginal probability density function of Y is

Sikkim Manipal University Page No.: 59


Probability and Statistics Unit 3

Thus, marginal probability density function of Y is

The expected value of Y is


E(Y) =

=(

Now, the support of X is . When , the


marginal probability density function of X is 0, while when , the
marginal probability density function of X is

The expected value of X is


E(X) =

= (by changing the order of integration)

= (by changing the variable in the inner

integral, t = xy)

Sikkim Manipal University Page No.: 60


Probability and Statistics Unit 3

= (by changing the

variable in the inner integral, t = xy)


=

The expected value of the product XY can be computed using the


transformation theorem
E(XY) =

= (by changing the order of

integration)
= ( integrating by parts)

Hence, using the covariance formula, the covariance between X & Y is


Cov[X,Y] = E(XY)-E(X)E(Y)
= 1-

Example: Let [X,Y] be an absolutely continuous random vector with support


i.e., is the set of all couples (x,y) such that
. Let the joint probability density function of [X,y] be

Sikkim Manipal University Page No.: 61


Probability and Statistics Unit 3

Compute the covariance between X&Y.

Solution: The support of X is thus, when x does not belongs to


[0,2], the marginal probability density function of X is 0, while when
the marginal probability density function of X is,

The expected value of X is


E(X) =

The support of Y is thus, when y does not belongs to [0,2], the


marginal probability density function of Yis 0, while when the
marginal probability density function of Y is,

Sikkim Manipal University Page No.: 62


Probability and Statistics Unit 3

Therefore, Marginal probability density function of Y is


=

The expected value of Y is


E(Y) =

The expected value of the product XY is


E(XY) =

Hence, using the covariance formula, the covariance between X & Y is


Cov[X,Y] = E(XY)-E(X)E(Y)
= -

Sikkim Manipal University Page No.: 63


Probability and Statistics Unit 3

3.5 Conditional Expectation and Conditional Variance


Let h(X,Y) be a two dimensional discrete random variable. Then the
conditional expectation or mean value of h(X,Y) given that Y = yI is defined
by
E[h(X,Y)|Y=yi] =

Thus the expectation of E[h(X,Y)|Y=yi] is the expectation of the function


of X w.r.t the conditional distribution of X when . In particular,
the conditional expectation of a discrete random variable X given is
E(X| )=

For continuous random variable

E(X| )=

Hence , the conditional expectation of X given Y = y is defined by

E(X| )=

Similarly, E(Y| )=

And the conditional variance is


V(X |Y= ) = E[{X-E(X|Y= ) |Y= ]
Similarly, V(Y |X= ) = E[{Y-E(Y|X= ) |X= ]
Example: Let elsewhere. Find
(a) E(Y|X=x), (b) E(XY| X=x), (c) Var (Y| X = x)

Solution:

Sikkim Manipal University Page No.: 64


Probability and Statistics Unit 3

, 0 < x < y < 1.

(a) E (Y | X = x) =

(b) E (XY | X = x) = x E(Y | x = x)

(c) E(Y2 | X = x) =

Hence, Var(Y | X=x) = E(Y2 | X = x) -

Example: Let X and Y be two random variables each taking three values -1,
0 and 1, and having the joint probability distribution
X
-1 0 1 Total
Y
-1 0 0.1 0.1 0.2
0 0.2 0.2 0.2 0.6
1 0 0.1 0.1 0.2
Total 0.2 0.4 0.4 1.0

Sikkim Manipal University Page No.: 65


Probability and Statistics Unit 3

Find
(a) Expectation of X , Y
(b) Cov (X,Y)
(c) Find Var X and Var Y
(d) Find Var (Y | X = -1)

Solution: (a) By definition


E(Y) =
E(X) =
(b) Cov(X,Y) = E(XY) E(X)E(Y)
E(XY) =
=

=
Cov (X,Y) = E(XY) E(X)E(Y)
=0

(c) E(Y2) = (-1)2(0.2)+0(0.6)+12(0.2) = 0.4


V(Y) = E(Y2) {E(Y)}2
= 0.4
Also, E(X2) = (-1)2(0.2)+0(0.4)+12(0.4) = 0.6
V(X) = E(X2) {E(X)}2
= 0.6 0.04 = 0.56

(d) Var (Y | X = -1) = E(Y | X = -1)2 {E(Y | X = -1)}2


E (Y | X = -1) =
= (-1)0 + 0 (0.2)+1(0) = 0
2
E(Y | X = -1) =
= 1(0)+ 0(0.2) + 0 = 0
Var (Y | X = -1) = 0

Sikkim Manipal University Page No.: 66


Probability and Statistics Unit 3

SAQ 12: Two random variables X and Y have the following joint probability
density function:

=
Find (i) Var(X) and Var (Y)
(ii) Cov (X,Y)

SAQ 13: If the joint pdf of (X,Y) is given by f(x,y)= 24y(1-x), 0yx1, find
E(XY).

SAQ 14: If X and Y are independent random variables with joint probability
x(1 3 y 2 )
f ( x, y ) , 0 x 2, 0 y 1
density 4
0 otherwise
Show that E(XY)=E(X) E(Y).

SAQ 15: Assume two random variables X and Y jointly distributed with
density function f(x,y)= x+y 0x1, 0y1. Find Cov(X,Y).

3.6 Summary
In this unit we studied expectation, variance and covariance of one
dimensional and two dimensional random variables with sufficient number of
examples.

3.7 Terminal Questions


1. Compute (i) E(X) (ii) E(2X+3) (iii) E(4X+5) (iv) E(X2) for the following
data
x -3 -2 -1 0 1 2 3
0.005 0.10 0.30 0 0.30 0.15 0.10
f(x)

2. A coin is tossed until ahead appears. What is the expectation of the


number of tosses required.

Sikkim Manipal University Page No.: 67


Probability and Statistics Unit 3

3. In a one-hour period, the number of gallons of a certain toxic chemicals


that is produced at a local plant, say X has the p.m.f as
X 0 1 2 3
f(X) 0.2 0.3 0.3 0.2

The cost to produce X gallons is given by the cost function


C(X) = 3+12x+2x2. What is the expected cost in a one-hour period.
4. A continuous random variable X has the p.d.f. .
Find k, mean and variance.
5. If it rains, a taxi driver can earn Rs. 1000 per day. If it is fair he can lose
Rs. 100 per day. If the probability of the rain is 0.4, find his expectation.
6. A random variable X has the following distribution
X 3 4 5 6
P(X) 1/8 3/8 3/8 1/8

Compute the expectation and variance of X.

7. If E(X) = 10, Var(X) = 25, find the positive values of a and b such that
E(aX-b) = 0 and Var(aX-b) = 1.
8. A and B throw with one dice for a prize of Rs.11 which is to be won by a
player who first throws 6. if A has the first throw, what are their
respective expectation?
9. Thirteen cards are drawn simultaneously from a pack of cards. If aces
count 1, face cards 10 and others according to denomination, find the
expectation of the total score on 13 cards.

3.7 Answers
Self Assessment Questions
1. Let H denotes the head and T denotes the tail. So all possible outcomes
after tossing two coins simultaneously are
Outcomes Number of heads Probability of occurrence
HH 2 2/4 = 1/2
Sikkim Manipal University Page No.: 68
Probability and Statistics Unit 3

HT 1 1/4
TH 1 1/4
TT 0 0
So, E(X) = 0.f(x) + 1.f(x) + 2.f(x) = 1. 2/4 + 2. = 3/2
2. (n+1)/2
3. 2
4. Let X denotes the discrete random variable.
Here n = 5. So the possible values of X are 0,1,2,3,4,5. The probability
distribution is
X 0 1 2 3 4 5
f(x)

= 32/243 = 80/243 = 80/243 = 32/243 = 10/243 =1/243

Hence expected value of f(x) is E(f(x)) =


=

5. E(X)=5
6. E(X)=4/3 and Var(X)=2/9
7. A=1 and Mean=1
8. E(X) =
Put we get

=
= =
=
=
Sikkim Manipal University Page No.: 69
Probability and Statistics Unit 3

Hence, Var(X) =
=

9. (a) We know that that


=> 1/4+ 1/5 + k + 3/10 + 1/5 = 1
= > k = 1/20

(b) P(X )=P(X=5) + P(X = 7) + P(X = 9)


= 1/20 + 3/10 + 1/5 = 11/5
Now, mean = E(X) =
= (1)(1/4) + (3) (1/5)+ 5(1/20) + 7(3/10) + 9(1/5)
=5
Variance =
=
= (1)(1/4) + (9) (1/5)+ 25(1/20) + 49(3/10) + 81(1/5)=33
Therefore,
10. E(X)=1/2
11. k=1 and E(X)=1/2
12. (a)

So,

So,

Sikkim Manipal University Page No.: 70


Probability and Statistics Unit 3

=
Var(X) = E(X2) {E(X)}2

E(X) =

E(Y) =

E(X2) =

E(Y2) =

V(X) = E(X2) { E(X)}2


=

V(Y) = E(Y2) { E(Y)}2


=

(b) Cov (X,Y) = E(XY)-E(X)E(Y)


E(XY) =

Sikkim Manipal University Page No.: 71


Probability and Statistics Unit 3

13. E(XY)=4/15
14. E(XY)=E(X)E(Y)
15. -1/144.

Terminal Questions
1. (i) 0.385 (ii) 2.285 (iii) 6.115 (iv) 2.545
2. E(X) = 2.
3. E(C(X)) = 27.6
4. K = , E(X) = 3, Var(X) = 3
5. Rs 340
Hint:
X X1 = 1000 X2 = -100

P 0.4 0.6

6. 4.5, 2.
7. a = 1/5, n = 2.
8. As= Rs.6 , and Bs = Rs. 5
9. 85

Sikkim Manipal University Page No.: 72

You might also like