2000unit2 Filled In
1. Matched pairs t procedures (part 1)
Matched pairs t procedures are used for inference on the difference between paired observations, enabling the construction of confidence intervals and the performance of hypothesis tests for the true mean difference between two related measurements or conditions.
1.1 Paired data and its types
Paired data arise when observations are collected in pairs, focusing on the differences between these paired values rather than individual measurements. This structure is employed when:
- Two different variables are measured for each individual, and the interest lies in the difference between these variables (e.g., STAT 1000 vs. STAT 2000 grades for a student).
- An individual is measured twice under different conditions or at different times, with the focus on the difference between these repeated measurements (e.g., blood pressure before and after medication).
- Similar individuals are grouped into pairs, with each member of a pair receiving a different treatment, and the response variable is measured and compared between the pair members (e.g., comparing growth of twin children on different diets).
1.2 The parameter of interest and assumptions for matched pairs t procedures
The primary parameter of interest in matched pairs t procedures is μd, the true mean of the differences between paired observations in the population. The core assumptions for employing these procedures are:
- Normality: The differences between paired observations follow a normal distribution with mean μd and standard deviation ωd.
- Independence of Pairs: The pairs themselves are a simple random sample (SRS) from the population of all possible pairs.
- Dependence within Pairs: Observations are dependent within pairs, meaning they are related in some way.
It is crucial to note that the methods for constructing confidence intervals and conducting hypothesis tests in the matched pairs setting are analogous to the one-sample case, with the key distinction being that the analysis is performed on the differences. The assumption is not that each variable is normal independently, but rather that their differences are normally distributed.
Note: It is sufficient to assume that the differences are normally distributed, not necessarily each individual variable being measured independently 6.
1.3 Confidence intervals for the mean difference
A confidence interval provides a range of plausible values for the true mean difference, μd. The formula for a level C confidence interval is:
xˉd±t∗nsd
Where:
- xˉd is the sample mean of the differences.
- t∗ is the upper 21−C critical value from the t-distribution with n−1 degrees of freedom. This value satisfies P(∣Tn−1∣<t∗)=C.
- sd is the sample standard deviation of the differences.
- n is the number of pairs in the sample.
- t∗nsd is the margin of error 7.
Example: For a sample of 8 cars, we collect mileage data for regular and premium gasoline, calculating the difference (d=Premium−Regular). If xˉd=2 mpg, sd=2 mpg, and we want a 95% confidence interval (C=0.95), the degrees of freedom are n−1=8−1=7. The critical t-value t∗ for a 95% confidence interval with 7 degrees of freedom is 2.365.
The margin of error is 2.365×82≈1.67. The 95% confidence interval is 2±1.67, which results in (0.33,3.67) miles per gallon 9.
Interpretation: We are 95% confident that the true mean difference in fuel economy between premium and regular gasoline lies between 0.33 and 3.67 miles per gallon. It's important to note that defining the difference as Regular−Premium would yield a negative interval, conveying the same information 11.
1.4 Hypothesis tests for the mean difference
Hypothesis tests are used to determine if there is convincing evidence of a difference between paired observations. The procedure mirrors the one-sample t-test, but on the differences.
The test statistic is calculated as:
t=sd/nxˉd−μd0
Where μd0 is the hypothesized true mean difference under the null hypothesis 12.
Note: For matched pairs hypothesis tests, the null hypothesis is conventionally stated as μd=0, implying no difference between the paired measurements.
1.4.1 Right-sided hypothesis test example (P-value method)
Consider the gasoline mileage example, aiming to test if premium gasoline provides better fuel economy on average.
- Significance Level: ε=0.05.
- Hypotheses: H0:μd=0 vs. Ha:μd>0. The alternative hypothesis is d=Premium−Regular>0 because if premium is better, its mileage should be higher 13 14.
- Test Statistic: Using xˉd=2, sd=2, and n=8: t=2/82−0=0.7072≈2.83
- P-value: With 7 degrees of freedom, we find the probability of observing a t-statistic of 2.83 or greater. From t-tables, P(T7>2.517)=0.02 and P(T7>2.998)=0.01. Thus, the P-value is between 0.01 and 0.02 16.
- Conclusion: Since the P-value (0.01 to 0.02) is less than ε=0.05, we reject H0. There is sufficient evidence to conclude that premium gasoline provides better fuel economy on average than regular gasoline.
Interpretation of P-value: If there were no difference in average fuel economy, the probability of observing a sample mean difference as high as 2.0 mpg would be between 0.01 and 0.02 17.
1.4.2 Right-sided hypothesis test example (Critical value method)
Continuing the gasoline mileage example using the critical value method:
- Decision Rule: Reject H0 if t>t∗, where t∗ is the upper 0.05 critical value for a t-distribution with 7 degrees of freedom. t∗≈1.895.
- Comparison: Our calculated test statistic t=2.83 is greater than the critical value t∗=1.895.
- Conclusion: We reject H0. The conclusion is the same as with the P-value method 18.
R Code Output: The R output for
t.test(diff, mu=0, alternative="greater")confirms a test statistic t=2.8284 with a P-value of 0.01273 and a critical value of approximately 1.894579 19.
1.4.3 Left-sided hypothesis test example (Critical value method)
Consider a pharmaceutical company testing a new blood pressure medication. For 20 patients, systolic blood pressures are measured before and after taking medication, and the difference d=after−before is calculated. We have xˉd=−10.9 mmHg and sd=3.7 mmHg. Researchers want to test if the medication reduces systolic blood pressure, assuming the differences are normally distributed, with ε=0.10.
- Significance Level: ε=0.10.
- Hypotheses: H0:μd=0 vs. Ha:μd<0. The alternative hypothesis is μd<0 because a reduction in blood pressure means the 'after' measurement is lower than the 'before' measurement 20.
- Decision Rule (Critical Value Method): We need to find the lower tail critical value for the t-distribution with n−1=20−1=19 degrees of freedom at α=0.10. Let's assume for demonstration purposes that the critical value t∗ is approximately -1.328 (using a t-table or software for t0.10,19). We would reject H0 if t<−1.328.
This section sets the stage for performing the calculation and conclusion for the left-sided test, which would follow the critical value comparison or P-value determination.
2. Matched pairs t procedures (part 2)
This section details the application of matched pairs t-procedures for hypothesis testing and constructing confidence intervals to analyze the difference between paired observations, focusing on practical examples and interpretation.
2.1 Hypothesis testing for paired differences
Hypothesis testing for paired data involves examining the distribution of differences (di) between paired observations. The null hypothesis is typically stated as H0:μd=μd0, where μd is the true mean difference and μd0 is a hypothesized value (often 0). The alternative hypothesis can be one-sided (Ha:μd>μd0 or Ha:μd<μd0) or two-sided (Ha:μd=μd0).
The test statistic for a matched pairs t-test is calculated as: t=sd/ndˉ−μd0 where:
- dˉ is the sample mean of the differences.
- μd0 is the hypothesized mean difference under the null hypothesis.
- sd is the sample standard deviation of the differences.
- n is the number of pairs.
2.1.1 Left-sided hypothesis test example
Consider a study investigating the effect of a medication on blood pressure. The differences (d) are calculated as pre-medication blood pressure minus post-medication blood pressure. A left-sided test is used if the hypothesis is that the medication reduces blood pressure, meaning the pre-medication value is higher than the post-medication value, leading to positive differences.
- Decision rule (critical value method): Reject H0 if t≤−tα,df, where tα,df is the lower critical value from the t-distribution with n−1 degrees of freedom. For example, if α=0.10 and df=19, reject H0 if t≤−1.328.
- Test statistic calculation: Given a sample mean difference dˉ=10.9, hypothesized mean difference μd0=0, standard deviation of differences sd=3.7, and sample size n=20, the test statistic is t=3.7/2010.9−0≈13.17.
- Conclusion: Since t=13.17>−1.328, the decision would be to fail to reject H0 if this were the correct direction of the test. However, the example text states "Since t = 13.17 < 1.328, we reject the null hypothesis." This indicates the direction of the difference in the calculation was intended to show a reduction, and the critical value should have been positive for a right-tailed test, or the test statistic calculated from the definition of d implies a reduction. Assuming the conclusion is correct based on the statistic provided, it suggests sufficient evidence that the medication reduces mean blood pressure 21.
2.1.2 P-value method for hypothesis testing
The P-value method offers an alternative approach to hypothesis testing.
- Decision rule: Reject H0 if the P-value ≤α, where α is the level of significance.
- P-value calculation: For a left-sided test, the P-value is P(T(df)≤t). If the test statistic is t=13.17 with df=19, the P-value is extremely small. From t-tables, P(T≤3.883)=0.0005. Since 13.17 is much larger than 3.883, the P-value is less than 0.0005 19.
- Conclusion: If α=0.10, since the P-value <0.0005≤0.10, we reject H0 and conclude there is sufficient evidence of a reduction in mean blood pressure.
Note: The text implies a reduction in blood pressure, which would typically correspond to positive differences if d=pre−post. The interpretation of "less than" when the test statistic is large positive needs careful alignment with the hypothesis and definition of the difference.
2.1.3 Two-sided hypothesis test example
Consider comparing the academic performance (GPA) of first and second children. The difference is defined as d=first child GPA−second child GPA.
- Level of significance: α=0.01.
- Hypotheses: H0:μd=0 vs. Ha:μd=0.
- Decision rule (P-value method): Reject H0 if P-value ≤0.01.
- Test statistic: Given dˉ=0.12, sd=0.31, and n=30, the test statistic is t=0.31/300.12−0≈2.12.
- P-value calculation: The P-value is 2×P(T≥∣2.12∣). Using t-tables, P(T≥2.045)=0.025 and P(T≥2.150)=0.02. Therefore, P(T≥2.12) is between 0.02 and 0.025. The P-value is between 2×0.02=0.04 and 2×0.025=0.05 26.
- Conclusion: Since the P-value (between 0.04 and 0.05) is greater than α=0.01, we fail to reject H0. There is insufficient evidence at the 1% level of significance to conclude that there is a difference in average high school academic performance between first and second children 27.
2.1.4 Decision rule methods comparison
Different methods can be used for hypothesis testing:
| Method | Decision Rule |
|---|---|
| Critical Value Method | Reject H0 if the test statistic falls in the rejection region (defined by critical values). |
| P-value Method | Reject H0 if P-value ≤α 22 25 |
| Confidence Interval | For a two-sided test with significance level α, reject H0 if the hypothesized mean difference μd0 is NOT contained within the (1−α)×100% confidence interval for μd 29. |
Example: For the two-sided test with α=0.01 and df=29, the critical value is tα/2,df=t0.005,29=2.756. Reject H0 if ∣t∣≥2.756. Since the calculated t=2.12, and ∣2.12∣<2.756, we fail to reject H0 28.
2.2 Confidence interval for paired differences
A confidence interval provides a range of plausible values for the true mean difference between paired observations.
- Formula: The confidence interval for μd is given by: dˉ±tα/2,dfnsd where tα/2,df is the critical value from the t-distribution for a given confidence level and n−1 degrees of freedom.
2.2.1 Confidence interval example
Using the GPA comparison example:
-
Sample data: dˉ=0.12, sd=0.31, n=30.
-
Confidence level: 99%, which means α=0.01 and α/2=0.005.
-
Critical value: For df=29 and α/2=0.005, the upper critical value is t0.005,29=2.756.
-
Calculation: 0.12±2.756(300.31)=0.12±2.756(0.0566)≈0.12±0.156 The 99% confidence interval is approximately (0.12−0.156,0.12+0.156)=(−0.036,0.276) 23 24.
-
Interpretation: We are 99% confident that the true mean difference in GPA between the first and second child is between -0.036 and 0.276. Since this interval contains 0, it suggests there is no statistically significant difference at the 1% level.
2.3 Assumptions for matched pairs t procedures
Matched pairs t procedures rely on specific assumptions to ensure the validity of the results.
- Independence of pairs: The pairs themselves should be independent of each other.
- Normality of differences: The distribution of the differences (di) should be approximately normal. This assumption is more critical for smaller sample sizes. If the sample size is large (n≥30), the Central Limit Theorem helps to ensure the sampling distribution of dˉ is approximately normal, even if the differences themselves are not perfectly normal.
Important: It is the differences that must be normally distributed, not necessarily the individual measurements within each pair.
2.4 Practice problems analysis
2.4.1 Gripping strength hypothesis test
A practice problem involves comparing the gripping strength of left hands versus right hands for left-handed individuals. The hypothesis is that the left hand has greater strength on average (Ha:μd>0, where d=left hand strength−right hand strength).
- Data: n=6, α=0.05.
- Hypotheses: H0:μd=0, Ha:μd>0.
- Decision rule (critical value): For a right-sided test with α=0.05 and df=n−1=5, the critical value is t0.05,5=2.015. Reject H0 if t≥2.015.
| Option | Critical Value for Ha:μd>0 | Critical Value for Ha:μd<0 | Critical Value for Ha:μd=0 |
|---|---|---|---|
| A | t0.05,5=2.015 | t0.95,5=−2.015 | t0.025,5=2.571 |
| B | t0.05,5=2.015 | t0.95,5=−2.015 | t0.005,5=3.365 |
| C | t0.05,5=2.015 | t0.95,5=−2.015 | t0.005,5=3.365 |
| D | t0.05,5=2.015 | t0.95,5=−2.015 | t0.005,5=3.365 |
| E | t0.05,5=2.015 | t0.95,5=−2.015 | t0.005,5=3.365 |
The correct choice among the given options for the critical value related to the question asked in page 30 would be based on the correct t∗ value for the specified test. The problem states "whether left-handed people have a greater gripping strength in their left hand than their right hand on average," which is a right-tailed test (Ha:μd>0). The critical value for α=0.05 and df=5 is t0.05,5=2.015. Therefore, reject H0 if t≥2.015. Option E (t↔2.015) is close but implies a two-sided test. Option D includes this but also a left-sided condition. Let's re-examine the options and the calculation provided on page 30: "RejectHo if t≥t* = upper0.05 C.V. for T = 2.015". None of the options perfectly match t≥2.015. However, considering the provided values, Option E (t↔2.015) seems to be the intended, though imprecise, representation if interpreted as the critical value magnitude. The problem asks for the condition to reject H0. Given the options and the explicit calculation on page 30, the most appropriate interpretation is that the critical value for a right-tailed test is 2.015, and rejection occurs when t≥2.015. None of the options directly state this. However, if we consider the magnitude, 2.015 is relevant. 30 5.
- Test statistic calculation: dˉ=5, sd=6, n=6. t=6/65−0=2.4495≈2.04 31.
2.4.2 True statements analysis
Regarding the statements about the gripping strength data:
- Dependent: For each person, left-hand and right-hand gripping strength are dependent because they are measurements from the same individual. This is the basis for using matched pairs.
- Independent: This is false, as explained above.
- Normality of strengths: Matched pairs t-tests assume the differences are normally distributed, not necessarily the individual left and right-hand strengths themselves.
- Normality of differences: This is a core assumption for matched pairs t-tests 32.
Therefore, statements 1 and 4 are true. This corresponds to option (B).
3. Comparing means of two independent samples with unequal variances
This section details the procedures for making inferences about the difference between two population means when the population variances are assumed to be unequal.
3.1 Introduction to two-sample t procedures
When comparing the means of two independent populations, denoted as μ1 and μ2, we utilize sample data to make inferences. Unlike matched pairs, observations from the two samples are not related. We obtain independent random samples from each population: one of size n1 with sample mean xˉ1 and sample standard deviation s1, and another of size n2 with sample mean xˉ2 and sample standard deviation s2. The core of these procedures relies on the difference between sample means, xˉ1−xˉ2, as an estimate for the difference between population means, μ1−μ2 35.
3.1.1 Assumptions for two-sample t procedures
For these procedures to be valid, the following assumptions must hold:
- Both populations from which the samples are drawn are normally distributed.
- The samples are simple random samples (SRS).
- The two samples are independent of each other.
The specific inference methods employed depend on whether the population standard deviations, ω1 and ω2, are assumed to be equal or unequal. This section focuses on the case where ω1=ω2, which uses "unpooled" two-sample t-tests and confidence intervals 36.
3.2 The unpooled two-sample t statistic
When population standard deviations are assumed to be unequal, the two-sample t statistic is calculated as follows: t=n1s12+n2s22(xˉ1−xˉ2)−(μ1−μ2)
A key challenge arises because, when ω1=ω2, this statistic does not follow an exact t-distribution. Instead, its distribution is approximated by a t-distribution 37 38.
3.2.1 Degrees of freedom for the unpooled t-distribution
The approximation of the distribution of the two-sample t-statistic relies on determining an appropriate number of degrees of freedom (k).
- Simple approximation: A conservative approach uses k=min{n1−1,n2−1} degrees of freedom. This method results in wider confidence intervals and a more conservative (higher) critical value or p-value 39.
- Satterthwaite Approximation: A more complex and often more accurate method for calculating the degrees of freedom is the Satterthwaite Approximation. The formula is: k=n1−11(n1s12)2+n2−11(n2s22)2(n1s12+n2s22)2 While software often uses the Satterthwaite Approximation, manual calculations typically employ the simpler minimum degrees of freedom approach for conservatism 40.
Note: The simpler approximation for degrees of freedom (k=min{n1−1,n2−1}) leads to a more conservative approach. This means the resulting confidence intervals will be wider, and hypothesis tests might be less likely to reject the null hypothesis compared to using the exact degrees of freedom from the Satterthwaite Approximation 58.
3.3 Assessing the equality of population standard deviations
In practice, we often do not know if ω1=ω2. A common heuristic to decide whether to assume equal or unequal variances involves comparing the sample standard deviations 41 42:
- Calculate the ratio of the larger sample standard deviation to the smaller sample standard deviation: min{s1,s2}max{s1,s2}.
- If this ratio is 2 or less, it is reasonable to assume that ω1=ω2.
- If this ratio is greater than 2, it is recommended to assume that ω1=ω2.
Tip: This rule of thumb provides a quick assessment. If the higher sample standard deviation is no more than twice the lower sample standard deviation, you can proceed assuming equal variances. Otherwise, assume unequal variances 43.
3.4 Confidence intervals for the difference in means (ω1=ω2)
When population standard deviations are unknown and assumed unequal, a 100(1−α)% confidence interval for μ1−μ2 is given by: (xˉ1−xˉ2)±tα/2,kn1s12+n2s22 Here, tα/2,k is the critical value from the t-distribution with k=min{n1−1,n2−1} degrees of freedom 44.
Important: The formula for the confidence interval when variances are unequal is not typically provided on standard formula sheets. It's crucial to remember its structure, which follows the general form:
estimate ± critical value * standard error. The standard error of the difference in sample means is n1s12+n2s22 49.
3.4.1 Example: Confidence interval for gas prices
Consider estimating the difference in mean gasoline prices between Winnipeg and Calgary.
- Winnipeg: n1=8, xˉ1=121.30 cents/litre, s1=1.09 cents/litre.
- Calgary: n2=5, xˉ2=119.32 cents/litre, s2=2.36 cents/litre.
First, check for equality of variances: min{s1,s2}max{s1,s2}=1.092.36≈2.17. Since 2.17>2, we assume unequal variances (ω1=ω2) 46.
The degrees of freedom are k=min{8−1,5−1}=min{7,4}=4. For a 95% confidence interval (α=0.05), the critical t-value t0.025,4 is 2.776.
The 95% confidence interval is: (121.30−119.32)±2.77681.092+52.362 1.98±2.7760.1485+1.11392 1.98±2.7761.26242 1.98±2.776(1.1236) 1.98±3.12 The 95% confidence interval is (−1.14,5.10) cents/litre 47.
Interpretation: We are 95% confident that the true difference in mean gas prices between Winnipeg and Calgary lies between -1.14 and 5.10 cents per litre. This means that, on average, Winnipeg gas prices could be lower, higher, or the same as Calgary gas prices within this range 48.
3.5 Hypothesis tests for the difference in means (ω1=ω2)
Hypothesis tests for μ1−μ2 when variances are unequal follow the standard steps of hypothesis testing, with the two-sample t-statistic for unequal variances and its approximate t-distribution.
3.5.1 Hypotheses
For a two-sided test, the hypotheses are:
- H0:μ1=μ2 (or μ1−μ2=0)
- Ha:μ1=μ2 (or μ1−μ2=0)
For a one-sided test (e.g., to check if filters reduce carbon monoxide):
- H0:μF=μN
- Ha:μF<μN 60.
3.5.2 Test statistic
The test statistic is the same as for the confidence interval, but we assume the hypothesized difference (μ1−μ2)0 is true (usually 0) 50: t=n1s12+n2s22(xˉ1−xˉ2)−(μ1−μ2)0 The degrees of freedom are calculated using k=min{n1−1,n2−1}.
3.5.3 Example: Hypothesis test for gas prices
Using the gas price data from section 3.4.1, we conduct a hypothesis test at the 5% significance level (α=0.05) to determine if there's a difference in mean gas prices 51.
- Significance Level: α=0.05.
- Hypotheses: H0:μ1=μ2 vs. Ha:μ1=μ2.
- Decision Rule: Reject H0 if P-value < 0.05.
- Test Statistic: Using the previously calculated sample means and standard deviations: t=81.092+52.362(121.30−119.32)−0=0.1485+1.113921.98=1.262421.98≈1.12361.98≈1.76 The degrees of freedom are k=4 52.
- P-Value: We need to find P(∣T∣>1.76). From t-tables, P(T>1.533)=0.10 and P(T>2.132)=0.05. Since 1.76 is between 1.533 and 2.132, the probability P(T>1.76) is between 0.05 and 0.10. For a two-sided test, the P-value is 2×P(T>1.76), which is between 0.10 and 0.20 4 53.
- Conclusion: Since the P-value (between 0.10 and 0.20) is greater than α=0.05, we fail to reject H0. There is insufficient evidence at the 5% significance level to conclude that there is a difference in mean gas prices between Winnipeg and Calgary 54.
3.5.4 Alternative Methods for Hypothesis Testing
The hypothesis test can also be conducted using the critical value method or the confidence interval method
- Critical Value Method: Reject H0 if ∣t∣>tα/2,k. For a 5% significance level and k=4, t0.025,4=2.776. Since ∣1.76∣<2.776, we fail to reject H0 55.
- Confidence Interval Method: For a two-sided test, if the 100(1−α)% confidence interval for μ1−μ2 contains the hypothesized difference (0 in this case), we fail to reject H0. The 95% confidence interval calculated earlier was (−1.14,5.10), which contains 0. Thus, we fail to reject H0 56.
Tip: The formula for the t-statistic when variances are unequal is not usually provided on formula sheets. However, knowing the structure
t = (estimate - hypothesized value) / standard errorand the formula for the standard error of the difference in means (n1s12+n2s22) with the correct degrees of freedom (k=min{n1−1,n2−1}) is essential 57.
4. Comparing means of two independent samples with equal variances (part 1)
This section details the inferential procedures for comparing the means of two independent populations when their variances are assumed to be equal, employing pooled variance estimation and adjusted degrees of freedom.
4.1 Introduction to the pooled two-sample t-test
When comparing the means of two independent populations, μ1 and μ2, a key assumption is often made about their population variances, ω12 and ω22. If these variances are assumed to be equal (ω12=ω22), a more powerful and exact statistical test, the pooled two-sample t-test, can be utilized. This approach involves estimating the common population variance from the sample data, which leads to a t-statistic that follows an exact t-distribution. The primary assumptions for this test are that both populations are normally distributed and that the samples are independent simple random samples (SRSs) 64.
4.2 Estimating the common population variance
When ω12=ω22=ω2, we estimate this common variance, ω2, using a weighted average of the individual sample variances, s12 and s22. This weighted average, known as the pooled sample variance (sp2), uses the degrees of freedom of each sample as weights. The formula for the pooled sample variance is:
sp2=n1+n2−2(n1−1)s12+(n2−1)s22
Here, n1 and n2 are the sample sizes, and s12 and s22 are the sample variances. The pooled sample variance, sp2, serves as the best estimate of the common population variance ω2, and its square root, sp, is the best estimate of the common population standard deviation ω 62.
4.3 The pooled two-sample t-statistic
With the pooled variance estimate, the formula for the two-sample t-statistic simplifies. The standard error of the difference between sample means, xˉ1−xˉ2, is calculated using the pooled variance:
SE(xˉ1−xˉ2)=spn11+n21
The t-statistic for testing the difference between two population means (μ1−μ2) when population variances are equal is then:
t=spn11+n21(xˉ1−xˉ2)−(μ1−μ2)
Under the null hypothesis that μ1=μ2 (or μ1−μ2=0), this t-statistic follows an exact t-distribution with degrees of freedom equal to the sum of the sample sizes minus two:
df=n1+n2−2
This contrasts with the unequal variances case, where the statistic does not have an exact t-distribution 63.
Important Note: The pooled sample variance calculation weights each sample variance by its degrees of freedom, (ni−1), rather than by its sample size, ni. This ensures that samples with more information (higher degrees of freedom) have a greater influence on the pooled estimate.
4.4 Constructing confidence intervals for the difference in means
When assuming equal population variances, a confidence interval for the difference between two population means, μ1−μ2, is constructed as follows:
A 100(1−ϵ)% confidence interval is given by:
(xˉ1−xˉ2)±tϵ/2,df⋅spn11+n21
where:
- (xˉ1−xˉ2) is the difference between the sample means.
- tϵ/2,df is the upper ϵ/2 critical value from the t-distribution with df=n1+n2−2 degrees of freedom.
- spn11+n21 is the standard error of the difference between the sample means.
Example: To find a 98% confidence interval (ϵ=0.02), we need the t0.01 critical value from the t-distribution with the appropriate degrees of freedom. For sample sizes n1=52 and n2=30, the degrees of freedom are df=52+30−2=80. The t0.01,80 critical value is approximately 2.374 69.
4.5 Conducting hypothesis tests for the difference in means
Hypothesis tests for μ1−μ2 when ω1=ω2 follow the standard hypothesis testing framework.
- Null Hypothesis (H0): Typically H0:μ1=μ2 or H0:μ1−μ2=0.
- Alternative Hypothesis (Ha): Can be one-sided (Ha:μ1>μ2 or Ha:μ1<μ2) or two-sided (Ha:μ1=μ2).
- Test Statistic: The pooled two-sample t-statistic is used: t=spn11+n21(xˉ1−xˉ2)−(μ1−μ2) Under H0, this statistic follows a t-distribution with df=n1+n2−2 degrees of freedom 66.
Tip: When performing hypothesis tests, remember to clearly state the null and alternative hypotheses, determine the test statistic and its distribution, establish a decision rule (either using critical values or p-values), and state a conclusion in the context of the problem.
4.5.1 Hypothesis testing: Critical value method
Using the critical value method, we compare the calculated t-statistic to a critical t-value determined by the significance level (ϵ) and the degrees of freedom.
- Decision Rule: Reject H0 if the calculated t-statistic falls into the rejection region defined by the critical value(s). For a right-tailed test (Ha:μ1>μ2), reject H0 if t>tϵ,df. For a left-tailed test (Ha:μ1<μ2), reject H0 if t<−tϵ,df. For a two-tailed test (Ha:μ1=μ2), reject H0 if t>tϵ/2,df or t<−tϵ/2,df 74.
4.5.2 Hypothesis testing: P-value method
Using the p-value method, we calculate the probability of observing a test statistic as extreme as, or more extreme than, the one computed from the sample data, assuming the null hypothesis is true.
- Decision Rule: Reject H0 if the P-value is less than or equal to the significance level (ϵ) 70.
Example: In testing if teenage drivers are faster than seniors, with H0:μ1=μ2 and Ha:μ1>μ2 at ϵ=0.01, a calculated t-statistic of 2.90 with 80 degrees of freedom results in a P-value between 0.001 and 0.0025. Since this P-value is less than ϵ, we reject H0 and conclude that teenagers drive faster on average 72 73.
4.6 Formula recall and tips
The formulas for the pooled two-sample t-test are essential. While they may not always be provided on a formula sheet, understanding their structure is key.
| Component | Formula | Degrees of Freedom (df) | Notes |
|---|---|---|---|
| Pooled Variance (sp2) | sp2=n1+n2−2(n1−1)s12+(n2−1)s22 | N/A | Best estimate of common population variance ω2 |
| Standard Error (SE) | SE(xˉ1−xˉ2)=spn11+n21 | N/A | Standard error of the difference between sample means |
| t-statistic | t=spn11+n21(xˉ1−xˉ2)−(μ1−μ2) | n1+n2−2 | Test statistic for comparing population means |
| Confidence Interval (CI) | (xˉ1−xˉ2)±tϵ/2,df⋅SE(xˉ1−xˉ2) | n1+n2−2 | Interval estimate for the difference in population means μ1−μ2 |
Tip: Remember the general structure of confidence intervals:
estimate ± critical_value * standard_error. For t-tests, the estimate is the difference in sample means, and the critical value comes from the t-distribution. Similarly, the general structure of a t-statistic is(statistic - hypothesized_value) / standard_error.
5. Comparing means of two independent samples with equal variances (part 2)
This section details hypothesis testing and confidence interval construction for the difference between two population means when equal population variances are assumed, focusing on the application of pooled variance and adjusted degrees of freedom.
5.1 Pooled variance and degrees of freedom for equal variances
When the assumption of equal population variances (σ12=σ22) is met, a pooled sample variance is calculated to estimate the common population variance. This pooled variance is a weighted average of the individual sample variances, giving more weight to the sample with the larger sample size. The degrees of freedom for the t-distribution are then calculated as the sum of the sample sizes minus two.
Pooled Variance (sp2): The formula for the pooled sample variance is: sp2=n1+n2−2(n1−1)s12+(n2−1)s22 where:
- n1 and n2 are the sample sizes of the two independent groups.
- s12 and s22 are the sample variances of the two independent groups.
Degrees of Freedom (df): The degrees of freedom for the t-distribution when using pooled variance are: df=n1+n2−2
Note: Before using the pooled method, it is crucial to check if the assumption of equal variances is reasonable. A common rule of thumb is to compare the ratio of the larger sample standard deviation to the smaller sample standard deviation. If this ratio is less than 2, the assumption of equal variances can generally be made. For example, if s1=11.71 and s2=5.19, the ratio 5.1911.71≈2.26. Since this value is greater than 2, the assumption of equal variances might not be appropriate in that specific case, and the Welch's t-test (which does not assume equal variances) might be preferred. However, if the ratio is less than 2, as seen with s1=10.93 and s2=10.68, where 10.6810.93≈1.02<2, the pooled method is appropriate88.
5.2 Confidence intervals for the difference between two means (equal variances)
A confidence interval for the difference between two population means (μ1−μ2), assuming equal variances, provides a range of plausible values for this difference.
The formula for a (1−α)100% confidence interval is: (xˉ1−xˉ2)±tα/2,dfsp2(n11+n21) where:
- xˉ1 and xˉ2 are the sample means.
- tα/2,df is the critical value from the t-distribution with df=n1+n2−2 degrees of freedom, such that α/2 of the area is in each tail.
- sp2 is the pooled sample variance.
Example: To find a 95% confidence interval for the difference in memory scores between reading and listening groups (Group 1: read, Group 2: listened), with sample sizes n1=10 and n2=9, sample means xˉ1=49 and xˉ2=38, and pooled variance sp2=116.9225. The degrees of freedom are df=10+9−2=17. The critical t-value for α=0.05 (for a 95% confidence interval) is t0.025,17=2.110. The confidence interval is calculated as:
(49−38)±2.110116.9225(101+91) 11±2.110116.9225(0.1+0.1111) 11±2.110116.9225(0.2111) 11±2.11024.6714 11±2.110(4.967) 11±10.48 This results in a confidence interval of (0.52,21.48).
5.3 Hypothesis testing for the difference between two means (equal variances)
Hypothesis tests are used to determine if there is statistically significant evidence of a difference between the population means of two independent groups, assuming equal variances.
5.3.1 Two-sided hypothesis test
This test is used when we want to detect any difference (increase or decrease) between the population means.
Hypotheses:
- Null Hypothesis (H0): μ1=μ2 (There is no difference between the population means).
- Alternative Hypothesis (Ha): μ1=μ2 (There is a difference between the population means).
Test Statistic: The test statistic used is the t-statistic, calculated with the pooled variance: t=sp2(n11+n21)(xˉ1−xˉ2)−(μ1−μ2)0 Under H0, (μ1−μ2)0=0, so the formula simplifies to: t=sp2(n11+n21)xˉ1−xˉ2
Decision Rule (Critical Value Method): Reject H0 if ∣t∣>tα/2,df. The critical value tα/2,df is obtained from the t-distribution table for the specified significance level (α) and degrees of freedom (df=n1+n2−2).
Decision Rule (P-value Method): Reject H0 if the P-value ≤α. The P-value is the probability of observing a test statistic as extreme as, or more extreme than, the one calculated, assuming H0 is true. For a two-sided test, P-value = 2P(Tdf>∣t∣).
Example: To test if memory scores differ based on reading or listening (using the data from and results from ), with α=0.05 89 90.
- Hypotheses: H0:μ1=μ2 vs Ha:μ1=μ2.
- Degrees of freedom: df=17.
- Critical t-value for α/2=0.025 and df=17 is t0.025,17=2.110.
- Calculated test statistic: t=116.9225(101+91)49−38=2.21.
- Conclusion (Critical Value Method): Since ∣t∣=2.21>t0.025,17=2.110, we reject H0. There is sufficient evidence to conclude that the true mean scores for the two methods differ 92 93.
- Conclusion (P-value Method): The P-value is 2P(T17>2.21). From the t-table, P(T17>2.110)=0.025 and P(T17>2.224)=0.02. Thus, P(T17>2.21) is between 0.02 and 0.025. The P-value is between 0.04 and 0.05. Since the P-value is less than α=0.05, we reject H0 94.
- Conclusion (Confidence Interval Method): The 95% confidence interval for μ1−μ2 was (0.52, 21.48). Since this interval does not contain 0, and the confidence level (95%) plus the significance level (5%) sum to 1, we reject H0 95.
5.3.2 One-sided hypothesis test
This test is used when there is a specific direction of difference to investigate.
Hypotheses:
- Right-sided test: H0:μ1=μ2 vs Ha:μ1>μ2.
- Left-sided test: H0:μ1=μ2 vs Ha:μ1<μ2.
Test Statistic: The same t-statistic formula as for the two-sided test is used.
Decision Rule (Critical Value Method):
- For a right-sided test: Reject H0 if t>tα,df.
- For a left-sided test: Reject H0 if t<−tα,df (or t<tα,df if using the negative critical value).
Example: To test if the mean carbon monoxide concentration near a plant (μ1) is greater than at other locations (μ2), with n1=16, xˉ1=41, s1=11.71 and n2=14, xˉ2=36, s2=5.19. We assume α=0.05. The ratio of standard deviations is 5.1911.71≈2.26>2, suggesting unequal variances might be more appropriate, but for demonstration using equal variance methods:
- If we were to assume equal variances, the degrees of freedom would be df=16+14−2=28.
- Hypotheses: H0:μ1=μ2 vs Ha:μ1>μ2.
- The document provides an example using a modified approach with k=min{n1−1,n2−1}=min{15,13}=13 degrees of freedom, which is not the standard procedure for pooled variance but is shown as an alternative for unequal variances. Using df=13, the critical value for α=0.05 in a right-tailed test is t0.05,13=1.771.
- Test statistic calculation (using pooled variance if it were applicable): t=sp2(161+141)41−36. Note that the example text on page 83 seems to use s1 and s2 directly in the denominator, which is incorrect for pooled variance. The provided calculation on page 83 is: t=1611.712+145.19241−36=16137.1241+1426.93615=8.570256+1.9240075=10.4942635=3.23955≈1.54
- Conclusion: Since t=1.54<t0.05,13=1.771, we fail to reject H0 82 83.
Practice Question Scenario: Comparing gas prices in Western Canada and Eastern Canada.
- Western Canada: n1=10, mean =71.71, std. dev. =4.25.
- Eastern Canada: n2=13, mean =70.89, std. dev. =3.50.
- Hypotheses: H0:μWest=μEast vs Ha:μWest>μEast.
- Significance level: α=0.05.
- Checking variances: minsimaxsi=3.504.25≈1.21<2. Thus, assume equal variances and use the pooled method.
- Degrees of freedom: df=n1+n2−2=10+13−2=21.
- Critical value for a right-sided test with α=0.05 and df=21 is t0.05,21=1.721.
- Decision rule: Reject H0 if t>1.721 98 99.
5.4 Conditions for validity of pooled two-sample t-test
For a pooled two-sample t-test to be valid, the following conditions must be met:
- Two independent random samples: The samples must be drawn independently of each other, and each sample must be a random sample from its respective population.
- Normality of populations: The populations from which the samples are drawn should be approximately normally distributed.
- Equal population variances: The population variances of the two groups must be equal (σ12=σ22) 97.
Important: The population variances do not need to be known; they are estimated by the sample variances. Knowing population variances would lead to a z-test.
5.5 Robustness of t-procedures
Two-sample t procedures exhibit greater robustness to violations of the normality assumption compared to one-sample t procedures. If the two sample sizes are equal and the population distributions have similar shapes, the P-values remain quite accurate even with low sample sizes. However, when population distributions have different shapes, larger sample sizes are required for the t-procedures to maintain accuracy 100.
Common mistakes to avoid
- Review all topics thoroughly before exams
- Pay attention to formulas and key definitions
- Practice with examples provided in each section
- Don't memorize without understanding the underlying concepts
© 2026 Maeve. All rights reserved. This content is protected by copyright.