One-Sample T-test for Means: Comprehensive Guide

Master one-sample t-test for means: calculating test statistics, p-values, and making statistical decisions through these 5 detailed exercises.

One-Sample T-test for Means Fundamentals
t = (x̄ - μ₀)/(s/√n)
T-test Formula for Means
Key Definitions:

Sample Mean (x̄): Average of sample data

Population Mean (μ₀): Hypothesized value under null hypothesis

Sample Standard Deviation (s): Measure of variability in sample

Standard Error: s/√n, measures variability of sample mean

Degrees of Freedom: df = n - 1

5-Step T-test Procedure:
  1. State hypotheses: H₀: μ = μ₀ vs H₁: μ ≠, >, or < μ₀
  2. Check conditions: Normality assumption, independence
  3. Calculate test statistic: t = (x̄ - μ₀)/(s/√n)
  4. Find p-value: Based on t-distribution with df = n-1
  5. Make decision: Compare p-value to α and draw conclusion
Tip 1: Use t-test when σ (population SD) is unknown
Tip 2: Use z-test when σ is known (rare in practice)
Tip 3: For n > 30, t-distribution approximates normal distribution
When to Use: Testing population mean when population SD is unknown
Assumptions: Random sample, independent observations, normal population or large sample
Solution: Exercises 1 to 3
1 Two-Tailed Test
Exercise 1
A manufacturer claims their light bulbs last 1000 hours on average. A sample of 25 bulbs has mean life of 980 hours and standard deviation of 50 hours. Test the claim at α = 0.05.
Problem Setup:

Given: n = 25, x̄ = 980, s = 50, μ₀ = 1000, α = 0.05

Test Procedure:

This is a two-tailed test since we're testing if the mean differs from 1000

Step 1: State the hypotheses

