Inference for Two Proportions: Hypothesis Testing and Confidence Intervals
Cumulative Review and Overview of Two-Sample Inference
One-Sample Inference Review (Chapters 7 and 8):
- Proportions:
- Null hypothesis format: (where is a specific hypothesized value, such as ).
- Alternate hypothesis format: , , or .
- Hypothesis test calculator function:
1-PropZTestunder theSTATTESTSmenu. - Confidence interval calculator function:
1-PropZIntunderSTATTESTS(orSTATINTRVL).
Means:
- Null hypothesis format: .
- Alternate hypothesis format: , , or .
- Hypothesis test calculator function:
T-Test. - Confidence interval calculator function:
TInterval.
Study Strategy for Statistical Calculator Functions:
- Maintain an active reference table summarizing all functions found in
STAT TESTSandSTAT INTRVL, recording the name of each function and its specific statistical application. - Mastery of these distinctions is essential for Exam 4 (covering Chapters 8 and 9) and the cumulative Final Exam.
- Guiding proverb: "When is the best time to plant a tree? Thirty years ago. When is the next best time to plant a tree? Today."
- Maintain an active reference table summarizing all functions found in
Transition to Two-Sample Inference (Chapter 9):
- Two-sample inference involves evaluating two distinct populations by drawing two independent samples to compare parameters.
- Chapter 9.1 focuses on comparing two population proportions ( and ).
- Chapter 9.2 focuses on comparing two population means ( and ).
- Foundational decision rules remain constant: setting up null and alternative hypotheses, calculating test statistics, comparing the against the significance level (), and deciding whether to reject or fail to reject the null hypothesis.
Foundations of Hypothesis Testing for Two Proportions
Notation for Two Proportions:
- Population 1 (Group 1):
- : Population proportion of successes.
- : Sample size.
- : Number of successes observed in sample 1.
- : Sample proportion calculated as .
- : Sample complement proportion calculated as .
- Population 2 (Group 2):
- : Population proportion of successes.
- : Sample size.
- : Number of successes observed in sample 2.
- : Sample proportion calculated as .
- : Sample complement proportion calculated as .
- Pooled Sample Proportion ():
- Combines successes and sample sizes across both groups into a single combined sample:
- The pooled complement is .
- Serves as the weighted estimate of the common proportion under the assumption that .
- Computed automatically by graphing calculators and statistical software; manual computation is not required.
Assumptions and Requirements:
- The sample proportions must originate from two simple random samples.
- The two samples must be completely independent of one another. The selection of subjects in the first sample must have no relationship or pairing with subjects in the second sample (e.g., individuals are not husbands and wives, siblings, or pre/post test pairings).
- Normal approximation requirement: Each sample must contain at least 5 successes and at least 5 failures:
- Alternatively stated directly using counts: , , , and .
Structure of Hypotheses for Two Proportions:
- Unlike single-proportion tests where the null hypothesis tests a specific numerical percentage, tests for two proportions always test for equality:
- The null hypothesis posits that there is no difference between the two population proportions ().
- The alternative hypothesis depends on the directional claim being evaluated:
- Two-tailed test:
Left-tailed test:
Right-tailed test:
Mathematical Formulation and Test Statistic
Parameter and Sampling Distribution:
- Parameter being tested: The difference between two population proportions, expressed as .
- Sampling distribution: Standard normal distribution ( distribution).
Test Statistic Formula:
- Any standardized represents:
- For two independent proportions, the formula is:
- Because the null hypothesis assumes , the hypothesized difference is identically .
- The test statistic measures how many standard deviations the observed sample difference lies away from the expected difference of zero.
Calculator Implementation:
- Calculator function:
2-PropZTest(typically option6in theSTATTESTSmenu). - Calculates the test statistic () and the automatically using pooled proportions in the standard error calculation.
- Calculator function:
Case Study: Front and Rear License Plate Compliance
Context and Background:
- States vary in vehicle registration display requirements. For example, Florida requires only a single rear license plate, whereas Connecticut and New York both mandate that drivers display both a front and a rear license plate.
- In Connecticut and New York, operating a passenger motor vehicle with only a rear license plate is illegal and subject to traffic citations.
- The study measures the rate of non-compliance (illegal driving with rear plates only) across both commuting states.
- A "success" is statistically defined as an event meeting the condition under study—in this scenario, a vehicle displaying a rear plate only (operating illegally).
Sample Data Collection:
- Group 1 (Connecticut):
- Total sample size:
- Vehicles with rear plate only (successes):
- Vehicles with front and rear plates (failures):
- Sample proportion: ( or )
- Group 2 (New York):
- Total sample size:
- Vehicles with rear plate only (successes):
- Vehicles with front and rear plates (failures):
- Sample proportion: ( or )
Homework Assignment Warning Regarding Subscript Assignment:
- Homework problems may intentionally designate the second listed group in a table as Sample 1 and the first as Sample 2.
- Reversing the groups produces numerical values that have the opposite algebraic sign.
- Default exam protocol: The first population mentioned represents Group 1; the second represents Group 2.
Verification of Requirements:
- Simple random sampling: Confirmed.
- Independent samples: Confirmed; individual cars observed across states are unrelated.
- Large sample size check (at least 5 successes and 5 failures per group):
- Connecticut successes:
- Connecticut failures:
- New York successes:
- New York failures:
- All criteria are fully satisfied.
Hypothesis Testing via the P-Value Method
Claim and Hypotheses Formulation:
- Claim: Connecticut and New York have the same proportion of cars with rear license plates only.
- Significance level: .
- Symbolic hypotheses:
Because the claim asserts equality, it resides in the null hypothesis ().
The alternative hypothesis contains , establishing a two-tailed hypothesis test.
Calculator Input (
2-PropZTest):- Access
STATTESTS6: 2-PropZTest. - Enter variables:
- Alternative hypothesis: select .
- Highlight
Calculateand pressENTER.
- Access
Calculator Output:
- Test statistic: (Always explicitly specify the variable name: ).
- reading on screen:
1.190509E-12.
Interpretation of Scientific Notation in P-Values:
- The in denotes probability, which mathematically cannot exceed .
- A value of
1.1905is an impossible probability. The exponentE-12denotes scientific notation (), requiring the decimal point to be shifted 12 positions to the left:
Decision and Statistical Significance:
- Decision rule comparison:
- Decision mnemonic: "If the is low, the null must go."
- Statistical decision: Reject the null hypothesis ().
- A test statistic of indicates that the observed sample difference is over 7 standard deviations away from the hypothesized difference of zero, making the difference highly statistically significant.
Formal Conclusion:
- Because the null hypothesis is rejected and the claim was in , the conclusion must use the "warrant rejection" structure.
- Conclusion statement: "There is sufficient evidence to warrant rejection of the claim that Connecticut and New York have the same proportion of cars with rear license plates only."
Hypothesis Testing via the Critical Value Method
Execution Protocol:
- Required whenever an assessment specifies the critical value method and demands an accompanying sketch of the distribution.
Distribution Setup and Critical Values:
- Distribution: Standard normal distribution ( distribution) centered at .
- Significance level: for a two-tailed test.
- The total critical area of is split evenly between the two tails:
- Left tail area:
- Right tail area:
- Critical values from standard normal tables:
- Left critical value:
- Right critical value:
Graphing and Plotting the Test Statistic:
- Sketch a standard bell curve centered at .
- Mark and shade the critical regions beyond on the left and on the right.
- Plot the calculated test statistic () on the horizontal axis.
- The test statistic lies far inside the right-hand critical (rejection) region ().
Decision:
- Because the test statistic falls within the critical region, the statistical decision is to reject the null hypothesis ().
- The critical value method and the method are mathematically equivalent and will always yield identical decisions.
Confidence Interval Method for Two Proportions
Parameter Estimated:
- The confidence interval for two proportions estimates the true difference between the two population parameters: .
- Format of the interval:
Relationship Between Alpha and Confidence Level:
- For a two-tailed hypothesis test, the confidence level () is the complement of the significance level ():
- For , the corresponding confidence level is ().
Calculator Implementation (
2-PropZInt):- Access
STATTESTSB: 2-PropZInt(or look underSTATINTRVL). - Variables carry over from the test run:
C-Level: manually set or verify0.95.- Select
Calculate.
- Access
Confidence Interval Output:
- Limits rounded to three decimal places:
- Formally written as:
Interpretation Rules for Difference Intervals ():
- Interval does NOT contain zero (both limits positive or both limits negative):
- Indicates that is not a plausible value for the difference between the two proportions ().
- Conclusion: There IS a statistically significant difference between the two population proportions.
- Interval DOES contain zero (lower limit is negative, upper limit is positive):
- Indicates that a difference of zero is plausible (, meaning ).
- Conclusion: There is NOT a statistically significant difference between the two population proportions.
Application to Case Study:
- The interval consists entirely of positive numbers and does not cross over zero.
- Interpretation: There is a statistically significant difference between the proportion of cars with rear license plates only in Connecticut and the proportion in New York.
- Consistency check: This conclusion matches the decision to reject the null hypothesis reached via the and critical value methods.
- Boundary caveat: Discrepancies between hypothesis testing and confidence intervals for proportions can rarely occur when the is extremely close to the threshold (e.g., or ).
Interpretation of Software Output (StatDisk)
- Key Components from StatDisk Output:
- Test Statistic: Clearly listed as
Test Statistic, z = 7.11. - P-Value: Displayed as
p-value = 0.0000(or0). - Confidence Interval: Displayed as
95% Confidence Interval: 0.083 < p1 - p2 < 0.118.
- Test Statistic: Clearly listed as
- Regardless of software package or calculator platform, extracting the test statistic, , and confidence interval limits follows the identical analytical process.
Questions & Discussion
- Graphing Calculator Error During Test Execution (
Drawvs.Calculate):- Audience Query: When selecting
Drawinstead ofCalculatein the2-PropZTestmenu, an error message appears and the graph will not display. Is this caused by missing list data in the calculator? - Response: While certain test functions depend on lists, the primary culprit for a
Drawfailure in these distribution tests is competing equations stored in the function list. Navigating to theY=screen often reveals residual, complex functions (e.g., trigonometric or logarithmic expressions) that the calculator attempts to graph simultaneously. Clearing all expressions inY=typically resolves the error. However, the standard recommendation is to bypassDrawentirely and useCalculate, which reliably produces the numerical output without graphical conflicts.
- Audience Query: When selecting