# Worksheet 17: Hypothesis testing

Your name:

Your student ID number:

## Dream cheating

Each time you trade, there is a $\frac{20}{423} \approx .0473$ probability that the piglin will give you an ender pearl. In 262 trades, Dream got ender pearls 42 times. Did dream cheat?

1. What is are the null and alternative hypotheses for Dream's results?



2. To compute a p-value for Dream's results:

    a. What should be the "probability of success"?

    b. What should be the "number of trials"?

    c. What value will we compare the simulated data to?

## More minecraft

Suppose that in 400 trades, you only got 15 Ender pearls. Is the game unfair against you?

3. What are the null and alternative hypotheses for your results?



4.  To compute a p-value for your results:

    a. What should be the "probability of success"?

    b. What should be the "number of trials"?

    c. What value will we compare the simulated data to?


5. What were some difference between the p-value calculation for Dream's results and the p-value calculation for your results?



## Non-directional hypotheses

*MythBusters* wanted to see if toast was more likely to land "butter side up" or "butter side down." They built a toast dropping rig and dropped 48 pieces of buttered toast.

6. What is the null hypothesis?



7. What are some reasons why the null hypothesis could be false?





## Type 1 and type 2 errors

8. In the Dream cheating example:

    a. How would you describe a type 1 error in English?

    

    b. How would you describe a type 2 error in English?



8. Can we know for sure if we have made a type 1 or type 2 error?



9. Can we know for sure if we have made a type 1 or type 2 error? Why or why not?

 

10. How could we make sure that we *never* make a type 1 error? Would this be a good idea?



11. If we made the threshold smaller (0.01 instead of 0.05), then what would happen to the type 1 and type 2 error rates?



12. In the Chimpanzee problem-solving study:

a. What is the power when the sample size is 8 and the alternative is $\pi=0.75$?

b. What is the power when the sample size is 8 and the alternative is $\pi = 0.9$?

c. What is the power when the sample size is 16 and the alternative $\pi = 0.75$?

