Statistical Inference About Means and Proportions for Two Populations
Learning Objectives
Element 1 (LO 1): Describe and explain the distribution form and parameters of the sampling distribution of the difference between the sample means of two different populations.
LO 2: Calculate and interpret the interval estimate at a given level of confidence for a difference between two population means when the standard deviations of the two populations are known.
LO 3: Conduct a hypothesis test about the difference between two population means when the standard deviations of the two populations are known.
LO 4: Calculate and interpret the interval estimate at a given level of confidence for a difference between two population means when the standard deviations of the two populations are unknown.
LO 5: Conduct a hypothesis test about the difference between two population means when the standard deviations of the two populations are unknown.
LO 6: Conduct a hypothesis test about the difference between two population means when using a matched sample design.
LO 7: Calculate and interpret the interval estimate at a given level of confidence for a difference between two population means when using a matched sample design.
LO 8: Describe and explain the distribution form and parameters of the sampling distribution of the difference between the sample proportions of two different populations.
LO 9: Calculate and interpret the interval estimate at a given level of confidence for a difference between two population proportions.
LO 10: Conduct a hypothesis test about the difference between two population proportions.
Overview of Inferences About Two Populations
Statistical inference extends beyond single-sample analyses of a single population mean or proportion to comparative studies involving two distinct populations.
The prime parameter of interest is either the difference between two population means, denoted as μ1−μ2, or the difference between two population proportions, denoted as p1−p2.
Practical scenarios include:
Estimating the difference between the mean starting salary for a population of males and the mean starting salary for a population of females.
Testing for differences in quality between two suppliers by evaluating the proportion of defective parts produced by Supplier A versus Supplier B.
Independent random samples are selected separately from each population: a random sample of size n1 from Population 1 and an independent random sample of size n2 from Population 2.
Inferences About Two Population Means: σ1 and σ2 Known
Parameters and Independent Samples:
Let μ1 denote the mean of Population 1 and μ2 denote the mean of Population 2.
The population standard deviations σ1 and σ2 are assumed to be known prior to collecting the sample data.
Independent random samples of sizes n1 and n2 yield sample means xˉ1 and xˉ2.
Point Estimator:
The point estimator of the difference between the two population means is the difference between the sample means:
xˉ1−xˉ2
Sampling Distribution of xˉ1−xˉ2:
Mean: The expected value of the sampling distribution is:
E(xˉ1−xˉ2)=μ1−μ2
Standard Error (Formula 10.2):σxˉ1−xˉ2=n1σ12+n2σ22
Distribution Form: The sampling distribution of xˉ1−xˉ2 is normally distributed if both underlying populations follow a normal distribution, or if the sample sizes are sufficiently large (n1≥30 and n2≥30) that the Central Limit Theorem applies.
Interval Estimation Form:
General interval estimation formula: Point Estimate±Margin of Error.
Margin of Error (Formula 10.3):Margin of Error=zα/2σxˉ1−xˉ2=zα/2n1σ12+n2σ22
Home Styles Furniture Store Application (Interval Estimation):
Home Styles operates two furniture retail stores in Buffalo, New York: one located in the inner city (Population 1) and one located in a suburban shopping center (Population 2).
Management seeks to analyze demographic differences in customer age.
Historical demographic data establish known standard deviations: σ1=9years and σ2=10years.
Sample data collected:
Inner city: n1=36, xˉ1=40years
Suburban: n2=49, xˉ2=35years
Point estimate computation:
xˉ1−xˉ2=40−35=5years
At a 95% confidence level (α=0.05), the critical value is zα/2=z0.025=1.96.
Margin of error calculation:
1.963692+49102=1.963681+49100=4.06years
The 95% confidence interval is:
5±4.06years
Lower limit: 5−4.06=0.94years
Upper limit: 5+4.06=9.06years
Excel Worksheet Implementation for Interval Estimation (homestyle_mod):
Open data file homestyle_mod. Column A stores the age data for 36 inner city customers; Column B stores the age data for 49 suburban customers.
Descriptive statistics: entered into cells E5:F6.
Known population standard deviations: entered into cells E8 and F8.
Cell E9 standard error formula:
=SQRT(E8^2/E5 + F8^2/F5)
Confidence coefficient of 0.95 is entered into cell E11; level of significance α=1−confidence coefficient is computed in cell E12.
Cell E13 computes the critical value using the function NORMSINV.
Cell E14 calculates the margin of error by multiplying cell E13 by cell E9.
Cell E16 calculates the point estimate (xˉ1−xˉ2).
Cell E17 computes the lower limit (0.94); cell E18 computes the upper limit (9.06).
Test statistic computation:
t=12402+12442(325−286)−0=121600+12193639=2.27
Degrees of freedom computation:
df=12−11(12402)2+12−11(12442)2(12402+12442)2=21.8
Rounding down gives df=21.
From the t-distribution table with 21df, the value t=2.27 places the upper-tail area (p-value) between 0.01 and 0.025.
Because the p-value<0.05, reject H0.
Conclusion: The research supports the finding that the new software package provides a shorter mean completion time (noted in text phrasing as supporting a slower completion time differential relative to the null baseline).
Excel Data Analysis Tool (softwareredist / Figures 10.6 and 10.7):
Decision: Because p-value=0.0166<0.05, reject H0.
Robustness and Sample Size Guidelines:
The t-distribution procedure is robust to non-normality.
Total sample size n1+n2≥20 with equal or nearly equal sample sizes provides reliable results even with non-normal populations.
Larger sample sizes are required if data distributions exhibit substantial skewness or outliers.
Sample sizes smaller than 20 require verified approximate normality of the parent populations.
Inferences About Two Populations: Matched Samples
Study Design Comparison:
Independent Sample Design: Separate, unrelated random samples are assigned to each treatment/population.
Matched Sample Design: Each sampled element provides a paired pair of observations, receiving both treatments in a randomized order.
Primary Advantage: Testing treatments under identical conditions (using the exact same subjects) eliminates between-subject variability, reducing sampling error and increasing the precision of the estimator.
Hypothesis Formulation for Matched Samples:
Let di denote the observed difference for pair i.
Let μd denote the mean difference for the underlying population.
Null and alternative hypotheses:
H0:μd=0versusHa:μd=0
Manufacturing Task Completion Application:
A manufacturing company tests two production methods across a random sample of n=6 workers.
Decision: Because p-value=0.0795>0.05, do not reject H0.
Inferences About Two Population Proportions: p1−p2
Parameters and Estimators:
Let p1 denote the proportion in Population 1 and p2 denote the proportion in Population 2.
Samples of size n1 and n2 yield sample proportions pˉ1 and pˉ2.
Point Estimator (Formula 10.10):pˉ1−pˉ2
Standard Error (Formula 10.11):σpˉ1−pˉ2=n1p1(1−p1)+n2p2(1−p2)
Normality Assumption: The sampling distribution of pˉ1−pˉ2 is approximately normal if all four sample condition thresholds are met:
n1p1≥5,n1(1−p1)≥5,n2p2≥5,n2(1−p2)≥5
Interval Estimation:
Population proportions are unknown; sample proportions are substituted into the standard error formula.
Margin of Error (Formula 10.12):Margin of Error=zα/2n1pˉ1(1−pˉ1)+n2pˉ2(1−pˉ2)
Test whether error rates differ between Office 1 and Office 2 at α=0.10.
Hypotheses:
H0:p1−p2=0versusHa:p1−p2=0
Data: n1=250, pˉ1=0.14; n2=300, pˉ2=0.09.
Pooled estimator computation:
pˉ=250+300250(0.14)+300(0.09)=55035+27=55062=0.1127
Test statistic calculation:
z=0.1127(1−0.1127)(2501+3001)0.14−0.09=0.1000(0.004+0.003333)0.05=1.85
p-Value Calculation:
Cumulative normal area for z=1.85 is 0.9678.
Upper tail area: 1.0000−0.9678=0.0322.
Two-tail p-value:
p-value=2(0.0322)=0.0644
Decision: Because p-value=0.0644<0.10, reject H0. Error rates differ significantly between the two offices.
Excel Worksheet Implementation for Hypothesis Testing (tax_mod / Figure 10.11):
Hypothesized difference entered in cell E10 (0).
Point estimate in cell E11 (0.05).
Pooled estimate pˉ computed in cell E13 (0.1127).
Standard error estimate computed in cell E14 via Formula 10.14.
Test statistic computed in cell E15 via formula:
=(E11 - E10)/E14
(yields z=1.8462).
Cumulative probabilities via NORM.S.DIST:
Cell E17: Lower-tail p-value.
Cell E18: Upper-tail p-value.
Cell E19: Two-tail p-value computed as twice the minimum of the one-tailed values (0.0649).
Decision: Reject H0 since 0.0649<0.10.
Case Problem: PAR Incorporated
Business Context:
PAR Incorporated is a manufacturer of golf equipment seeking to increase market share by developing a cut-resistant, durable golf ball coating.
Research concerns center on whether the new coating adversely affects driving distance.
Driving distance for the new cut-resistant ball must remain comparable to the current ball model.
Testing Methodology:
A mechanical hitting machine was used to hit balls of both models, eliminating human swinging variation so that distance differences reflect true product differences.
Driving distances were measured to the nearest yard and cataloged in file LO four five.
Managerial Report Requirements:
Formulate and justify a hypothesis test comparing the driving distances of current and new balls.
Analyze data, report the test statistic, compute the p-value, state the statistical conclusion, and provide managerial recommendations.
Provide descriptive statistical summaries of driving distance data for each ball model.
Calculate the 95% confidence interval for the population mean driving distance of each model, as well as the 95% confidence interval for the difference between the two population means.
Evaluate and discuss whether larger sample sizes and additional testing are required.
Appendix: Inferences About Two Populations with R
Difference Between Two Population Means: σ1 and σ2 Known:
Script: Dipmaid's nodes.R.
Context: Evaluating Center A (μ1) versus Center B (μ2) standardized exam scores with known parameters σ1=10 and σ2=10.
Working file: examscores_r.csv.
Procedural steps in RStudio console pane:
Step 1: Set the working directory to the folder containing examscores_r.csv.
Step 2: Read the CSV file into a data frame.
Step 3: Use subset to create a data frame containing only the variable Center.A.
Step 4: Use na.omit to remove missing values from center_a_df.
Step 5: Use nrow to calculate the sample size for Center A.
Step 6: Create a numeric vector of scores for Center A.
Step 7: Use mean to compute the sample mean for Center A.
Step 8: Repeat Steps 3 through 7 for Center B.
Step 9: Calculate the standard error of the difference between sample means.
Step 10: Calculate the test statistic z.
Step 11: Use pnorm to calculate the p-value.
Statistical results: Test statistic z=1.656, two-tailed p-value=0.097.
One-tailed modifications:
Lower-tail (Ha:μ1−μ2<0): adjust Step 11 to calculate lower-tail area directly.
Upper-tail (Ha:μ1−μ2>0): adjust Step 11 to calculate upper-tail area directly.
Difference Between Two Population Means: σ1 and σ2 Unknown:
Script: Difmeid's unknowns.R.
Context: Clearwater National Bank checking balances comparing Cherry Grove (n1=28) and Beechmont (n2=22).
Working file: checkscached_r.csv.
Procedural steps:
Step 1: Set working directory to the location of checkscached_r.csv.
Step 2: Read the CSV file into a data frame.
Step 3: Create a vector of balances for Beechmont.
Step 4: Create a vector of balances for Cherry Grove.
Step 5: Use the R function t.test to execute the two-sample hypothesis test.
Statistical results: Test statistic t=2.9546, two-tailed p-value=0.0048.
Alternative directions (lower-tail or upper-tail) are implemented by modifying the alternative argument in t.test in Step 5.
Difference Between Two Population Means: Matched Samples:
Script: DIPMANES match.R.
Context: Production completion times across n=6 workers for Method 1 and Method 2.
Working file: matched_r.csv.
Procedural steps:
Step 1: Set working directory to the location of matched_r.csv.
Step 2: Read the CSV file into a data frame.
Step 3: Create a vector of Method 1 completion times.
Step 4: Create a vector of Method 2 completion times.
Step 5: Use the R function t.test with the argument paired = TRUE to perform the matched-sample hypothesis test.
Summary of Formulas
Formula 10.1 — Point Estimator of the Difference Between Two Population Means:xˉ1−xˉ2
Formula 10.2 — Standard Error of xˉ1−xˉ2 (σ1,σ2 Known):σxˉ1−xˉ2=n1σ12+n2σ22
Formula 10.3 — Margin of Error (σ1,σ2 Known):zα/2n1σ12+n2σ22
Formula 10.4 — Interval Estimate of μ1−μ2 (σ1,σ2 Known):(xˉ1−xˉ2)±zα/2n1σ12+n2σ22
Formula 10.5 — Test Statistic for μ1−μ2 (σ1,σ2 Known):z=n1σ12+n2σ22(xˉ1−xˉ2)−d0
Formula 10.6 — Interval Estimate of μ1−μ2 (σ1,σ2 Unknown):(xˉ1−xˉ2)±tα/2n1s12+n2s22
Formula 10.7 — Degrees of Freedom for Two Independent Random Samples (t-Distribution):df=n1−11(n1s12)2+n2−11(n2s22)2(n1s12+n2s22)2
Formula 10.8 — Test Statistic for μ1−μ2 (σ1,σ2 Unknown):t=n1s12+n2s22(xˉ1−xˉ2)−d0
Formula 10.9 — Test Statistic for Matched Samples:t=sd/ndˉ−μd
Formula 10.10 — Point Estimator of the Difference Between Two Population Proportions:pˉ1−pˉ2
Formula 10.11 — Standard Error of pˉ1−pˉ2:σpˉ1−pˉ2=n1p1(1−p1)+n2p2(1−p2)
Formula 10.12 — Margin of Error for p1−p2:zα/2n1pˉ1(1−pˉ1)+n2pˉ2(1−pˉ2)
Formula 10.13 — Interval Estimate of p1−p2:(pˉ1−pˉ2)±zα/2n1pˉ1(1−pˉ1)+n2pˉ2(1−pˉ2)
Formula 10.14 — Standard Error of pˉ1−pˉ2 When p1=p2=p:σpˉ1−pˉ2=p(1−p)(n11+n21)
Formula 10.15 — Pooled Estimator of p:pˉ=n1+n2n1pˉ1+n2pˉ2
Formula 10.16 — Test Statistic for p1−p2:z=pˉ(1−pˉ)(n11+n21)pˉ1−pˉ2