Homework 5
due Friday, May 3
1. Sketch a graphof the pdf of a binomial random variable with
a) n = 10, p = .5
b) n = 10, p = .1
On both, indicate the location of the mean.
2. a) Show that the expected value of a constant is a constant. In
other words, if a is a constant, E(a) = a.
b) Show E(aX) = aE(X). Show that Var(aX) = a2 Var(X).
3. Run the roulette simulation in R.
(See handout #5 for code.)
a) After 10 plays, what is the SD of the "wins"? After 100? What's
the theoretical SD?
b) Suppose you play 10 times. What's the probability that your total
winnings will be positive? (In other words, the probability that you
will win money rather than lose it?) Don't solve this theoretically
(which is hard). Instead, use the simulation to find an empirical
probability. You should do at least 1000 simulations. (
Here's a hint for code to help you do this
.)
c) Suppose you play 100 times. Is your probability that the winningns
will be positive going to be larger or smaller than when you played only
10 times? Why?
d) simulate 100 plays and check your answer to (c).
5. Use the definition of variance, Var(X) = E(X - E(X))2
to derive the "short cut" formula: Var(X) = E(X2) - E(X)
2.
6. Let X1, ..., Xn represent bernoulli trials
with probability of success p. (For example, X1 is a "1" if the first
coin-flip comes up heads, X2 is the outcome of the second coin flip, etc.)
Then Y = X1 + X2 + .. +Xn is binomial. (Make sure you understand why.)
a) Derive a formula for the expected value of Y in terms of n and p.
b) Derive a formula for the standard deviation of Y in terms of n and
p.
7 For a binomial RV with n = 10 and p = .4, the mean is 4 and the
SD is about 1.55.
a) Find the probability that the random variable will be within one SD
of the mean. That is, find
P(2.45 < X < 5.55)
b) Now consider a normal random variable Y with the same mean and SD as
X. Find P(2.45 < Y < 5.55). Are the two probabilities
close?
c) As you can see from problem 6, X is a linear combination of RVs (bernoulli
RVs), and therefore should have an approximate normal distribution for n
sufficiently large. Consider a binomial RV X with p = .4. Increase
n to 20, and compare the probability that it is within 1 SD of its mean to
the probability that a normal RV Y with the same mean and SD is within the
same limits. Is it closer than before?
d) Check for n = 100 and n = 1000.
e) The standard rule of thumb is that, for the normal approximation to
be "sufficient", we need np > 10 AND n(1-p) > 10. How did this
work out for this problem?
f) Check the rule of thumb for a binomial RV with p = .1.
8. From Chapter 4: 37,38, 40, 43,50,51,56, 62