Let \(R \sim \text{Uniform}(1, 6)\) and \(W \sim \text{Uniform}(1, 6)\). Suppose \(A = \{R + W \geq 10\}\).

Estimate in R the probability \(\mathbb{P}[A]\).

Determine the true population probability \(\mathbb{P}[A]\).

Consider the following game. A box contains four chips. Two chips are labeled 2, one 4, and one 8. Two chips are drawn at random without replacement. The player wins $2 if the two chips have the same number, and loses $1 otherwise.

Simulate many rounds of this game in R and store the amount of money won in each round in a vector. Hint: consider a for loop and don’t forget to pre-allocate memory.

Make a table of proportions of the outcomes (in $) of this game.

Using ggplot, plot this table of proportions. Label the x-axis “Winnings” and the y-axis “Probability”. Hint: load the library ggplot2, and then type

`?labs`

.Estimate the expected value of the amount of money won in this game.

Determine the density function of the amount of money won by the player in this game. That is, calculate the associated probability for each amount that could be won in this game.

Calculate the true population expected value of the amount of money won in this game.

Would you play this game? Why or why not?

In general, statisticians define a fair game to be a game that has expected value of 0. Instead of $2, what amount of money does a player need to win in a single round for this game to be fair?

Let \(X \sim \text{Bernoulli}(p = 1/2)\). Recall that consecutive flips of a fair coin are independent.

What’s the probability of the event HTTH?

What’s the probability of the event THHT?

What’s the probability that exactly two, any two, of four flips are H?

Simulate the probability that exactly two, any two, of four flips are H.

How many heads do you expect to see in 4 flips? 8 flips? 10 flips? 11 flips?

Perform a simulation study to build evidence for your answers above.

Let \(X \sim \text{Bernoulli}(p = 1/3)\).

What’s the probability of the event HTTH?

What’s the probability of the event THHT?

What’s the probability that exactly two, any two, of four flips are H?

Simulate the probability that exactly two, any two, of four flips are H.

How many heads do you expect to see in 4 flips? 8 flips? 10 flips? 11 flips?

Perform a simulation study to build evidence for your answers above.