to a two-item array containing the chance of
heads as the first element and the chance of tails as the second element under Gary’s model. Make
sure your values are between 0 and 1.
We believe Gary’s model is incorrect. In particular, we believe there to be a smaller chance
of heads. Which of the following statistics can we use during our simulation to test between the
model and our alternative? Assign
to the correct answer.
1. The distance (absolute value) between the actual number of heads in 10 flips and the ex-
pected number of heads in 10 flips (5)
2. The expected number of heads in 10 flips
3. The actual number of heads we get in 10 flips
Define the function
, which, given a sample size
and an array of model proportions (like the one you created in Q1), returns the number of heads
in one simulation of flipping the coin under the model specified in
Think about how you can use the function