t-Test

In short: t-test checks a claim about an average, or about the gap between two averages, by counting how many standard errors the sample result sits from the null value and consulting the t curve.
AP StatisticsStatisticsAP Statistics Unit 4
What is t-Test?
A t-test asks whether a sample mean is far enough from a claimed value to rule out chance. The distance is measured in standard errors:
\[t = \frac{\bar{x} – \mu_0}{s/\sqrt{n}}\]
The statistic is compared with the t-distribution with \(df = n – 1\) to get a p-value. The test is used when the population standard deviation is unknown, which is almost always. Conditions: random sample, independent observations, and a roughly normal population or \(n \ge 30\). Variants include the one-sample test, the paired test and the two-sample test.
How to spot it
- A claim about an average, such as battery life or mean weight, is checked with a small sample, a typical t-test setting.
- Only the sample standard deviation is given, not the population’s.
- The wording asks whether the data show the true average has fallen below, or risen above, a stated number.
- Two groups of measurements are compared for a difference in means.
The method
- State \(H_0: \mu = \mu_0\) and the alternative \(H_a\); define \(\mu\) in context.
- Verify random sampling, independence, and a roughly normal shape or \(n \ge 30\).
- Calculate \(t = \frac{\bar{x} – \mu_0}{s/\sqrt{n}}\), with \(df = n – 1\), and find the p-value.
- Compare with \(\alpha\) and conclude in context.
t-Test: solved example
Problem
A company advertises 12 hours of battery on its fitness tracker. A reviewer runs 16 trackers down and records a mean of 11.2 hours with \(s = 1.6\). At \(\alpha = 0.05\), does this show the true mean is below 12 hours? Battery life is roughly normal.
Solution
\(H_0: \mu = 12\), \(H_a: \mu < 12\), with \(\mu\) the true mean battery life in hours.
\(t = \frac{11.2 – 12}{1.6/\sqrt{16}} = \frac{-0.8}{0.4} = -2.0\), with \(df = 15\). The left-tail p-value is about 0.032.
Because \(0.032 < 0.05\), \(H_0\) is rejected: the sample backs the claim that the average battery falls short of 12 hours.
Try it
Question 1
A sample of 25 gives \(\bar{x} = 52\) and \(s = 10\). Find the \(t\) statistic for \(H_0: \mu = 48\).
Show the answer
\(t = \frac{52 – 48}{10/5} = \frac{4}{2} = 2.0\), with \(df = 24\).
Question 2
The one-sided tail area is 0.032. Is the result still significant at \(\alpha = 0.05\) if the alternative is two-sided?
Show the answer
No. Counting both tails doubles it to about 0.064, which is above 0.05, so the cutoff is missed.
t-Test vs. Chi-Square Test
The t-test compares quantitative measurements, such as hours or pounds, and centers on means. The chi-square test compares counts in categories. A good habit is to ask: am I averaging numbers, or counting people in groups?
Keep going
Lessons
Worksheets and quizzes
- t Intervals and t Tests for a Mean – Worksheet
- t Intervals and t Tests for a Mean – Quiz
- Inference for the Difference of Two Means – Worksheet
- Inference for the Difference of Two Means – Quiz
Related words
Whole dictionary: A–Z · AP Statistics · Statistics