🧪">
Statistics & probability • 2026 edition
\( t = \frac{\bar{x}_1 - \bar{x}_2}{\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}} \)
Where:
The t-test compares the means of two groups to determine if they are significantly different from each other. It's particularly useful when population standard deviations are unknown and sample sizes are small. Different versions exist for independent samples, paired samples, and one-sample comparisons.
Example: For two independent samples with \( \bar{x}_1 = 25, \bar{x}_2 = 22, s_1 = 4, s_2 = 3, n_1 = 30, n_2 = 25 \):
\( t = \frac{25 - 22}{\sqrt{\frac{16}{30} + \frac{9}{25}}} = \frac{3}{\sqrt{0.533 + 0.36}} = \frac{3}{\sqrt{0.893}} = \frac{3}{0.945} = 3.17 \)
With df ≈ 53, this gives a p-value of approximately 0.002, indicating significant difference.
The t-test is a statistical hypothesis test used to determine if there are significant differences between the means of two groups. It's particularly useful when population standard deviations are unknown and sample sizes are small. The t-test compares the observed difference between group means to the difference expected by chance, taking into account the variability within groups.
Three main types of t-tests:
Cohen's d effect size guidelines:
Statistical test to compare means of two groups when population std dev is unknown.
\( t = \frac{\bar{x}_1 - \bar{x}_2}{SE} \)
Where SE is the standard error of the difference.
Used in research, quality control, medicine, psychology, and experimental design.
Which of the following statements about t-tests is CORRECT?
The answer is B) T-tests are used when population standard deviations are unknown. This is the fundamental difference between t-tests and z-tests. T-tests use sample standard deviations to estimate population standard deviations, making them appropriate for small samples or when population parameters are unknown.
This is a crucial distinction in statistical inference. When we know the population standard deviation (σ), we use the z-test. When we only have the sample standard deviation (s) and need to estimate σ, we use the t-test. The t-distribution accounts for the additional uncertainty introduced by estimating the standard deviation, especially important for small samples.
Population Standard Deviation (σ): True standard deviation of the population
Sample Standard Deviation (s): Standard deviation calculated from sample data
T-Distribution: Probability distribution used when σ is unknown
• Use t-test when σ unknown
• Use z-test when σ known
• T-distribution approaches z-distribution as n increases
• Most real-world applications use t-tests
• T-distribution has heavier tails than normal distribution
• As sample size increases, t approaches z
• Using z-test when σ is unknown
• Assuming equal variances without testing
• Ignoring normality assumption for small samples
A researcher compares two teaching methods. Method A: n₁ = 25, x̄₁ = 82, s₁ = 8. Method B: n₂ = 30, x̄₂ = 78, s₂ = 7. Calculate the t-statistic for independent samples with unequal variances. Show your work.
For independent samples with unequal variances, use Welch's t-test:
\( t = \frac{\bar{x}_1 - \bar{x}_2}{\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}} \)
Given: x̄₁ = 82, x̄₂ = 78, s₁ = 8, s₂ = 7, n₁ = 25, n₂ = 30
Step 1: Calculate numerator: x̄₁ - x̄₂ = 82 - 78 = 4
Step 2: Calculate denominator components: s₁²/n₁ = 64/25 = 2.56
Step 3: Calculate denominator components: s₂²/n₂ = 49/30 = 1.63
Step 4: Calculate denominator: √(2.56 + 1.63) = √4.19 = 2.05
Step 5: Calculate t-statistic: t = 4/2.05 = 1.95
Therefore, the t-statistic is approximately 1.95.
This problem demonstrates Welch's t-test, which is more robust when variances are unequal. The formula uses separate variance estimates for each group, unlike the pooled variance approach. The degrees of freedom are calculated using the Welch-Satterthwaite equation, which typically results in fractional degrees of freedom.
Welch's T-Test: T-test for independent samples with unequal variances
Standard Error: Measure of variability in sample statistic
Pooling: Combining variance estimates from different groups
• Use Welch's t-test when variances are unequal
• Always test for equality of variances
• Report degrees of freedom accordingly
• Levene's test checks for equal variances
• Welch's t-test is more conservative
• Software typically handles this automatically
• Assuming equal variances without testing
• Using pooled variance when variances differ
• Incorrectly calculating standard error
A fitness program is tested on 15 participants. Their weights before the program had a mean of 180 lbs with SD of 12 lbs. After the program, mean weight was 175 lbs with SD of 10 lbs. The mean difference was 5 lbs with SD of differences of 3 lbs. Perform a paired t-test at α = 0.05 to determine if the program was effective.
For paired t-test: \( t = \frac{\bar{d}}{s_d/\sqrt{n}} \)
Given: d̄ = 5 lbs (weight loss), s_d = 3 lbs, n = 15
Step 1: Calculate standard error of differences: SE_d = s_d/√n = 3/√15 = 3/3.87 = 0.775
Step 2: Calculate t-statistic: t = d̄/SE_d = 5/0.775 = 6.45
Step 3: Degrees of freedom: df = n - 1 = 15 - 1 = 14
Step 4: For α = 0.05 (two-tailed), critical t-value ≈ 2.145
Step 5: Since |6.45| > 2.145, we reject H₀.
Conclusion: The fitness program resulted in significant weight loss (p < 0.05).
This demonstrates the paired t-test, which compares the same subjects under two conditions. By using differences, we eliminate between-subject variability, making the test more sensitive to detect changes. The large t-statistic indicates strong evidence against the null hypothesis of no difference. The paired design is particularly powerful for detecting treatment effects.
Paired T-Test: Compares means of same subjects under two conditions
Within-Subject Design: Same participants in both conditions
Mean Difference: Average of individual differences across pairs
• Use paired t-test for dependent samples
• df = n - 1 for paired test
• More powerful than independent samples test
• Look for "before/after", "pre/post", or matched pairs
• Check if subjects are the same in both conditions
• Paired tests are more sensitive to differences
• Using independent samples test for paired data
• Using wrong degrees of freedom
• Not checking for pairing in the design
A company claims their new energy drink increases reaction time by at least 50 ms compared to baseline. A sample of 20 participants shows a mean increase of 52 ms with a standard deviation of 8 ms. Test the company's claim at α = 0.01. State your hypotheses and conclusion.
Set up hypotheses:
H₀: μ ≤ 50 (company's claim not exceeded)
H₁: μ > 50 (company's claim exceeded - right-tailed test)
Given: x̄ = 52 ms, s = 8 ms, n = 20, μ₀ = 50 ms
Step 1: Calculate standard error: SE = s/√n = 8/√20 = 8/4.47 = 1.79
Step 2: Calculate t-statistic: t = (x̄ - μ₀)/SE = (52 - 50)/1.79 = 2/1.79 = 1.12
Step 3: Degrees of freedom: df = n - 1 = 20 - 1 = 19
Step 4: For α = 0.01 (right-tailed), critical t-value ≈ 2.539
Step 5: Since 1.12 < 2.539, we fail to reject H₀.
Conclusion: At α = 0.01, there is insufficient evidence to support the company's claim that the energy drink increases reaction time by more than 50 ms.
This demonstrates a one-sample t-test with a directional alternative hypothesis. The test compares the sample mean to a known or hypothesized population mean. The large sample size requirement for the claim (α = 0.01) and the modest effect size (only 2 ms above claimed value) contribute to the non-significant result. This illustrates the importance of considering both statistical and practical significance.
One-Sample T-Test: Compares sample mean to known/hypothesized value
Hypothesized Mean: The value specified in the null hypothesis
Directional Test: One-tailed test with specific direction
• df = n - 1 for one-sample test
• Use appropriate critical value for test type
• Consider practical vs statistical significance
• Formulate hypotheses before looking at data
• Match significance level to consequences of errors
• Report confidence intervals for context
• Choosing wrong test type (directional vs non-directional)
• Using wrong degrees of freedom
• Misinterpreting non-significant results
Which of the following statements about effect size in t-tests is TRUE?
The answer is B) Effect size measures practical significance. Effect size quantifies the magnitude of the difference between groups, independent of sample size. Cohen's d is commonly used: d = (x̄₁ - x̄₂)/s_pooled. It provides information about the practical importance of the difference, complementing the statistical significance provided by the p-value.
This is crucial for interpreting t-test results. While the p-value tells us whether an effect exists, effect size tells us how large the effect is. With large samples, even tiny differences can be statistically significant, but they may not be practically meaningful. Effect size helps bridge the gap between statistical and practical significance, making results more interpretable in real-world contexts.
Effect Size: Quantitative measure of magnitude of difference
Statistical Significance: Whether result is unlikely due to chance
Practical Significance: Whether result is meaningful in practice
• Effect size is independent of sample size
• Report both p-value and effect size
• Consider context when interpreting effect size
• Always report effect size with significance tests
• Use domain knowledge to interpret effect size
• Consider confidence intervals for effect size
• Confusing effect size with p-value
• Ignoring effect size in favor of p-value only
• Not considering practical significance
Q: When should I use independent samples vs paired samples t-test?
A: Use independent samples t-test when comparing two separate groups:
\( H_0: \mu_1 = \mu_2 \) (different subjects in each group)
Use paired samples t-test when comparing the same subjects under two conditions:
\( H_0: \mu_d = 0 \) (same subjects measured twice)
Examples:
Paired tests are more powerful because they control for individual differences.
Q: How do I determine if variances are equal for independent samples t-test?
A: Use Levene's test or F-test for equality of variances:
\( F = \frac{s_1^2}{s_2^2} \)
Where s₁² and s₂² are sample variances. The test statistic follows an F-distribution.
Guidelines:
Modern approach: Always use Welch's t-test as it's robust to variance inequality and performs similarly when variances are equal.