Stat 400: Georgios Fellouris Homework 4 Due: Friday 17th

Stat 400: Georgios Fellouris
Homework 4
Due: Friday 17th , 2017
1. An exam has 6 questions and each of them has 2 possible answers. A student will answer
all questions completely at random, independently of one another.
(a) Compute the expectation and the standard deviation of the number of correct
answers. Remark: Can you guess the expected value of the number of correct
answers before you do any computations?
Solution: Let X be the number of correct answers in the 6 questions. It is assumed
that the students answers all questions completely at random, which means that
the probability to give a correct answer in each question is 0.5, and the answers to
the different questions are independent. Thus, X has the same distribution as the
number of Tails in 6 tosses of a fair coin, which we have seen that it is
6
6
1
, x = 0, 1, . . . , 6.
fX (x) =
2
x
Consequently,
6
6
X
6
1
x
x fX (x) =
E[X] =
x
2
x=0
x=0
6 1
6
6
6
6
6
6
6
=
0·
+1·
+2·
+3·
+4·
+5·
+6·
2
0
1
2
3
4
5
6
1
192
=
(6 + 30 + 60 + 60 + 30 + 6) =
= 3,
64
64
6
X
which is quite natural, as there as 6 questions and it is equally likely to get the
correct answer for each one of them. In order to compute the standard deviation
of X, we first compute
6
X
6
X
6
1
6
1
= (6 + 60 + 180 + 240 + 150 + 36) = 10.5
E[X ] =
x fX (x) =
x
2
64
x
x=0
x=0
2
2
2
Then, the variance of X is
Var[X] = E[X 2 ] − (E[X])2 = 10.5 − 32 = 1.5,
and consequently the standard deviation of X is
p
√
σX = Var[X] = 1.5 = 1.225.
Remark: The following fact about combinations can be helpful with the computations in this problem and in general:
n
n
=
, k = 0, 1, . . . , n.
k
n−k
Stat 400
Homework 4, Page 2 of 4
Due: Friday 17th , 2017
(b) Suppose the student gets 1 point for each correct answer and loses 1 point for
each wrong answer. What is the expectation and the standard deviation of his/her
grade? Remark: Non-positive scores are allowed.
Solution: Let Y be the grade of the student. Then, Y = 1 · X + (−1) · (6 − X) =
2X − 6. Consequently, from the linearity of the expectation we have
E[Y ] = E[2X − 6] = 2 E[X] − 6 = 0.
On the other hand,
σY = σ2X−6 = 2 · σX = 2 · 1.225 = 2.45
(c) Let Y be the student’s grade. Only one of the following is a well-defined random
variable:
p
√
Y , log(Y ), 1/Y, exp{Y }.
Explain which one it is, and compute its expected value.
Solution: Since Y = 2X − 6 and the space of X is X(S) = {0, 1, . . . , 6}, then it is clear
that the space of Y is Y (S) = {−6, −4, −2, 0, 2, 4, 6}, and its pmf is
6
6
1
fY (2x − 6) = P(Y = 2x − 6) = P(X = x) = fX (x) =
,
x
2
x = 0, 1 . . . , 6.
√
Note that Y takes negative values, and it can also be 0. This means that Y is not
well defined, because it does not make sense when Y takes negative values. Similarly,
log(Y ) is not valid, because it does not make sense when Y is negative
or 0. On the
p
other hand, 1/Y is not well-defined because Y can be 0. Therefore, exp{Y } is the only
transformation of Y from the ones given above that is well-defined. Now, its expectation
can be computed as follows in term of the pmf of Y :
X p
p
exp(y) fY (y)
E[ exp(Y )] =
y∈Y (S)
6
X
p
=
exp(2x − 6) fX (x)
x=0
p
p
p
p
= exp(−6) · fX (0) + exp(−4) · fX (1) + exp(−2) · fX (2) + exp(0) · fX (3)
p
p
p
+ exp(2) · fX (4) + exp(4) · fX (5) + exp(6) · fX (6) = 2.06.
2. Tom pays Mary $c to play the following game: a die will be rolled and Mary will pay
Tom 2 · X, where X is the outcome of the die.
(a) Compute the expected value and the standard deviation of X.
Stat 400
Homework 4, Page 3 of 4
Due: Friday 17th , 2017
Solution: Since the die is fair, the pmf of X is
fX (x) = 1/6,
x = 1, . . . , 6,
therefore
E[X] =
6
X
x=0
6
X
x fX (x) =
1+2+3+4+5+6
= 21/6 = 3.5
6
12 + 22 + 32 + 42 + 52 + 62
= 91/6
6
x=0
p
Var[X] = E[X 2 ] − (E[X])2 ≈ 2.91 ⇒ σX = Var[X] = 1.71.
E[X 2 ] =
x2 fX (x) =
(b) Compute the expected value and the standard deviation of each player’s profit as
a function of c.
Solution: Call Y Tom’s profit. Then, Y = 2X − c, and from the linearity of the
expectation we have
E[Y ] = E[2X − c] = 2E[X] − c = 2 · 3.5 − c = 7 − c.
Moreover,
σY = σ2X−c = 2 · σX = 2 · 1.71 = 3.42.
On the other hand, Mary’s profit is -Y and consequently E[−Y ] = −E[Y ] = −7 + c
and σ−Y = σY = 3.42.
(c) Find the value of c such that the game is “fair”, in the sense that the expected
value of the profit of each player is equal to 0.
Solution: For the game to be fair, i.e., the expected value of the profit of both
players to be equal to 0, c = 7.
3. A random sample of 4 people will be taken from a population of 5 men and 5 women.
Compute the expected value and the standard deviation of the number of men selected.
Remark: Can you guess the expected number of men selected before you do any computations?
Solution: Let X represent the number of men in the sample. Then,
5 5
1
5
5
x 4−x
=
fX (x) =
, x = 0, . . . , 4.
10
210
x
4
−
x
4
Stat 400
Due: Friday 17th , 2017
Homework 4, Page 4 of 4
Consequently,
E[X] =
4
X
x fX (x)
x=0
5 5
5 5
5 5
5 5
5 5
1
0·
+1·
+2·
+3·
+4·
=
210
0 4
1 3
2 2
3 1
4 0
1
=
[50 + 200 + 150 + 20] = 2,
210
which is quite intuitive as the number of men and women in the population is the same,
and the sample is taken at random. Similarly,
2
E[X ] =
4
X
x2 fX (x)
x=0
1
5 5
5 5
5 5
5 5
5 5
2
2
2
2
2
=
0 ·
+1 ·
+2 ·
+3 ·
+4 ·
210
0 4
1 3
2 2
3 1
4 0
1
=
[50 + 400 + 450 + 80] ≈ 4.67
210
and consequently
Var[X] = E[X 2 ] − (E[X])2 = 4.67 − 4 ≈ 0.67
⇒
σX =
p
Var[X] = .82.