Expectation and Variance Solutions
STAT-UB.0103 Statistics for Business Control and Regression Models
Random variables (review)
1. Let X be a random variable describing the number of cups of coffee a randomly-chosen NYU
undergraduate drinks in a week. Suppose that there is a 10% chance that the student has one
cup of coffee, 30% chance that the student has two cups of coffee, 40% chance that the student
has 3 cups of coffee, and a 20% chance stat the student has four cups of coffee.
(a) Let p(x) be the probability distribution function of X. Fill in the following table:
x
1
2
3
4
p(x)
Solution:
x
p(x)
1
.10
2
.30
3
.40
4
.20
(b) Find E(X), the expectation of X.
Solution:
E(X) = (.10)(1) + (.30)(2) + (.40)(3) + (.20)(4)
= 2.7.
(c) What is the interpretation of the expectation of X?
Solution: The long-run sample mean. If we performed the random experiment upon
which X is measured many times, getting a different value of X each time, then the
sample mean would be very close to the expectation of X.
Variance and Standard Deviation
2. This is a continuation of problem 1.
(a) Find var(X) and sd(X), the variance and standard deviation of X.
Solution:
var(X) = (.10)(1 2.7)2 + (.30)(2 2.7)2 + (.40)(3 2.7)2 + (.20)(4 2.7)2
= .81.
The standard deviation of X is given by
p
sd(X) = var(X) = 0.9.
(b) What is the interpretation of the standard deviation of X?
Solution: The long-run sample standard devation. If we performed the random experiment upon which X is measured many times, getting a different value of X each
time, then the sample standard deviation would be very close to the standard deviation of X. If the PDF of X is symmetric and mound-shaped, we can use the empirical
rule to make predictions about the value of X.
Page 2
3. Consider the following game:
1. You pay $6 to pick a card from a standard 52-card deck.
2. If the card is a diamond (), you get $22; if the card is a heart (), you get $6; otherwise,
you get nothing.
Perform the following calculations to decide whether or not you would play this game.
(a) Let W be the random variable equal to the amount of money you win from playing the
game. If you lose money, W will be negative. Find the PDF of W .
Solution: The sample points corresponding to the suit of the card are , , , and
; each of these has probability 41 . The values of the random variable W corresponding
to the sample points are as follow:
Outcome
-6
0
-6
16
Thus, the PDF of W is given by the table:
w
-6
0
p(w) 0.50 0.25
16
0.25
(b) What are your expected winnings? That is, what is , the expectation of W ?
Solution:
Using the PDF computed in part (a), the expected value of W is
= (.50)(6) + (.25)(0) + (.25)(16)
= 1.
On average, we win $1 every time we play the game.
Page 3
(c) What is the standard deviation of W ?
Solution:
Using the PDF computed in part (a), and the expected value computed in part (b),
we compute the variance of W as
2 = (.50)(6 1)2 + (.25)(0 1)2 + (.25)(16 1)2
= 81.
Thus, the standard deviation of W is
=
81 = 9.
(d) What are the interpretations of the expectation and standard deviation of W ?
Solution: If we played the game many many times, then the average of our winnings
over all times we played would be close to the $1, and the standard deviations of our
winnings over all times we played would be close to $9.
Page 4
Properties of Expectation and Variance
4. Affine Transformations. Let X be a random variable with expectation X = 2 and standard
deviation X = 3.
(a) What is the expectation of 5X + 2?
Solution:
5X + 2 = 12.
(b) What is the standard deviation of 5X + 2?
Solution:
|5|X = 15.
5. Sums of Independent Random Variables. Let X and Y be independent random variables
with X = 1, X = 3, Y = 5, Y = 4.
(a) What is E(X + Y )?
Solution:
E(X + Y ) = X + Y = 1 + (5) = 4.
(b) Find var(X + Y ) and sd(X + Y ).
Solution:
2
var(X + Y ) = X
+ Y2 = (3)2 + (4)2 = 25,
p
sd(X + Y ) = var(X + Y ) = 5.
6. Let X and Y be independent random variables with X = 2, X = 1, Y = 3, Y = 4.
(a) Find the expectation and standard deviation of 3X + 2.
Solution:
E(3X + 2) = 3X + 2 = 3(2) + 2 = 8,
sd(3X + 2) = | 3|X = 3(1) = 3.
Page 5
(b) Find the expectation and standard deviation of X + Y .
Solution:
E(X + Y ) = X + Y = 1,
2
var(X + Y ) = X
+ Y2 = (1)2 + (4)2 = 17,
p
sd(X + Y ) = var(X + Y ) = 17.
(c) Find the expectation and standard deviation of 3X + Y + 2.
Solution:
E(3X + Y + 2) = 3X + Y + 2 = 11,
2
var(3X + Y + 2) = (3)2 X
+ Y2 = (3)2 (1)2 + (4)2 = 25,
p
sd(3X + Y + 2) = var(3X + Y + 2) = 5.
Page 6
Advanced Problems
7. Bernoulli random variable. Suppose you flip a biased coin that lands Heads with probability
p and lands tails with probability 1 p. Define the random variable
(
1 if the coin lands Heads;
X=
0 if the coin lands Tails.
This random variable is called a Bernoulli random variable with success probability p.
(a) What is the PDF of X?
Solution:
x
p(x)
0
1p
1
p
(b) Find , the expectation of X
Solution:
= (1 p)(0) + (p)(1) = p.
(c) Find 2 , the variance of X.
Solution:
2 = (1 p)(0 p)2 + (p)(1 p)2 = p(1 p).
8. Suppose you have a biased coin that lands Heads with probability p and lands Tails with
probability 1 p. You flip the coin 2 times. Let Y be the number of times the coin lands
Heads.
(a) What is E(Y )?
Solution:
E(Y ) = p + p = 2p.
(b) What is var(Y )?
Hint: Y = X1 + X2 , where X1 and X2 are independent Bernoulli random variables corresponding to the 2 coin flips. Use the answer to problem 7(c).
Solution:
var(Y ) = p(1 p) + p(1 p).
Page 7
(c) Suppose instead that you flip the coin n times, and let Y count the number of Heads.
What are the expectation and variance of Y ?
Hint: Y = X1 + X2 + + Xn .
Solution:
E(Y ) = np;
var(Y ) = np(1 p).
Page 8