


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Quiz; Class: LINEAR ALGEBRA; Subject: Mathematics; University: University of California - Irvine; Term: Spring 2003;
Typology: Quizzes
1 / 4
This page cannot be seen from the preview
Don't miss anything!



Jim Lambers Math 6A Spring Quarter 2003- Lecture 15 Examples
This examples corresponds to Section 5.3 in the text. Example (Exercise 25, Section 5.3) Let Xn be the random variable that counts the difference in the number of tails and the number of heads when n coins are flipped. What is the expected value of Xn, and what is its variance? Solution This problem is similar to one given in Quiz 5, except that a specific value of n was given. For the case of an arbitrary n, we must first determine the possible values of Xn. For j = 0, 1 , 2 ,... , n, if the number of tails in a sequence of n flips is j, then the number of heads in the same sequence is n − j. It follows that the difference in the number of tails and the number of heads is j − (n − j) = 2j − n. Therefore, the possible values of Xn are 2j − n, for j = 0, 1 , 2 ,... , n. In order to compute the expected value and the variance, we must know the probability of j tails occurring, for each j = 0, 1 , 2 ,... , n. To compute this probability, we can use the fact that each coin flip is an independent Bernoulli trial with probability of success p = 1/2, where success is defined to be a tail and the coin is assumed to be fair. It follows that for each j = 0, 1 , 2 ,... , n, the probability of j tails is C(n, j)(1/2)j^ (1/2)n−j^ = 2−nC(n, j). The probability of j tails is the same as the probability that Xn = 2j − n, so using the formula E(X) =
r∈X(Sn)
rp(X = r),
where Sn is the sample space of all sequences of n coin flips, we obtain
E(Xn) = ∑^ n j=
(2j − n)2−nC(n, j)
= 2 −n ∑n j=
(2j − n)C(n, j)
= 2 −n
∑^ n j=
2 jC(n, j) − ∑^ n j=
nC(n, j)
= 2 −n
∑^ n j=
jC(n, j) − n
∑^ n j=
C(n, j)
= 2 −n
∑^ n j=
jC(n, j) − n 2 n
= 2 −n
∑^ n j=
jC(n, j)
(^) − 2 −nn 2 n
= 2 −n
∑^ n j=
jC(n, j)
(^) − n
= 2 −n
n∑− 1 j=
(j + 1)C(n, j + 1)
(^) − n
= 2 −n
n∑− 1 j=
(j + 1) (^) (j + 1)!(nn !− j − 1)!
(^) − n
= 2 −n
2 n
n∑− 1 j=
(j + 1) (^) (j + 1)!((n^ n− −1)! j − 1)!
(^) − n
= 2 −n
2 n
n∑− 1 j=
(n − 1)! j!(n − 1 − j)!
(^) − n
= 2 −n
2 n
n∑− 1 j=
C(n − 1 , j)
(^) − n
= 2 −n(2n 2 n−^1 ) − n = 2 −n(n 2 n) − n = n − n = 0. Note that in the fourth step, we were able to start the first sum at j = 1 instead of j = 0, since the term corresponding to j = 0 is zero. Also, in the eighth step, we shifted the index of summation down by one. We can use a similar approach to compute the variance, by way of the formula V (Xn) = E(X^2 n) − E(Xn)^2 = E(X n^2 ), since E(Xn) = 0. Using the formula derived in the process of computing E(Xn), ∑^ n j=
jC(n, j) = n 2 n−^1 ,
we have V (Xn) = E(Xn)^2
= 2 −n+
n∑− 1 j=
(j + 1) (^) j!(n −n j! − 1)! − n^2
= 2 −n+2n
n∑− 1 j=
(j + 1) (^) j!(n(n −^ − j^ 1)!− 1)! − n^2
= 2 −n+2n
n∑− 1 j=
(j + 1)C(n − 1 , j) − n^2
= 2 −n+2n
n∑− 1 j=
jC(n − 1 , j) +
n∑− 1 j=
C(n − 1 , j)
(^) − n^2
= 2 −n+2n
n∑− 1 j=
jC(n − 1 , j) + 2n−^1
(^) − n^2
= 2 −n+2n [(n − 1)2n−^2 + 2n−^1 ]^ − n^2 = 2 −n+2n(n − 1)2n−^2 + 2−n+2n 2 n−^1 − n^2 = 22 n(n − 1)2−^2 + 2^2 n 2 −^1 − n^2 = n(n − 1) + 2n − n^2 = n^2 − n + 2n − n^2 = n.
It is useful to note that in the process of obtaining this result, we have derived the formula
∑^ n j=
j^2 C(n, j) = n(n − 1)2n−^2 + n 2 n−^1 ,
which can be simplified to (^) n ∑ j=
j^2 C(n, j) = n(n + 1)2n−^2.
2