Lecture 21
Examples
DATA 8
Spring 2023
Announcements
Weekly Goals
P-Values and Error Probabilities
Discussion Question
There are 2000 students in Data 8. Each student tests
Null: The coin is fair
Alternative: The coin is unfair
Suppose all coins are fair. About how many students will conclude that their coins are unfair?
(Demo!)
Can the Conclusion be Wrong?
Yes.
| Null is true | Null is False |
Test favors null | ✅ | ❌ |
Test rejects null | ❌ | ✅ |
The p-value cutoff is the probability of rejecting the null when it is actually true.
Not yet covered…power of a test.
Controll this by collecting more data
An Error Probability
Sir Ronald Aylmer Fisher [1890-1962] Pioneer of Modern Statistics
“It is convenient to take this point [5%] as a limit in judging whether a deviation is to be considered significant or not.” [Fisher 1925]
Choosing the �P-value Cutoff
“If one in twenty does not seem high enough odds, we may, if we prefer it, draw the line at one in fifty (the 2 percent point), or one in a hundred (the 1 percent point). Personally, the author [Fisher] prefers to set a low standard of significance at the 5 percent point …” [Fisher 1926]
P-value cutoff vs P-value
More on Hypothesis Tests
Discussion Question
Question: Do fewer people prefer Super Soda, or is this just chance?
Null hypothesis:
Alternative hypothesis:
Test statistic:
How to compute p-value:
(Demo)
Equal proportions of the population prefer Super Soda as Rival
Fewer people in the population prefer Super Soda than its Rival.
Number of people (out of 200) who prefer Super Soda
Probability of seeing 91 or fewer people who prefer Super Soda in a sample of 200 assuming the Null Hypothesis is true.
Guidelines for Writing Hypothesis
Null Hypothesis:
Alternative Hypothesis:
Null and alternative hypothesis can’t be true at the �same time. (Reject the Null → Alternative)
Hypothesis Test Concerns
The outcome of a hypothesis test can be affected by:
Hypothesis Test Effects
Number of simulations:
Number of observations:
Difference from the null:
(Demo)