Model: Hypothesis Tests for Proportions with StatKey
Hypothesis Test for a Population Proportion
For a hypothesis test for a proportion in StatKey we need the sample size, the count of favorable occurrences, the null hypothesis, and the significance level.
- Go to StatKey and select Randomization Hypothesis Tests: Test for Single Proportion.
- Choose the appropriate data set, or select Edit Data to enter your own count and sample size.
- Enter the null hypothesis value.
- Generate at least 5000 samples
- Select the appropriate test: `square` Left tail, `square` Two tail, `square` Right tail
- Then enter the appropriate significance level: 0.025 or 0.05 or something else.
- Draw a picture of this noting the resulting critical value on your number line.
- Make a decision:
- Is your sample proportion in the red region (the critical region)? Yes? The Reject the Null
- Is your sample proportion in the black region (the expected region)? Yes? Fail to reject the Null
- Calculate the p-value.
- Replace the critical number with your sample proportion. (the number below the significance level on the x-axis)
- Add this to your picture.
- Re-affirm your decision based on the p-value:
- Is the p-value less than the significance level? Yes. Then definitely reject the null hypothesis
- Is the p-value greater than the significance level? Yes? Then fail to reject the null hypothesis
Example:
In a recent survey by The Economist magazine, President Trump's approval rating is estimated to be about 42%.
A random sample of 50 North-East Oregon residents had 24 who approve of the Presidents performance.
`H_0` : `p=0.42`
`H_a` : `p!=0.42`
Although I could have picked an alternative hypothesis of >, I chose not equal instead.
I am going to choose a significance level of 5% since this is important, but not too important.
Enter the data into StatKey to get a sampling distribution to test the hypotheses:
Go to StatKey and select Randomization Hypothesis Tests: Test for Single Proportion
Edit Data to enter my count, `x=24` , and sample size, `n=50` .
Enter my null hypothesis value.
Generate 1000s of samples.
Select the Two Tail test.
Enter my significance level.
My sample proportion, 0.48, is not in the red zone. The test is negative, e.i., I do NOT have evidence that Economist's estimate is different in Eastern Oregon.
To get the p-value, I then replace the right critical number that StatKey gave me, 0.56, with my sample proportion, 0.48.
According to StatKey, the p-value is 0.474. In a two tail test, the p-value is the sum of both tails.
Interpretation of the p-value: The chance of finding another sample with a proportion higher than 0.48 or lower than 0.36, assuming that the actual proportion should be 0.42, is about 47.4%.
Decision: Fail to reject the null hypothesis.
Conclusion: We do NOT have sufficient evidence that the President's approval rating in North-Eastern Oregon is different than 42%.