
carry out one-sample and paired t-tests, computing the t statistic and P-value by hand and with technology, and connect each test to the matching confidence interval.
Instruction
The one-sample t-test. For H0: μ = μ0, the test statistic is
t = (x̄ − μ0) / (s/√n), df = n − 1
with the same conditions as the t-interval: random, 10%, and normal or large sample.
Example 1: a claim about St. Louis’s climate. Someone claims St. Louis’s mean daily high over 2000-2024 is 72°F. Test H0: μ = 72 against Ha: μ ≠ 72 at α = 0.05 with the random sample of 30 days from Lesson 2.2 (x̄ = 61.20°F, s = 22.596°F).
t = (61.20 − 72)/(22.596/√30) = -10.80/4.125 ≈ -2.62, df = 29
Two-sided P-value = 2 × P(T29 ≤ -2.62) ≈ 0.014 (=T.DIST.2T(2.62, 29)). Since 0.014 < 0.05, reject H0: the sample gives convincing evidence that the mean daily high is not 72°F. Consistency check: the 95% t-interval from Lesson 2.2, 52.76 to 69.64, does not contain 72. A two-sided test at α = 0.05 and a 95% interval always agree in this way. Here we also know the truth: μ = 67.59°F. H0 was false, and the test correctly rejected it.
Paired t-tests. With paired data, compute the difference for each pair and run a one-sample t-test on the differences with H0: μd = 0.
Example 2: is Springfield wetter than Kansas City? NOAA Global Summary of the Year, calendar-year precipitation, 1995-2024, paired by year (n = 30). Differences d = Springfield − Kansas City: d̄ = 5.339 in, sd = 7.204 in. H0: μd = 0; Ha: μd ≠ 0.
t = 5.339/(7.204/√30) = 5.339/1.315 ≈ 4.06, df = 29, P ≈ 0.0003
Reject H0. In the same years, Springfield recorded more rain than Kansas City International Airport, by about 5.3 inches a year on average. Springfield’s yearly totals range over 29 inches from the driest year to the wettest, but pairing removes much of that shared variation, because wet years are wet at both stations. A two-sample test that ignored the pairing would lose that advantage (t = 2.85 instead of 4.06).
Example 3: a very strong result. St. Louis minus Springfield annual mean temperature, 1995-2024 (paired by year): d̄ = 0.810°F, sd = 0.569, t = 0.810/(0.569/√30) ≈ 7.80, df = 29, P ≈ 1.3 × 10−8. Report very small P-values as “P < 0.001” rather than as a string of zeros. Their exact size carries no extra meaning.
Conditions, honestly. Years are not a random sample. These tests treat each year’s difference as a draw from a stable process of year-to-year variation. If there were a trend in the differences, or if consecutive years were strongly related, the P-values would be less trustworthy. Plot the differences against year before you test, and say what you see.
By hand and by machine. Compute t by hand to understand it. Use =T.DIST.2T(|t|, df) for a two-sided P-value (=T.DIST.RT for one-sided), =T.TEST(range1, range2, 2, 1) for a paired test directly, or GeoGebra’s Student t distribution to shade the tail.
📖 Read for this lesson
The reading opens over the lesson; close it to come back to exactly where you were. The checks below draw on it.
Formative check
Work through these before moving on. They are not graded — they tell you whether the standard below has landed yet.
For H₀: μ = 72 with x̄ = 61.20, s = 22.596, n = 30, t = -10.80/ ≈ .
A 95% t-interval for μ is 52.76 to 69.64. What will a two-sided test of H₀: μ = 72 at α = 0.05 conclude?
Simulation & tools
Paired differences from two stations
Data: NOAA NCEI Global Summary of the Year, 1995-2024, for USW00013995 (Springfield) and USW00003947 (Kansas City), with PRCP (import URL as in RLP Statistics A Lesson 1.3, with startDate=1995-01-01). The Lesson 3.2 reading prints the 30 years for four stations.
- Arrange the data so each year has one row with both stations’ totals (in CODAP, drag STATION to create a grouping, or build the paired table in a spreadsheet and import it).
- Add an attribute d = SGF − KCI. Dot-plot d, and plot d against year. Is there a trend or an outlier?
- Record the mean and SD of d and compute t by hand. Compare with d̄ = 5.339 and sd = 7.204.
- Now ignore the pairing: compute a two-sample t statistic from the two stations’ means and SDs. Why is it so much smaller?
Spreadsheet route: two columns, a difference column, then =T.TEST(SGF, KCI, 2, 1) for the paired P-value and =T.TEST(SGF, KCI, 2, 3) for the unpaired one.
Open in a new tab ↗ · CODAP, Concord Consortium · MIT open source
Choose two Missouri stations and a variable from NOAA’s Global Summary of the Year (the Lesson 3.2 reading prints precipitation for four stations, and the Lesson 2.4 reading prints temperature for three). Pose a two-sided question, carry out a paired t-test for 1995-2024 (hypotheses, conditions with a plot of the differences, t, df, P-value, conclusion), and give the matching 95% interval. State one reason the P-value might be less trustworthy than it looks.
How confident are you that you can carry out one-sample and paired t-tests and connect them to confidence intervals?
Practice
Work these on paper or in your notebook, then open Check your answer. Aim for all of Fluency and Application; try at least one Challenge.
Printable version: this unit’s practice workbook (PDF)
Fluency
Build speed and accuracy with the core skill.
- A sample of 16 has x̄ = 52.4 and s = 6. Find t for H₀: μ = 50.
Check your answer
Answer: t = 2.4/1.5 = 1.6 (df = 15). - Find the two-sided P-value for t = 1.6 with df = 15.
Check your answer
Answer: ≈ 0.130. - Find the two-sided P-value for t = 2.53 with df = 29.
Check your answer
Answer: ≈ 0.017. - Paired differences: n = 20, d̄ = 1.1, s_d = 2.0. Find t and the two-sided P-value for H₀: μ_d = 0.
Check your answer
Answer: t ≈ 2.460, P ≈ 0.0237. - A 95% t-interval for μ is (65.9, 73.1). Will a two-sided test of H₀: μ = 72 at α = 0.05 reject?
Check your answer
Answer: No: 72 is inside the interval. - What should you plot before a paired t-test on yearly differences, and why?
Check your answer
Answer: The differences (a dot plot, and against year) to check for outliers, strong skew and trends that would violate the conditions.
Application
Use the skill in context. Show your reasoning.
- A random sample of 25 Springfield daily highs (2000-2024) has x̄ = 67.60°F and s = 25.18°F. A travel site claims Springfield’s average daily high is 72°F. Test H₀: μ = 72 against Hₐ: μ ≠ 72.
Check your answer
Answer: t = (67.60 − 72)/(25.18/5) ≈ -0.87, df = 24, P ≈ 0.391. Fail to reject H₀: the sample does not give convincing evidence that the mean differs from 72°F.Here the population mean is known from the full record (about 67.92°F), so H₀ is actually false: this is a Type II error, likely because n = 25 gives little power with daily highs this variable. - St. Louis minus Kansas City precipitation, paired by year, 1995-2024 (NOAA): d̄ = 3.414 in, s_d = 9.065 in, n = 30. Test whether St. Louis averages more rain than Kansas City (Hₐ: μ_d > 0).
Check your answer
Answer: t ≈ 2.06, df = 29, one-sided P ≈ 0.024. Convincing evidence at α = 0.05 (but not at 0.01) that St. Louis recorded more rain than Kansas City in the same years, by about 3.4 inches a year on average.Paired by year: wet years are wet at both stations. The differences vary a lot from year to year, so the evidence is only moderate. - Joplin minus St. Louis annual mean temperature, paired by year, 1995-2024 (30 years with both values): d̄ = 0.880°F, s_d = 0.780°F. Carry out a two-sided paired t-test and give the 95% interval.
Check your answer
Answer: t ≈ 6.18, df = 29, P < 0.001. 95% interval ≈ (0.59, 1.17)°F: Joplin’s airport station averaged between about 0.6 and 1.2°F warmer than St. Louis’s in the same years.
Challenge
Stretch problems. Expect to think before you write.
- Explain why a two-sided test at α = 0.05 rejects H₀: μ = μ₀ exactly when μ₀ lies outside the 95% t-interval.
Check your answer
Answer: The test rejects when |x̄ − μ₀| > t*·SE. The interval contains exactly the μ₀ values with |x̄ − μ₀| ≤ t*·SE, using the same t* and SE. So ‘outside the interval’ and ‘reject’ are the same condition.
Review
Keep earlier skills sharp.
- (Unit 2) Find the 95% t-interval for n = 16, x̄ = 52.4, s = 6.
Check your answer
Answer: 52.4 ± 2.131 × 1.5 ≈ (49.20, 55.60). - (Unit 1) Find P(Z > 2.53) for a standard normal Z.
Check your answer
Answer: ≈ 0.0057.
Thirty Rain Years at Four Missouri Airports: The Pairs Behind the Paired Test
NOAA NCEI Global Summary of the Year, element PRCP, stations USW00013994, USW00013995, USW00003947 and USW00003945, 1995-2024; retrieved 2026-11-10 · Public domain (works of the United States government), with SLS original worked computation
Why this reading. The lesson’s paired test of Springfield against Kansas City rests on 30 yearly differences it summarizes but does not show, and the lab and open question both ask you to pair two Missouri stations from the same NOAA product. Here are four stations for the same 30 years, so the lesson’s test can be checked line by line and any of six pairings can be tested without a download. The Lesson 2.4 reading has the temperature series for the same job.
Table 1. Calendar-year precipitation (inches), 1995–2024
NOAA NCEI Global Summary of the Year, element PRCP: USW00013994 (St. Louis Lambert International), USW00013995 (Springfield-Branson National), USW00003947 (Kansas City International), USW00003945 (Columbia Regional). Retrieved 2026-11-10; no station is missing a year.
| Year | St. Louis | Springfield | Kansas City | Columbia | Springfield − Kansas City |
|---|---|---|---|---|---|
| 1995 | 41.66 | 41.87 | 34.65 | 48.27 | +7.22 |
| 1996 | 43.70 | 44.89 | 40.46 | 40.02 | +4.43 |
| 1997 | 31.24 | 38.50 | 33.10 | 37.20 | +5.40 |
| 1998 | 43.64 | 48.49 | 49.57 | 44.70 | −1.08 |
| 1999 | 34.07 | 41.54 | 40.11 | 29.81 | +1.43 |
| 2000 | 37.39 | 35.39 | 35.01 | 39.30 | +0.38 |
| 2001 | 35.33 | 45.32 | 53.51 | 40.54 | −8.19 |
| 2002 | 40.98 | 37.87 | 24.80 | 42.33 | +13.07 |
| 2003 | 46.09 | 42.63 | 27.98 | 39.45 | +14.65 |
| 2004 | 42.30 | 43.25 | 37.60 | 45.98 | +5.65 |
| 2005 | 37.87 | 35.33 | 44.15 | 41.24 | −8.82 |
| 2006 | 29.94 | 38.90 | 30.90 | 30.15 | +8.00 |
| 2007 | 30.57 | 44.30 | 33.05 | 32.96 | +11.25 |
| 2008 | 57.96 | 60.15 | 44.69 | 56.81 | +15.46 |
| 2009 | 50.94 | 51.88 | 44.96 | 50.47 | +6.92 |
| 2010 | 39.12 | 46.18 | 41.92 | 46.00 | +4.26 |
| 2011 | 47.20 | 40.62 | 36.94 | 39.70 | +3.68 |
| 2012 | 32.33 | 30.97 | 22.31 | 30.93 | +8.66 |
| 2013 | 42.69 | 51.89 | 34.50 | 41.53 | +17.39 |
| 2014 | 43.45 | 38.63 | 40.10 | 44.16 | −1.47 |
| 2015 | 61.28 | 59.76 | 46.61 | 49.77 | +13.15 |
| 2016 | 41.46 | 36.26 | 48.67 | 40.09 | −12.41 |
| 2017 | 36.69 | 47.56 | 46.04 | 37.65 | +1.52 |
| 2018 | 42.62 | 44.89 | 40.78 | 34.80 | +4.11 |
| 2019 | 54.02 | 54.49 | 53.22 | 45.01 | +1.27 |
| 2020 | 50.02 | 49.71 | 34.10 | 44.74 | +15.61 |
| 2021 | 42.51 | 46.97 | 41.26 | 53.26 | +5.71 |
| 2022 | 48.96 | 43.28 | 34.57 | 34.09 | +8.71 |
| 2023 | 33.18 | 43.08 | 37.40 | 34.64 | +5.68 |
| 2024 | 50.84 | 43.21 | 34.67 | 47.05 | +8.54 |
The lesson’s paired test, checked
The 30 differences in the last column sum to 160.18, so d̄ = 5.339 in; the sum of squared deviations is 1505.05, so sd = √(1505.05/29) = 7.204. SE = 7.204/√30 = 1.315; t = 5.339/1.315 = 4.06, df = 29. From Table 2 of the critical-values reading, the upper tail beyond 4.0 at df 29 is 0.0002, so the two-sided P is a little under 0.0004; T.DIST.2T(4.06, 29) = 0.0003. Matching interval: 5.339 ± 2.045(1.315) = 2.65 to 8.03 in.
Plot the differences before you trust the test. Against year, they scatter between −12.41 (2016) and +17.39 (2013); 5 of 30 are negative (1998, 2001, 2005, 2014, 2016). A dot plot is roughly symmetric. Nothing there undermines the t procedure; the caveat that remains is the one the lesson names, that consecutive years are not independent draws.
What ignoring the pairing would have cost
Two-sample t on the same 60 numbers: means 44.26 and 38.92, SDs 6.828 and 7.667. SE = √(6.8282/30 + 7.6672/30) = 1.874; t = 5.339/1.874 = 2.85, Welch df 57.2, P ≈ 0.0061. The same difference in means, much weaker evidence (t = 2.85 against 4.06). The year-to-year swings are shared by both stations, and the paired analysis removes them; the two-sample analysis leaves them in the denominator. That is the whole argument for pairing, as numbers.
For the lab and the open question
Choose any two columns. All six pairings, each with the same 30-year paired test:
| Pairing (first minus second) | d̄ (in) | sd | t (df 29) | Two-sided P | 95% interval (in) |
|---|---|---|---|---|---|
| St. Louis − Springfield | −1.93 | 5.85 | −1.80 | 0.082 | -4.11 to 0.26 |
| St. Louis − Kansas City | +3.41 | 9.07 | +2.06 | 0.048 | 0.03 to 6.80 |
| St. Louis − Columbia | +0.91 | 5.76 | +0.87 | 0.39 | -1.24 to 3.06 |
| Springfield − Kansas City | +5.34 | 7.20 | +4.06 | 0.0003 | 2.65 to 8.03 |
| Springfield − Columbia | +2.84 | 6.11 | +2.54 | 0.017 | 0.56 to 5.12 |
| Kansas City − Columbia | −2.50 | 8.02 | −1.71 | 0.098 | -5.50 to 0.50 |
For each pairing you choose: hypotheses about μd, a plot of the differences against year, t, the P-value, the interval, and a sentence on why the P-value might be less trustworthy than it looks (consecutive years are not independent, and these are instrument records, not samples). Some of these tests are borderline, which makes them better practice than the clear ones.
Sources: NOAA NCEI, Global Summary of the Year data search (ncei.noaa.gov); NOAA NCEI Access Data Service (the query used here) (ncei.noaa.gov)
The Tables: t Critical Values, t Tail Areas, Chi-Square and z
Critical values and tail areas of the t, chi-square and standard normal distributions, computed for this course and rounded; any published table will agree · SLS original
Why this reading. Several lessons tell you to compute a t-interval or a P-value “by hand” and then confirm with T.INV.2T or CHISQ.DIST.RT. The lessons print five t* values and two chi-square critical values between them. This page is the rest: enough of each table to do every hand computation in Units 2 to 4, and to bracket a P-value without a device. All values were computed for this course and rounded to three decimals; a printed table in any textbook will agree.
Table 1. Critical values t* of Student’s t
The column heading gives the confidence level for a two-sided interval and, in parentheses, the area in one tail. For a one-sided test at α = 0.05, use the 0.05-tail column (90%); for a two-sided test at α = 0.05, the 0.025-tail column (95%). If your df is not listed, use the next smaller df, which is conservative.
| df | 80% (tail 0.10) | 90% (tail 0.05) | 95% (tail 0.025) | 98% (tail 0.01) | 99% (tail 0.005) | 99.9% (tail 0.0005) |
|---|---|---|---|---|---|---|
| 1 | 3.078 | 6.314 | 12.706 | 31.821 | 63.657 | 636.619 |
| 2 | 1.886 | 2.920 | 4.303 | 6.965 | 9.925 | 31.599 |
| 3 | 1.638 | 2.353 | 3.182 | 4.541 | 5.841 | 12.924 |
| 4 | 1.533 | 2.132 | 2.776 | 3.747 | 4.604 | 8.610 |
| 5 | 1.476 | 2.015 | 2.571 | 3.365 | 4.032 | 6.869 |
| 6 | 1.440 | 1.943 | 2.447 | 3.143 | 3.707 | 5.959 |
| 7 | 1.415 | 1.895 | 2.365 | 2.998 | 3.499 | 5.408 |
| 8 | 1.397 | 1.860 | 2.306 | 2.896 | 3.355 | 5.041 |
| 9 | 1.383 | 1.833 | 2.262 | 2.821 | 3.250 | 4.781 |
| 10 | 1.372 | 1.812 | 2.228 | 2.764 | 3.169 | 4.587 |
| 12 | 1.356 | 1.782 | 2.179 | 2.681 | 3.055 | 4.318 |
| 14 | 1.345 | 1.761 | 2.145 | 2.624 | 2.977 | 4.140 |
| 16 | 1.337 | 1.746 | 2.120 | 2.583 | 2.921 | 4.015 |
| 18 | 1.330 | 1.734 | 2.101 | 2.552 | 2.878 | 3.922 |
| 19 | 1.328 | 1.729 | 2.093 | 2.539 | 2.861 | 3.883 |
| 20 | 1.325 | 1.725 | 2.086 | 2.528 | 2.845 | 3.850 |
| 24 | 1.318 | 1.711 | 2.064 | 2.492 | 2.797 | 3.745 |
| 25 | 1.316 | 1.708 | 2.060 | 2.485 | 2.787 | 3.725 |
| 29 | 1.311 | 1.699 | 2.045 | 2.462 | 2.756 | 3.659 |
| 30 | 1.310 | 1.697 | 2.042 | 2.457 | 2.750 | 3.646 |
| 40 | 1.303 | 1.684 | 2.021 | 2.423 | 2.704 | 3.551 |
| 50 | 1.299 | 1.676 | 2.009 | 2.403 | 2.678 | 3.496 |
| 53 | 1.298 | 1.674 | 2.006 | 2.399 | 2.672 | 3.484 |
| 56 | 1.297 | 1.673 | 2.003 | 2.395 | 2.667 | 3.473 |
| 60 | 1.296 | 1.671 | 2.000 | 2.390 | 2.660 | 3.460 |
| 73 | 1.293 | 1.666 | 1.993 | 2.379 | 2.645 | 3.429 |
| 80 | 1.292 | 1.664 | 1.990 | 2.374 | 2.639 | 3.416 |
| 100 | 1.290 | 1.660 | 1.984 | 2.364 | 2.626 | 3.390 |
| 199 | 1.286 | 1.653 | 1.972 | 2.345 | 2.601 | 3.340 |
| 1,000 (≈ z) | 1.282 | 1.646 | 1.962 | 2.330 | 2.581 | 3.300 |
Table 2. Upper-tail areas P(Tdf > t), for bracketing a P-value
For a two-sided P-value, double the area. Example: t = 2.53 with df = 29 sits between 2.5 (area 0.0092) and 3.0 (area 0.0027), so the two-sided P is between 0.005 and 0.018; the spreadsheet gives 0.017. The df rows are the ones the course’s examples use: 6 (CDC slope, 8 years), 9 and 18 (music experiment), 17 (CDC paired changes), 29 (samples of 30), 53 and 56 (Welch df for the era comparisons), 73 (75-year regressions).
| df t | 1.0 | 1.5 | 2.0 | 2.5 | 3.0 | 3.5 | 4.0 | 5.0 |
|---|---|---|---|---|---|---|---|---|
| 6 | 0.1780 | 0.0921 | 0.0462 | 0.0233 | 0.0120 | 0.0064 | 0.0036 | 0.0012 |
| 9 | 0.1717 | 0.0839 | 0.0383 | 0.0169 | 0.0075 | 0.0034 | 0.0016 | 0.0004 |
| 17 | 0.1657 | 0.0760 | 0.0309 | 0.0115 | 0.0040 | 0.0014 | 0.0005 | 0.0001 |
| 18 | 0.1653 | 0.0755 | 0.0304 | 0.0112 | 0.0038 | 0.0013 | 0.0004 | 0.0000 |
| 29 | 0.1628 | 0.0722 | 0.0275 | 0.0092 | 0.0027 | 0.0008 | 0.0002 | 0.0000 |
| 53 | 0.1609 | 0.0698 | 0.0253 | 0.0078 | 0.0021 | 0.0005 | 0.0001 | 0.0000 |
| 56 | 0.1608 | 0.0696 | 0.0252 | 0.0077 | 0.0020 | 0.0005 | 0.0001 | 0.0000 |
| 73 | 0.1603 | 0.0690 | 0.0246 | 0.0073 | 0.0018 | 0.0004 | 0.0001 | 0.0000 |
| 1000 | 0.1588 | 0.0670 | 0.0229 | 0.0063 | 0.0014 | 0.0002 | 0.0000 | 0.0000 |
Table 3. Chi-square critical values (upper tail) and the mean of each distribution
The P-value of a chi-square test is always the upper-tail area. A statistic near the df is unremarkable; a statistic above the 0.05 column is significant at α = 0.05.
| df | Tail 0.10 | Tail 0.05 | Tail 0.01 | Tail 0.001 | Mean |
|---|---|---|---|---|---|
| 1 | 2.71 | 3.84 | 6.63 | 10.83 | 1 |
| 2 | 4.61 | 5.99 | 9.21 | 13.82 | 2 |
| 3 | 6.25 | 7.81 | 11.34 | 16.27 | 3 |
| 4 | 7.78 | 9.49 | 13.28 | 18.47 | 4 |
| 5 | 9.24 | 11.07 | 15.09 | 20.52 | 5 |
| 6 | 10.64 | 12.59 | 16.81 | 22.46 | 6 |
| 7 | 12.02 | 14.07 | 18.48 | 24.32 | 7 |
| 8 | 13.36 | 15.51 | 20.09 | 26.12 | 8 |
| 9 | 14.68 | 16.92 | 21.67 | 27.88 | 9 |
| 10 | 15.99 | 18.31 | 23.21 | 29.59 | 10 |
| 11 | 17.28 | 19.68 | 24.72 | 31.26 | 11 |
| 12 | 18.55 | 21.03 | 26.22 | 32.91 | 12 |
Table 4. Standard normal upper tails for tests
| z | 1.00 | 1.28 | 1.50 | 1.65 | 1.96 | 2.00 | 2.24 | 2.50 | 2.58 | 3.00 | 3.50 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Upper tail | 0.1587 | 0.1003 | 0.0668 | 0.0500 | 0.0250 | 0.0228 | 0.0125 | 0.0062 | 0.0050 | 0.0013 | 0.0002 |
Two-sided P = 2 × upper tail. For z = 2.00, 2 × 0.0228 = 0.0455. The full table of Φ(z) is in the Lesson 1.2 reading.
How to bracket, and how to report
Find your df row. Move right until the table value exceeds your statistic; your tail area is between that column’s tail and the previous one’s. Report the bracket (“0.01 < P < 0.02”), then the exact value from technology. If your statistic is beyond the last column, report “P < 0.001” and stop; the exact size of a very small P-value carries no extra meaning, as Lesson 3.2 says.
Sources: Python documentation, the statistics module (NormalDist) (docs.python.org)