Topic 9 - Hypothesis Testing Flashcards
L.O.
LO7 [capstone] Given real multivariate data and a problem, formulate an appropriate hypothesis and perform a range of hypothesis tests.
LO8 Interpret the p-value, conscious of the pitfalls associated with testing.
Proportion Tests
Used to determine if the percentage of a certain outcome in a sample differs significantly from an expected proportion.
- Type of hypthesis test
HATPC framework
H: Hypothesese
A: Assumptions
T: Test statistic
P: P-Value
C: Conclusion
H: Null and Alternate Hypotheses
H0:
Assumes that the differnce between the OV and the EV is due to chance alone
- Describes the defult scenario, nothing new occuring
Contains: =
H1:
Assumes that the differnce between the OV and the EV is NOT due to chance alone
- Describes what we think is happening
Contains: ≠ < >
A: Assumptions
If assumptions not stated, the conclusions given by the Hypothesis Test is NOT transparent
- If assumptions are not justified, conclusion may be invalid
- The assumptions are statistically driven and not just assumed by us
T: Test Statistic
A standardised measure of how far away of what we observe is from what we expected.
Test Stat =
(OV - EV) / SE
P: P-value
- A way of weighing up whether a sample is consistant with H0.
P-value = Probability of observing the test statistic if H0 is true.
C: Conclusion
Interpret the p-value to accept/ reject the H0 and H1.
P> 0.05 = retain H0 (greater than)
P< 0.05 = reject H0 (less than)
Meaning of the test statistic
Shows the number of standard errors away from the EV.
eg. (26 - 23.2) / 2.2
= 1.3
The OV is 1.3 SE away from EV.
This can then be worked into a P-value
Finding P-value from test statistic when Test stat = 1.3
P value is the chance of observing 1.3 or more extreme under the H0.
Using Pnorm in R:
P(test stat) ≈ 0.097
Size of the P-value
The significance of the P-value is determined by the predefined threshold α (by convention 0.05)
If the P-value is 0.097, then P> 0.05,
The H0 is retained
C: Conclusion
Statistical conclusion:
Since a P> 0.05, we must retain the H0.
If P< 0.05, we must reject H0.
Effect of H1 on the P-value
One sided H1:
- Specifies the direction of H1.
- eg. p>0.8
Two sided H1:
- Does NOT specify the direction
- eg. p≠0.8
- In this case, we must double the P value to account for both sides.