Statistics Questions For Homework

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Homework 2

1. Suppose X and Y are independent random variables.


a. Prove the property stated in class: E(X ∗ Y ) = E(X) ∗ E(Y ).
b. Prove the property stated in class: V ar(aX + bY ) = a2 V ar(X) + b2 V ar(Y ).
c. Suppose X and Y have standard deviations of 3 and 4 respectively. What is V ar(2X + Y )?
2. Consider a game in which one rolls a single six-sided die until one accumulates a total of at least four
dots. Let X denote the number of rolls needed.
a. Find and draw the pmf of X.
b. Find and draw the cdf of X.
c. On average how many rolls do we need to accumulate a total of at least four dots?
3. Suppose a bit stream is subject to errors, with each bit having probability 0.1 of error and with the bits
being independent. Consider a set of four particular bits.
a. What is the probability that exactly 2 bits out of the four are erroneous?
b. How many erroneous bits do we expect out of these four?
c. What is the variance of the number of erroneous bits out of these four?
4. This problem involves a very simple model of the Internet. Suppose we have 10 websites linked with
each other. For each pair of websites, there is a link in between with probability 0.2. No website links
to itself. Assume that each pair of websites forms their link independently of the others. Find the
following:
a. What is the probability that the first website is linked to exactly 3 websites?
b. What is the variance of the number of websites linked to the first website?
c. What is the probability that the first website is linked to exactly 3 websites and the second website
is linked to exactly 2 websites? Notice the two events are not independent.
5. A civil engineer is collecting data on a certain road. She needs to have data on 25 trucks, and 10 percent
of the vehicles on that road are trucks. Assume vehicles being trucks or not are independent events.
a. What is the probability that she will need to wait for more than 200 vehicles to pass before
collecting enough data?
b. What is the expected number of vehicles she will need to wait before collecting enough data?
c. What is the variance of the number of vehicles she will need to wait before collecting enough data?
6. In a casino game, the player has 20 cards with the numbers 1 through 20 on them. The player selects a
set of 5 cards from the twenty. The caller announces 3 winning numbers, chosen at random from the
twenty. The amount won depends on how many of the called numbers match those the player chose.
a. What is the probability that among those 5 cards are 2 winning numbers?
b. On average how many winning numbers are there among those 5 cards?
c. Suppose the player win $10 if there is 1 matching number, win $30 if there are 2 matching numbers
and win $100 if there are 3 matching numbers. On average how much can the player win?
7. (Include your code for this problem) Suppose you are playing a game with your friend. You win the
game if you can get a total of 3 heads by flipping a fair coin six times.
a. Instead of using binomial distribution, you estimate your chance of winning by the following
simulation: you flip the coin repeatedly until you get a total of 3 heads, and record how many
coin flips you have done. Run the simulation 10000 times and histogram the number of coin flips
needed to get 3 heads.
b. How can you estimate your chance of winning by reading the histogram?
c. After reading the histogram, your friend complains this game is unfair and changes the rule. In
the new rule, you win the game if you can get 3 heads in a row by flipping a fair coin six times.
Similar to part (a) and (b), run 10000 simulations and histogram the number of coin flips needed
to get 3 heads in a row. Now what is your chance of winning?
8. (Include your code for this problem) A batch of cookie dough will be sliced up into 100 cookies and
then baked. 500 chocolate chips have been included in the batch of dough, and the dough has been
thoroughly mixed so as to randomize the ingredients. Use simulation to give approximate answers to
the following questions.
a. What is the chance that, despite these precautions, one or more cookies in the batch will contain

1
no chocolate chips?
b. On average how many cookies in the batch contain 2 or less chips?
Remark: Although problem 8 can be solved using Poisson approximation, this time you are required
to find the answer by simulating the underlying process. In real-world problems you will probably have
no closed-form formula for the underlying distribution. Nevertheless, the simulation approach is equally
applicable and easy to implement.

You might also like