IP Unit 4 (Expectation)
IP Unit 4 (Expectation)
$1,NTRODUCTION
used r.u's can be both characterized and dealt with effectively for practical
Many frequently their expectation. For exarthple,.a gambler might be
purposes by consideration of quantities called
interested in his average winnings at a game, a businessman in his avérage. profits on a product,
random
a physicistin the average charge of a particle, and so on. The 'average value of a
phenomenon is also termed as its mathematical expectation or expected value. In this chapter we will
iofine and study this concept in detail, which will be used extensively in subsequent chapters.
e2 MATHEMATICAL EXPECTATION OR EXPECTED VALUE OF A RANDOM VARIABLE
Oncdve have constructed the probability distribution for a random variable, we often want to
compute the mean or expected value of the random variable. The expected value of a discrete
random variable is a weighted average of all possible values of the random variable, where the
weights are the probabilities associated with the corresponding values. The mathematical
expression for computing the expected yalue of a discrete random variable X with probability
mass function (p.mf.) f() is given below :
E(X) =*f(» (for discrete r.v.) ... (6-1)
The mathematical expression for computing the expected value of a continuous random
variable Xwith probability density function (p.df.)f) is, however, as follows :
|E (X) = | f() dx ,( for contiuous r.v) ... (6-1a)
provided the right hand integral in (6-1a) or series in (6-1) is absolutely convergent, ie., provided
. (6-2)
Or (6-2a)
Remarks :
1. Since absolute convergence implies ordinary convergence, if (62) or (62 a) holds then the series
or integral in (6-1) and (6-1a) also exists, i.e., has afinite value and in that case we define E (X) by
(61) or (6-1la). It should be clearly understood that although Xhas an expectation only if L.H.S. in
(62) or (6-2a) exists, ie,-conyerges to a finite limit, its value is given by (6-1) or (6-1a).
V2 E(X) exists ifE IXI exists.
Lxpected Value and Variance of an Indicator Variable. Consider the indicator variable :
[1, if Ahappens
Jo, if Ahaypens
E(X) = 1. P(\= 1) + 0. P(X =0) E() - 1. PI, - 1) + 0. PJ =0)
E().= P(A)
This gives us a very useful tool to find P(A), rather than to evaluate E(X).
Thus P(A) = E() ... (6-2b)
E(X') = 12. P(X = 1) +02. P(X =0) = P(I, 1) = P(A}
Var X E(X) - (E(X)1?= P(A) - [P(A)? P(A) [1 - PA)] =P(A): P(A) (6-2c)
Var (a) - P(A)- P( .. (6-2d)
FUNDAMENTALS OF MATHEMATICAL
6.4
L2!, ...with probability law:
STATISTICS
4. If the r.v. X takes the values 0!. 1
el
;x=0, 1, 2, .. then Sx! P (X - x)= eS i
P (X = xI) = x! Y=0
x=0
does not exist.
which is a divergent series, In this case E (X)
variable X which takes the values
More rigorously, let us consider a random
Here, P (X - x) =
i=1
141-24 4
...
j=1
conditionally convergent
Using Leibnitz test for alternating series, the series on right-hand side is
since the terms alternate in sign, are monotonically decreasing and coverge to zero. By conditional
convergence we mean that although ),Pi Xi converges, >p; does not converge. So,
/=1 i=1
rigorously speaking, in the above example E(X) does not exist, although Pii is finite, viz,
/=1
log, 2.
(.2*-.(k=1,2,3,., wüih
As another example, let us consider the ro. X which takes the values x = k
probabilities P 2-k, Here also we get
1
k=1
X7 Pk
k=l
k --1-.--log, 2 and k=1 k=l
which is a divergent series. Hence in this case also expectation does not exist.
As an illustration of a continuous r.., let us consider the r.u. X with p.d.f. :
1
...(63)
ELg (X)]= s ) f(a) dx (For continuous r.u.)
(6-34)
ELg (X)]= 8(*) f() (For discrete r.v.)
MATHEMATICAL EXPECTATION 6-5
g (X) is :
By definition, the expectation of Y
EÍR(X)]=E(n= ydHy () = yh(y) dy 64) or E()-
y
yh(y), ... (6-4)
where Hy)is
the distribution function of Yand h(y) is p.d.f. of Y.
mhe proof of equivalence of (6-3) and (6-4) is beyond the scope of the book.]
This result extends into higher dimensions. If X and Yhave a joint p.d.f, fx, y) and Z = h(x, y)
function and if E (Z) exists, then
is a random variable for some
.. (6.5)
E(2) - - o (* y) f(ey)ax dy
E (Z) = (6-5a)
Partlcular Cases
If we take g(X) =X, r being a positive integer, in (6-3),
E(X") = 'f(<) dx, (6-55)
which is defined as u,, the rth moment (about origin) of the probability distribution.
Thus , (about origin) = E (X). In particular
4 (about origin) = E(X) and Hy (about origin) = E(*)
Hence, Mean =7= (about origin) = E (X) .. (6-6)
and 4y-4= E (X') - (E (X))? (6-6a)
2. If 8 (X) = [X - E(X)]=(X- y, then from (6-3), we obtain
mark. The corresponding results for a discrete r. Xcan be obtained on replacing integration by
Summation (2) over the given range of the variable Xin the formulae (6-5) to (6-9).
In the following sections, we shall establish some more results on 'Expectation' in the form of Theorems,
inteotus 7u.'s. The corresponding results for discrete ru.'s can be obtained similarly on replacing
integration by summation (2) over the given range of the variable Xand are left as an exercise to the reader.
6-6 FUNDAMENTALS OF MATHEMATICAL
6-4. PROPERTIES OF EXPECTATION STATISTICS
Property 1. Addition Theorem of Expectation.
If X and Yare random variables, then :
E(X + ) = E(X) + E(M, ... (610)
provided all the expectations exist.
Proof. Let Xand Ybe continuous r.u.'s with joint p.d,f. fxy (x, y) and marginal p.df's fy (x) and
fy ) respectively. Then by definition,
E(X) - xfx(x) dz (611)
-f*)d:+yf(y) áy
= E(X) + E () [On using (6-11) and (6-12))
The,result in (6-10) can be extended to n variables as given below.
Generallsation. The mathematical expectation of the sum of n random variables is equal to the sum
of their expectations, provided all the expectations exist. Symbolically, if X, X, ., X, are rmndon
variables then
E(X, +X, t ...+X) =E(X,) +E(X,) +..+ E(X,) ...(6-13)
-) E(X,)+ E(X,1)
i=1
[Using (6-14)]
r+1
-E(X))
j=1
Sonce if (6-13) is true for n =, it is also true for n =r+ 1. But we have proved lin ) above
for
that (6-13)is true rn=2. Hence it is true for n =2 + 1=3;n =3+1= 4;...and so on.
Hence
tae principle of mathematical induction, (6-13) is true for all positive integral values of n.
Property 2. Multipllcation Theorem of Expectation.
yfX and Yare independent random variables, then :
E(X) = E(X). E( ..(6-15)
provided all the expectations exist.
Proof. Proceeding as in property 1, we have
E(X Y =
É() E(n, provided Xand Yare independent, [Using (6-11) and (6-12)]
Generaljsáton. The mathematical expectation of the roduct of anumber of independent random
Dariables is equal to the product of their expectations."Symbolically. if X, Xy , X are nindependent
r.o's, then
E (X,Xy, . X) = E (X) E (X,) ..E (X)
... (6-16)
i.e., E(X;),
i=1 i=1
[Using (6-17)
/=1
r+1
-||E(%;)
i=1
6-8 FUNDAMENTALS OF MATHEMATICAL
Hence, if (6-16) is true forn=r, it is also true for n =r+1. Hence using (), STATISTICS
,by the principle
of mathematical induction we conclude that (6-16) is true for all positive integral values nf
Property 3. If X is a random variable and 'a' is constant, then
(i) E[aY (X)]=a E[Y (X)] ... (618)
(i) E [ (X) +aj =E [Y (X)] +4, . (6-19)
where (X), a function of X, is a ru. and all the expectations exist.
Proof.
Now (6-23) and (6-24) imply that expectation of alinear function is the same linear function of he eapeciation.
The result, however, is not true if g ) is not linear. For instance.
E (1/X) * (1/E (X)} :;
E [log (X)] log [E (X)]: E(X) * [E (X)]2.
since all the functions stated above are non-linear. As an illustration, let us consider a random variable
Y which assumes only two values + and -1, each with equal probability 1
Then
2
MATHEMATICAL EXPECTATION. 6-9
1 1 1
E(X) = 1x-+
*-1) x 2 -0 and E (X) - 12 x 12 +(-1)° x2 = 1.
X 4; E(X;) .. (6-25)
i=1
i=1
E[hX) . k ( ) ] - )
K{y) fu,y) dz dy - (a) K(y) f() g(y) dx dy fFrom ()
Since E[h (X). k()] exists, the integral on the right-hand side is absolutely convergentand
hence by Fuibini's theorem for integrable functions, we can change the order of integration to get
as desired.
MATHEMATICAL EXPECTATION 6-11
Remark: The result can be proved for discrete random variables X and Y on replacing integration by
summation over the given range of X and Y.
6.5.PROPERTIES OF VARIANCE
IX is a random variable, then V(aX + b) = a'. V(X), where a and b are constants. ... (6-29)
Proof. Let Y = aX + b.
Then E(Y = a E(X) + b
Y- E() =a [X- E(X)]
Squaring and taking expectation of both sides, we get
E [Y -E(n]' - E[X - E()]2
V () = a V (x) Or V(aX + b) = a V(X),
where V (X) is written for variance of X.
Corollary
() If b=0, then V(aX) =a v(x) ’ ariance is not independent of change of scale..(6-29a)
(ii) If a= 0, then V (b) = 0 Variance of a constant is zero. . (6-29b)
(in) If a=1, then V(X +b) =V(X) Variance is independent of change of origin. (6-29c)
Hence, Nariance is independent of change of origin but not of scale.
6-5-1. Vafiance of Degenerate Random Variable.
(a) If X is a discrete r.o, then Var (X) = 0, if and only if X is degenerate.
(6) If X is a continuous r.u. then Var (X) # 0.
Proof.
(4) Let Xbe a discrete r.o. with p.mf. P(X =x)=P; and E (X) = ; P (X = x;) =p
zwhere all the partial derivatives are evaluated at the point (uy, y)
Proof. The proof of this theoremis based on Taylor series expansion of the ) oftwo
variables about the point (4, b), stated below.
functionf(*
f y) =f [a + (* - a), b +(y - b)] =f (a +h, b+) ; (h=x-4, k=y-)
MATHEMATICAL EXPECTATION 6-13
-f(a, b) + -+2hk
dxdy
where h = X - 4, k y-b and faf (a, b).
Using Taylor's series expansion of G (X, n about (Hx, Hy), we get :
Z =G (X, )= G [uy + (X - y), Hy +(Y - Hy)l
dG G
-G (Hx Hy)t
[G (Hy Hy] ; r=1,2, and so on, and Ris the remainder term.
Discarding R, and taking expectation of both sides in ("), we get
aG
E (Z) =G(Hx Hy)t
[: E(X -H) = E (Y- Hy) =0
and E [(X - y) (Y- Hy)] = Cov (X, Y = 0, because X and Yare independent
aG G
E (Z) =G (Hx Hy)t
where partial derivatives are evaluated at the point (Hy Hy
To obtain the expression for Var (Z), writing Taylor's series expansion(") upto one term
only, we get
dG dG1 ...(**)
where R is the remainder term.
Discarding R, and taking variance of both sides in (*), we get
2
dG
Var (Z) =V[G (Hy, Hy)] + Var (X - Hx) t Var (Y- y
the covariance term vanishes because X and Yare independent.
2
Var (Z) = Va(x)Nar(r)
[:: Var (C) = 0, Var (X ± C) = Var X ; Var (Y t k) = Var Y
(2) + a.
Var-
where the partial derivatives are evaluated at the point (Hy Hy.
6-14 FUNDAMENTALS OFMATHEMATICAL
Note. The above result may be extended to a function of n independent rv's. STATISTICS
If Z=G(X, Xz, ., X,) with E(X) =H, Var (X) = o ; i=1, 2, ., n, then
that all the partial derivatives exist, we have the following approximation assurning
E(Z) = G (H Me ., P)t naG .. (632)
i=1
=
S4V(X)+2
j=1 i=l j=1
4; Con (X, X) (6-35)
MATHEMATICAL EXPECTATION 6-15
Proof. Let
So that E (U) = a E (X) + ag E (X2) t ..+ a, E (X)
u-E () =4, [X} - E(X,)] +4, [Xy - E(X-)] +. t4, [X, - E(X,)]
Squaring and taking expectation of both sides, we get
E[U -E(U]' =a' E[X - E(X,)'+ a E[X, - E(X,)]2 +.t a4,2 E[X,- E(X)'
vy -a? V(x) +a? VX) t..*a2 VX) +2) )44, CovX,, X;)
IM IM:
a V(x,)+2 44 Cov (X;,X;)
i=1
i=1 j=1
is
Remarks :
1. If a, =1;i- 1, 2, ., n, then
Example 61,Let Xbe a random variable with the following probability distribution :
-3 6 9
P (X =x): 1/6 1/2 1/3
Pind E (X) and E (X2) and using the laws of expectation, evaluate L (2X + 1).
6-16 FUNDAMENTALS OF MATHEMATICAL
1 11
STATISTICS
Solution. 1
x+6x;+9x;=
1
E(X) =xp(x) =(-3) 2 2
1 1 1 93
E(X) = p(x) -9x 6 +36 x 2 + 81 X 3
2
93 11
E(2X +1)? =E(4X2 +4X +1)= 4E (X) + 4E(0) +1=4 x +4x+1 =209.
Example 6-2.
(a Find the expectation of the number on a dice when thrown.
b) Tuo unbiased dice are throun. Find the expected values of the sum of numbers of points on then.
Solution.
() Let Xbe the random variable representing the number on a dice when thrown. Then, X
1
can take arny one of the values 1, 2, 3, .., 6, each with equal probability 6 Hence,
1 1
E (X) = 6 X1+x
6
2+ X3+...z x6=(1 +2+3+.+6) = 6xx
2
7
7
Remark. This does not mean that in a random throw of a dice, the player will get the number =35. n
2
fact, one can never get this (fractional) number in a throw of a dice. Rather, this implies that if the
7
player tosses the dice for a "long" period, theni on the average toss he will get
2 =3-5.
(b) The probability function of X (the sum of numbers obtained on two dice), is
Value of X:x 2 3 4 5 6 7 11 12
E(X) -pl)
1 2 3 4 5 6 5 4
=2X +3 X +4X +5x +6X +7X +8 x +9 x
36 36 36 36 36 36 36 36
3 2 1
+ 10 x + 11 × + 12 X
36 36 36
1
=
(2+ 6 + 12 + 20 + 30 + 42 + 40 + 36 + 30 + 22 + 12) = x 252 =7.
36
Aliter. Let X; be the number obtained on the ith dice (i = 1, 2) when thrown. Then the sui
the number of points on two dice is given by :
7
S= X +X, ’ E(S) = E(X) + E(X4) = =7
[On using()
2
Remark. This result can be generalised to the sum of points obtained in a random throw of n dice. Ji
7n
E(S)-E(X) -
j=1 2
outcomes
Exampleb3. In four tosses of a coin, let Xbe the number of heads. Tabulate the 16- possible and
with the corresponding Dalues of X. By simple counting, derive the probability distributiorn OgfX
hence calculate the expected value and variance of X.
MATHEMATICAL EXPECTATION 6-17
The random variable X takes the values 0, 1, 2, 3 and 4. Since, from the above table,
we
find that the number of cases favourable to the coming of 0, 1, 2, 3 and 4 heads are 1,
4, 6, 4 and 1 respectively, we have
1 4 1 6
P (X = 0) = 16 P (X = 1) = 16 P(X =2) = 16 8
4 1 1
P(X =3) =164' P(X= 4) = .
The probability distribution of X can be summarized as follows :
0 1 2 3 4
1 3 1 1
1
P) 16 4 8 4 16
3 1
E (X) = xp(3) =1 : +2+3· 4 +4 16 = 2,
x=0
3 1 1+6+9+4
E (X) = S*pla) -12:+22.
4 +32. +4.6 4 4
=5
Y=0
Example 6:5,A box contains 2" tickets among which "C, tickets bear the number i; i =0, 1, 2..
Agroup of M
tickets is drawn. What is the expectation of the sum of their numbers ?
Solution. Let X; ; i =1, 2, .., mbe the variable representing the number on the ith ticket drawn
Then the sum 'S' of the numbers on the tickets drawn is given by :
S- X+ X, t .t Xy =2
i=l
X, so that E(5) - i=1
E(X;)
X; is a random variable which can take any one of the possible values 0, 1, 2, ., M
with respective probabilities: "Co / 2", "C /2", "C, / 2", ., "C, / 2M.
2!
2
i=1
Example 6-6.Prove that the events E,, E, .., E, are independent iff their
variates I 7 y are independent. corresponding indicator
Eyample 67. A poin is tossed until a hend appears. What is the expectation of the number of tosses required?
Solutlon. Let Xdenote the number of tosses required to get the first head. Then X can materialise
in the following ways :
Event
Probability, px)
1
H 1
2
TH 2
TTH 3
1 1
E(X)=2
x=1
P(*) -1x+2x+3x+
4 8 4 x16 + ... .. ()
1
This is an arithmetic-geometric series with ratio of GP being r= 2
1 1 1
Let S= 1 2
+2 |4 +3 8
+ 4
16
1 H| 1 1
Then 1 +2 +3
4 8 16
1
1 1 1 1 2
1-)s=
; *16 2
=1 S= 2.
Since the sum of an infinite G.P. with first term a and common ratio r (< 1) is
Hence, substituting in (*), we have : E (X) = 2.
Example 6-8. What is the expectation of the number of failures preceding the first suçcess in an infinite
series of independent trials with constant probabilityp of success in each trial?
Solutlon. Let the random variable X denote the number of failures preceding the first succes.
Then X can take the values 0, 1, 2, ..., o, We have
P (X = x) = p(x) = P(r failures precede the first success) gP.
where q =1 -p, is the probability of failure in a trial. Then by def.,
a+b
[From ()
Starting from the origin, unit steps are taken to the right with
Exemple 6-11.(Random Walk Problem).
probabilty pmd to the left with probability (- 1- p). Assuming
n steps
independent movements, find the
meOm and variance of the distance moved from origin after
Solutlon. Let us associate a variable X; with the ith step defined as follows :
[+1, ifftthe ith step is towards the right,
X; = |1if the ith step is towards the left.
r=1 r=1
r=l
q p
(See Remark 1 to Example 6-15)
V
()- E(X) - [E (012= E[X (X -1)] +E() - [E ()]
E[X (X- 1)]- rr-)PK=) Xrr-1)(pg+¢'p)
r=2
r=2
-Xrt-)pa+rtt-)dP
r=2 r=2
r=2 'r=2
r=2 r=2
-2p'yl-p)'+24p(1- -2 2
)):-(#--6-9) [From ()
Example 6-14, (MATCHNG PROBLEM)A deck of nnumbered cards is thoroughly shufled and the cards
are inserted into n numbered cells one by one. If the card number " falls in the cell 'r, we count it a8
a match, otherwise not. Find the mean and variance of total number of such matches.
Solutlon. Let us associate a r.u, X, with the ith draw defined as follows :
[1, if the ith card falls in the ith cell
X o,0,otherw ise
The total nümber of matches 'S is given by IM:
S- X+X, t .i+t X=X ’ E (S) = > E(X;)
i=l
1
E(X) - 1P (X;-1) +0.P (K=0) =P(X;-1) =
MATHEMATICAL EXPECTATION 6-23
Hence, 1
2 n-1
11
v0)- EX)- [E (X)]² -1. P,-1)+02,P(X, -0)-( n 2 2 . (2)
Cov (X;, X) = E(X; X) - E(X) E(X) ... (3)
1
E(X; X) =1. P(%{ X=1) +0. P(X, X, =0) - -2
n! n(n-1)
since X; X,= 1if and only if both card numbers iand j are in their respective matching
places and there are (n - 2) ! arrangements of the remaining cards that correspond to
this event. Substituting in (3), we get
1 1 1 1
Cov (X{, X) = n(n-1) n n n(n-1) (4)
Substituting from (2) and (4) in (1), we have
1
V(S) =
i=l i=1 j=l
i<j
1 n-11
=
+- = 1,
n (n-1)
Example 6-15. If tis any positive real number, show that the function defined by
p(r)=e-t (1 -e-h*-1 ... (1)
can represent a probability function of a random variable X assuming the values 1, 2, 3, ...Find
E (X) and Var (X) of the distribution.
Solution. We have el>1, Vt0 ’ et<1 or 1-t> 0, Vt>0
1
Also >0, t>0
Hence, p(r) = e- (1-e-hx-1>0 0, x=1, 2, 3, ...
1
=e' (1 + a+ a?+ a +... )= e-.
(1-a)
= [1- (1 - e = ot.el= 1
6-24 FUNDAMENTALS OF MATHEMATICAL
Hence, p(x) defined in (1) represents the probability function of a r. X. STATISTICS
E(0) - 2* pl) -ex(1-e} a , (a=1-ey
X=1 X=1
2. Consider
S = 1+22. a +32. a+ 42, a +52, a +..
S = 1+ 4a + 9a + 164 +254 +...
-3a S = -3a - 1242 - 273 - 48d4
+3a2S = + 3a2 + 1243 +27a4 t...
-
-404
Adding the above equations, we get
(1 - a) S = 1+ a (")
S (1 +a) (1 - a)3
The results (") and (*) are quite useful for numerical problems and should be committed to memony
Example 6-16. A man with n keys wants to open his door and tries the keys independently ana
yandom. Find the mean and variance of the number of trials required to open the door,
() if unsuccessful keys are not eliminated from further selection, and
(i) if they are.
Solutlon.
doorin
Suppose the man gets the first success at xth trial, i.e., he is.unable to open the
() the first (x-1) trials. If unsuccessful keys are not eliminated then X is a random vartav
which can take the values 1, 2, 3, .., o,