The four-step process for a hypothesis test is: State, Plan, Do, Conclude.
Null hypothesis assumes no difference: Hβ: p_G β p_PL = 0
Alternative hypothesis depends on the research question (e.g., Hβ: p_G β p_PL < 0 for a one-sided test).
Use the combined (pooled) proportion pΜ_c to calculate the standard error when the null assumes no difference.
The z statistic standardizes the difference in sample proportions:
z = (pΜβ β pΜβ β 0) / standard error
P-values are compared to the significance level to decide whether to reject the null.
Interpretation: P-value represents the probability of observing a difference as extreme as the sample, assuming the null is true.
Hi everyone, Mr. Antonucci here. In this video, weβll put everything together and actually calculate a two-sample Z test for a difference in population proportions.
The Helsinki Heart Study recruited middle-aged men with high cholesterol but no history of serious medical problems to investigate whether a cholesterol-reducing drug (Gem) could lower the risk of heart attacks.
251 men took Gem (treatment group)
2030 men took a placebo (control group)
During the next 5 years:
56 men in the Gem group had heart attacks
84 men in the placebo group had heart attacks
Research question: Does this study provide convincing evidence at Ξ± = 0.01 that Gem is effective in preventing heart attacks?
Define parameters and hypotheses:
p_G = true heart attack rate for middle-aged men taking Gem
p_PL = true heart attack rate for middle-aged men taking placebo
Null hypothesis:
Hβ: p_G β p_PL = 0
Alternative hypothesis:
Hβ: p_G β p_PL < 0
Significance level: Ξ± = 0.01
Note: When stating parameters, always provide context for clarity.
Test: Two-sample Z test for a difference in proportions
Random condition: Subjects were randomly assigned to Gem or placebo, so satisfied.
10% condition: Not needed for experiments with randomized assignment rather than sampling without replacement.
Large counts condition: Calculate the combined (pooled) proportion:
pΜ_c = (number of successes in both groups) / (sum of both sample sizes)
Then check expected successes and failures for each group using pΜ_c. All expected counts must be β₯ 10.
Calculate sample proportions:
pΜ_G = 56 / 251 β 0.237
pΜ_PL = 84 / 2030 β 0.414
Calculate z statistic:
z = (pΜ_G β pΜ_PL β 0) / standard error β β2.47
Find P-value:
Since Hβ is one-sided (< 0), we calculate the area below z = β2.47.
Using a calculator: normal CDF β P β 0.00675
Using Table A: P β 0.0066
No need to multiply by 2 because this is a one-sided test.
Compare P-value to Ξ±: 0.00675 < 0.01 β reject Hβ
Conclusion in context: There is convincing evidence that the heart attack rate is lower for middle-aged men taking Gem compared to those taking placebo.
Assuming the null hypothesis is true (Gem is not more effective than placebo):
There is a 0.00675 probability of observing a difference in heart attack rates between the Gem and placebo groups of 0.141 or less by chance alone.
This explains what the P-value means in context.
Thatβs it! This demonstrates the full four-step process for a two-sample Z test for a difference in proportions.
Hope that was helpful. Take care.
UP Next:Β