Significance test for the difference of two means
Significance test for the difference of two means
A significance test for the difference of two means helps you decide whether an observed gap between two sample means reflects a real difference between the two population means, or whether it could reasonably be explained by natural sampling variation. This kind of test is common when comparing two groups — such as a treatment group versus a control group, two schools, or two product designs — and you want evidence about whether the underlying averages truly differ.
Hypotheses for comparing two means
Practice problem
Example:
A tech company’s human resources director claims that engineers with assigned mentors and engineers without mentors spend the same amount of time working at the company before receiving their first promotion, so the company should no longer have mentors for the engineers. One employee thinks that engineers without mentors spend more time at the company before getting their first promotion.
A statistician takes two independent random samples of engineers and records the time (in months) before the first promotion:
- Group 1 (no mentor): , , , ,
- Group 2 (mentor): , , , , ,
Let be the population mean for the no-mentor group, and let be the population mean for the mentor group.
Part a.
Is a significance test possible? What assumptions are we making?
To run the test, all three conditions for inference must be checked:
- Independent random samples
- Normality (or large samples)
- 10% condition (if sampling without replacement)
Solution:
-
Independent random samples: The problem states the samples are independent and random, so this condition is met (no extra assumption needed).
-
Normality / large samples: The sample sizes are not at least (they are and ), so we must assume both populations are approximately normally distributed. If that assumption is false, the test results may not be reliable.
-
10% condition (when sampling without replacement): The problem doesn’t give the total number of engineers in each group, so we must assume each sample is less than of its population. That means assuming there are at least engineers without mentors and at least engineers with mentors. If either population is smaller than that, the test conclusions may not be reliable.
Part b.
Restate the parameters and the hypotheses.
The employee’s claim is that the no-mentor group waits longer, so we use a right-tailed test.
Solution:
- : the mean time to first promotion (in months) for engineers without a mentor
- : the mean time to first promotion (in months) for engineers with a mentor
Part c.
Complete the test and interpret the P-value.
First, compute the sample means:
The difference of sample means:
Next, find the sample standard deviations using a TI-84:
- Enter the data into lists.
- Press STAT, highlight CALC, choose 1: 1-Var Stats.
- Type L1 (2nd function 1) and press ENTER.
This gives:
Compute the standard error of :
Calculate the test statistic:
Compute the degrees of freedom using Welch’s approximation:
To find the p-value on a TI-84, use 2nd → VARS → 6: tcdf(lower, upper, degrees of freedom).
Because this is a right-tailed test:
Solution:
The p-value is approximately .
Interpretation: If the population means are actually the same, then there is about a chance of getting a sample difference as large as or larger than the one observed, just due to random sampling variation.
Part d.
Give a conclusion in context at .
Solution:
Since
we reject . There is strong evidence that engineers without mentors receive their first promotion later on average than engineers with mentors.
Part e.
Given your conclusion, what type of error (Type I or II) might have been made and what would the consequences of this error be?
Solution:
Because we rejected , the possible mistake is a Type I error.
A Type I error here would mean concluding that engineers without mentors take longer to get promoted (on average) even though the population means are actually the same.
A likely consequence is that the company would spend money to hire or maintain mentors to speed up promotions, even though mentoring doesn’t actually change the average time to promotion. That money could have been spent elsewhere.