One-Sample T-Test

Lecture 12

Dave Brocker

Farmingdale State College

Introduction to Comparing Means

Why Compare Means?

  • We often want to test whether a sample mean differs from a known population mean.
  • The one-sample t-test helps determine if the sample mean is significantly different from the hypothesized population mean.
  • Example scenarios:
    • Does the average exam score in a class differ from a national average of 75?
    • Do people’s reaction times differ from a published standard of 250ms?

Assumptions of the One-Sample t-Test

  1. The data are continuous (interval or ratio scale).
  2. The sample is randomly selected.
  3. The data are normally distributed (or the sample size is large enough for the Central Limit Theorem to apply).

The One-Sample t-Test Formula

The test statistic is calculated as:

\[ t = \frac{\bar{X} - \mu}{s / \sqrt{n}} \]

Where:

  • \(\bar{X}\) = sample mean

  • \(\mu\) = population mean (null hypothesis value)

  • \(s\) = sample standard deviation

  • \(n\) = sample size

Example: Exam Scores

Hypothesis Testing Steps

  1. Set Hypotheses:
    • \(H_0\): The average exam score is 75 (\(\mu = 75\)).
    • \(H_A\): The average exam score is not 75 (\(\mu \neq 75\)).
  2. Collect Sample Data:
    • Sample size: \(n = 20\)
    • Sample mean: \(\bar{X} = 78\)
    • Sample standard deviation: \(s = 5\)

Hypothesis Testing Steps

  1. Compute the t-Statistic:

\[ t = \frac{78 - 75}{5 / \sqrt{20}} = \frac{3}{1.118} = 2.68 \]

  1. Compare to Critical Value:
    • Using a \(\alpha = 0.05\) level and df = 19, critical \(t_{.025,19} = \pm 2.093\).
    • Since \(2.68 > 2.093\), we reject \(H_0\).

Reporting Results

APA-style:

A one-sample t-test was conducted to compare exam scores to the national average of 75. Results showed a significant difference, t(19) = 2.68, p < .05, indicating that students scored significantly higher than the national average.

Interpreting Results

  • A significant result (\(p < .05\)) suggests that the sample mean is different from the population mean.
  • A non-significant result (\(p > .05\)) means we fail to reject \(H_0\) (no evidence of a difference).

Visualizing Data

Sample Summary Table

Measure Value
Sample Mean 78
Population Mean 75
Sample SD 5
Sample Size 20
t-Statistic 2.68
p-Value 0.014

Boxplot Example

📝 Example 1: Exam Scores vs. National Average

Scenario

A professor wants to test if students in their class scored differently from the national average of 75 on an exam. A sample of 25 students has a mean score of 78 with a standard deviation of 10.

Hypotheses

  • Null Hypothesis (H₀): ( = 75 ) (no difference)
  • Alternative Hypothesis (H₁): ( ) (scores differ)

Calculation

Using the one-sample t-test formula:

[ t = ]

Substituting values:

[ t = = = 1.5 ]

For df = 24, the critical value at α = .05 (two-tailed) is ±2.064. Since 1.5 < 2.064, we fail to reject (H_0).

APA Reporting

A one-sample t-test was conducted to determine whether students’ exam scores differed from the national average (M = 75). Results were not statistically significant, ( t(24) = 1.5, p > .05 ), indicating that students performed similarly to the national average.

📝 Example 2: Daily Coffee Consumption

Scenario

A coffee company claims that people drink an average of 3 cups of coffee per day. A researcher samples 16 individuals, finding a mean of 2.5 cups and a standard deviation of 1 cup.

Hypotheses

  • Null Hypothesis (H₀): ( = 3 )
  • Alternative Hypothesis (H₁): ( < 3 ) (people drink less)

Calculation

[ t = = = -2.0 ]

For df = 15, the critical t-value for a one-tailed test at α = .05 is -1.753. Since -2.0 < -1.753, we reject (H_0).

APA Reporting

A one-sample t-test was conducted to test whether daily coffee consumption was lower than the reported average of 3 cups. Results showed a significant difference, ( t(15) = -2.0, p < .05 ), suggesting that people consume significantly fewer cups of coffee per day than reported.

📝 Example 3: Sleep Duration Among College Students

Scenario

A health researcher believes college students sleep less than 7 hours per night. A sample of 30 students reports a mean of 6.5 hours with a standard deviation of 1.2 hours.

Hypotheses

  • Null Hypothesis (H₀): ( = 7 )
  • Alternative Hypothesis (H₁): ( < 7 )

Calculation

[ t = = = -2.28 ]

For df = 29, the critical t-value for a one-tailed test at α = .05 is -1.699. Since -2.28 < -1.699, we reject (H_0).

APA Reporting

A one-sample t-test was conducted to test whether college students sleep fewer than 7 hours per night. Results were statistically significant, ( t(29) = -2.28, p < .05 ), indicating that students get significantly less sleep than the recommended amount.

Conclusion

One Sample T-Test

  • The one-sample t-test is useful for comparing a sample mean to a known population mean.
  • Always check assumptions before conducting the test.
  • Report results in APA format, including effect size if necessary.