H₀: μ = 1000 (manufacturer's claim is accurate)

H₁: μ ≠ 1000 (manufacturer's claim is inaccurate)

Step 2: Check conditions

Sample size n = 25 < 30, so we need normality assumption

Assuming population is normally distributed

Step 3: Calculate test statistic

t = (x̄ - μ₀)/(s/√n)

t = (980 - 1000)/(50/√25)

t = -20/(50/5) = -20/10 = -2.0

Step 4: Determine degrees of freedom

df = n - 1 = 25 - 1 = 24

Step 5: Find p-value

Two-tailed test: p-value = 2 × P(T₂₄ ≥ |−2.0|) = 2 × P(T₂₄ ≥ 2.0)

From t-table with df = 24: P(T₂₄ ≥ 2.0) ≈ 0.0285

p-value = 2 × 0.0285 = 0.057

Step 6: Make decision

Since p-value (0.057) > α (0.05), fail to reject H₀

Conclusion:

At α = 0.05, there is insufficient evidence to reject the manufacturer's claim that bulbs last 1000 hours on average.

Applied Rules:

• T-test Formula: t = (x̄ - μ₀)/(s/√n) when σ is unknown

• Degrees of Freedom: df = n - 1

• Two-tailed P-value: Multiply tail probability by 2

2 Right-Tailed Test
Exercise 2
A new teaching method is believed to increase test scores. Historically, mean score was 75. A sample of 16 students using the new method had mean score of 78.5 with standard deviation of 8. Test at α = 0.01.
Problem Setup:

Given: n = 16, x̄ = 78.5, s = 8, μ₀ = 75, α = 0.01

Step 1: State the hypotheses

H₀: μ ≤ 75 (new method doesn't increase scores)

H₁: μ > 75 (new method increases scores)

Step 2: Check conditions

Sample size n = 16 < 30, so normality assumption needed

Step 3: Calculate test statistic

t = (78.5 - 75)/(8/√16)

t = 3.5/(8/4) = 3.5/2 = 1.75

Step 4: Determine degrees of freedom

df = 16 - 1 = 15

Step 5: Find p-value

Right-tailed test: p-value = P(T₁₅ ≥ 1.75)

From t-table with df = 15: P(T₁₅ ≥ 1.75) ≈ 0.050

Step 6: Make decision

Since p-value (0.050) > α (0.01), fail to reject H₀

Conclusion:

At α = 0.01, there is insufficient evidence to conclude that the new teaching method increases test scores.

Applied Rules:

• Right-tailed P-value: p-value = P(T ≥ observed value)

• Strict Alpha: α = 0.01 requires stronger evidence

• Conservative Decision: Higher α level would reject H₀

3 Left-Tailed Test
Exercise 3
A company claims their product has at most 10 defects per unit. A sample of 20 units showed mean of 8.5 defects with standard deviation of 2.5. Test at α = 0.05.
Problem Setup:

Given: n = 20, x̄ = 8.5, s = 2.5, μ₀ = 10, α = 0.05

Step 1: State the hypotheses

H₀: μ ≥ 10 (defects are at least 10 per unit)

H₁: μ < 10 (defects are less than 10 per unit)

Step 2: Check conditions

Sample size n = 20 < 30, so normality assumption needed

Step 3: Calculate test statistic

t = (8.5 - 10)/(2.5/√20)

t = -1.5/(2.5/4.472) = -1.5/0.559 = -2.68

Step 4: Determine degrees of freedom

df = 20 - 1 = 19

Step 5: Find p-value

Left-tailed test: p-value = P(T₁₉ ≤ -2.68)

Since t-distribution is symmetric: P(T₁₉ ≤ -2.68) = P(T₁₉ ≥ 2.68)

From t-table with df = 19: P(T₁₉ ≥ 2.68) ≈ 0.0075

Step 6: Make decision

Since p-value (0.0075) ≤ α (0.05), reject H₀

Conclusion:

There is sufficient evidence to conclude that the mean number of defects is less than 10 per unit.

Applied Rules:

• Left-tailed P-value: p-value = P(T ≤ observed value)

• Symmetric Property: Use symmetry for negative t-values

• Decision Rule: Reject H₀ if p-value ≤ α

Solution: Exercises 4 to 5
4 Large Sample Comparison
Exercise 4
Compare the t-test and z-test for a sample of n = 100 with x̄ = 52, s = 10, testing H₀: μ = 50 vs H₁: μ ≠ 50. Show how results converge as sample size increases.
Problem Setup:

Given: n = 100, x̄ = 52, s = 10, μ₀ = 50

Step 1: Calculate t-statistic

t = (52 - 50)/(10/√100) = 2/(10/10) = 2/1 = 2.0

df = 100 - 1 = 99

Step 2: Calculate z-statistic

z = (52 - 50)/(10/√100) = 2/(10/10) = 2/1 = 2.0

(We use s as estimate for σ since σ unknown)

Step 3: Find p-values

T-test: p-value = 2 × P(T₉₉ ≥ 2.0) ≈ 2 × 0.024 = 0.048

Z-test: p-value = 2 × P(Z ≥ 2.0) = 2 × 0.0228 = 0.0456

Step 4: Analyze convergence

With df = 99, t-distribution is very close to standard normal

As n increases, t-distribution approaches normal distribution

For n > 30, t-test and z-test yield nearly identical results

Conclusion:

t-statistic = 2.0, p-value ≈ 0.048 (reject H₀ at α = 0.05)

z-statistic = 2.0, p-value ≈ 0.046 (reject H₀ at α = 0.05)

Results are nearly identical for large samples

Applied Rules:

• Large Sample Convergence: As n → ∞, t-distribution → normal distribution

• Practical Equivalence: For n > 30, t-test and z-test give similar results

• Conservative Approach: Use t-test regardless of sample size

5 Small Sample Considerations
Exercise 5
A sample of 5 measurements gives x̄ = 12, s = 4. Test H₀: μ = 10 vs H₁: μ ≠ 10. Compare the critical values and margins of error for t-test vs z-test and discuss the implications.
Problem Setup:

Given: n = 5, x̄ = 12, s = 4, μ₀ = 10, α = 0.05

Step 1: Calculate t-statistic

t = (12 - 10)/(4/√5) = 2/(4/2.236) = 2/1.789 = 1.12

df = 5 - 1 = 4

Step 2: Find critical values

T-test: For α = 0.05, two-tailed, df = 4: t₀.₀₂₅ = ±2.776

Z-test: For α = 0.05, two-tailed: z₀.₀₂₅ = ±1.96

Step 3: Compare margins of error

T-test MOE = t₀.₀₂₅ × (s/√n) = 2.776 × 1.789 = 4.97

Z-test MOE = z₀.₀₂₅ × (s/√n) = 1.96 × 1.789 = 3.51

Step 4: Make decisions

T-test: |t| = 1.12 < 2.776, so fail to reject H₀

Z-test: |z| = 1.12 < 1.96, so fail to reject H₀

Both lead to same conclusion, but t-test is more conservative

Conclusion:

Both tests fail to reject H₀, but t-test has wider critical region

T-test accounts for uncertainty in estimating σ with small sample

Using z-test with small samples would be too liberal

Applied Rules:

• Small Sample Uncertainty: t-distribution has heavier tails to account for σ estimation

• Conservative Testing: t-test is more appropriate for small samples

• Margin of Error: t-test has larger MOE than z-test for same confidence level

Comprehensive T-test for Means Guide
t = (x̄ - μ₀)/(s/√n)
T-test Formula
Standard Error
SE = s/√n
Variability of sample mean
Test Statistic
t = (x̄ - μ₀)/SE
Standardized difference
Degrees of Freedom
df = n - 1
Determines t-distribution shape
Key Mean Test Concepts:

Population Mean (μ): True mean in the population being studied

Sample Mean (x̄): Observed mean in the sample

Sampling Distribution: Under H₀, t ~ t-distribution(df = n-1) when conditions are met

Effect Size: |x̄ - μ₀|/s, standardized measure of practical significance

Conditions and Assumptions:

Random Sampling: Data must come from a random sample

Independence: Observations must be independent (n ≤ 10% of population)

Normality: Either population is normally distributed OR n ≥ 30 (CLT)

Unknown σ: Population standard deviation is unknown (using s instead)

Memory Tip: "t is for when sigma is TOTALLY unknown" (T vs S)
Memory Tip: "df = degrees of freedom = n - 1 = 'how free are you?'"
Memory Tip: "small n needs t, big n accepts z" (n > 30)
Common Mistakes: Using z instead of t when σ unknown, forgetting df = n-1, misinterpreting p-values
Reporting Best Practices: Include test statistic, df, p-value, sample size, and effect size

Questions & Answers

Question: Why do we use the t-distribution instead of the normal distribution when σ is unknown? What's the fundamental difference?

Answer: This is a fundamental concept in statistical inference! The difference lies in the uncertainty introduced by estimating σ:

When σ is known: The test statistic z = (x̄ - μ₀)/(σ/√n) follows a standard normal distribution. There's no additional uncertainty beyond sampling variability.

When σ is unknown: We substitute s (sample standard deviation) for σ, creating additional uncertainty. The test statistic t = (x̄ - μ₀)/(s/√n) follows a t-distribution.

Key Differences:

  • Shape: t-distribution has heavier tails than normal distribution
  • Variability: t-distribution accounts for uncertainty in estimating σ
  • Degrees of Freedom: Controls shape; as df increases, t approaches normal

Intuitive Explanation: When we estimate σ from the sample, especially with small samples, our estimate might be wrong. The t-distribution's heavier tails provide a "safety net" by requiring more extreme values to achieve significance, accounting for this extra uncertainty.

Question: How do I decide whether to use the normality assumption for small samples? What if my data is skewed?

Answer: This is a critical decision in statistical analysis! Here's how to approach it:

For Small Samples (n < 30):

  • Visual Inspection: Create histograms, boxplots, or Q-Q plots
  • Descriptive Measures: Check skewness and kurtosis
  • Subject Matter Knowledge: Consider the nature of the variable being measured

If Data is Skewed:

  • Data Transformation: Log, square root, or other transformations
  • Non-parametric Tests: Wilcoxon signed-rank test instead of t-test
  • Bootstrap Methods: Resampling techniques for inference

Robustness Considerations: The t-test is reasonably robust to moderate departures from normality, especially with symmetric distributions. However, severe skewness or outliers can seriously affect validity.

Safe Approach: When in doubt, use non-parametric alternatives or try multiple approaches to see if conclusions are consistent.

Question: How does the sample size affect the power of a t-test for means? Why do larger samples make it easier to detect differences?

Answer: Sample size has a profound impact on the power of a t-test! Here's how:

Standard Error Relationship: SE = s/√n, so SE decreases as √n increases

Test Statistic Effect: t = (x̄ - μ₀)/SE, so as SE decreases, |t| increases

Power Increase: Larger samples make it easier to detect true differences because:

  • Sample Estimates Become More Precise: x̄ becomes closer to the true population mean
  • Reduced Sampling Variability: Smaller SE means more sensitive detection
  • Increased Degrees of Freedom: t-distribution approaches normal (more concentrated)
  • Probability of Type II Error Decreases: Power (1-β) increases

Quantitative Example: With μ₀ = 100, x̄ = 102, s = 10:

  • n = 16: t = 2/(10/4) = 0.8, df = 15 (likely not significant)
  • n = 64: t = 2/(10/8) = 1.6, df = 63 (more likely significant)
  • n = 256: t = 2/(10/16) = 3.2, df = 255 (highly significant)

Important Caveat: While larger samples increase statistical significance, they don't necessarily increase practical significance. A statistically significant result in a large sample might represent a trivial difference in practice. Always consider effect size alongside statistical significance!