THE VR SCHOOL
  • Schools & Districts
    • License the academy
    • Free program for your students
    • Request a demo
  • Catalog
    • AI & Data
    • Cybersecurity & Web
    • Programming
    • Health Science
    • All Guilds
    • All courses
  • Families
  • Accreditation
  • Log In
  • Request a demo
  • Home
  • Courses

RLP Statistics B — Probability Models and Statistical Inference

Curriculum

  • 4 Sections
  • 20 Lessons
  • 10 Weeks
Expand all sectionsCollapse all sections
  • Unit 1: Continuous Distributions and Sampling Distributions
    5
    • 1.1
      Continuous Random Variables and Density Curves
      50 mins
    • 1.2
      The Normal Distribution
      50 mins
    • 1.3
      When Is a Normal Model Appropriate?
      50 mins
    • 1.4
      Sampling Distributions and the Central Limit Theorem
      50 mins
    • 1.5
      Performance Task — Sampling Distribution Simulation Study
      150 mins
  • Unit 2: Estimating with Confidence
    5
    • 2.1
      Estimating a Proportion with Confidence
      50 mins
    • 2.2
      Confidence Intervals for a Mean
      50 mins
    • 2.3
      What Confidence Means, and What It Does Not
      50 mins
    • 2.4
      Comparing Two Groups with Confidence Intervals
      50 mins
    • 2.5
      Performance Task — Estimation Study
      150 mins
  • Unit 3: Testing Claims: Significance Tests
    5
    • 3.1
      The Logic of a Significance Test
      50 mins
    • 3.2
      t-Tests for Means and Paired Data
      50 mins
    • 3.3
      Errors, Power and Significance in the Real World
      50 mins
    • 3.4
      Two-Sample Tests from Experiments and Observational Data
      50 mins
    • 3.5
      Performance Task — Significance Test Investigation
      150 mins
  • Unit 4: Chi-Square, Regression Inference and the Capstone Study
    5
    • 4.1
      Chi-Square Goodness of Fit
      50 mins
    • 4.2
      Chi-Square Tests for Two-Way Tables
      50 mins
    • 4.3
      Inference for the Slope of a Regression Line
      50 mins
    • 4.4
      Choosing the Right Procedure and Writing It Up
      50 mins
    • 4.5
      Capstone — Full Statistical Inference Study
      200 mins

t-Tests for Means and Paired Data

Unit 3  ·  Data Investigation Lab  ·  Lesson 12 of 20

t-Tests for Means and Paired Data

PS.18RLP-STATSB
Two paired rain gauges and a difference plot show measurements consistently above a central reference line.
By the end of this lesson I can…

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.

  • Thirty Rain Years at Four Missouri Airports: The Pairs Behind the Paired TestNOAA NCEI Global Summary of the Year, element PRCP, stations USW00013994, USW00013995, USW00003947 and USW00003945, 1995-2024; retrieved 2026-11-10 · about 4 min

    Thirty rain years at four stations: the Springfield minus Kansas City pairs behind the lesson’s test, checked line by line, the two-sample test that ignores the pairing for contrast, and all six pairings for the lab.

  • The Tables: t Critical Values, t Tail Areas, Chi-Square and zCritical values and tail areas of the t, chi-square and standard normal distributions, computed for this course and rounded; any published table will agree · about 4 min

    Tail areas at df 29 for bracketing the P-value by hand.

Vocabulary in context

  • one-sample t-test — A test of H₀: μ = μ₀ using t = (x̄ − μ₀)/(s/√n) with n − 1 degrees of freedom.
  • paired t-test — A one-sample t-test on the differences within matched pairs, usually testing μ_d = 0.
  • two-sided test — A test with Hₐ: parameter ≠ null value; the P-value counts extreme results in both directions.
  • duality — A two-sided test at level α rejects H₀ exactly when the (1 − α) confidence interval excludes the null value.

Formative check

Work through these before moving on. They are not graded — they tell you whether the standard below has landed yet.

Fill in the blank

For H₀: μ = 72 with x̄ = 61.20, s = 22.596, n = 30, t = -10.80/ ≈ .

+50 XP

A 95% t-interval for μ is 52.76 to 69.64. What will a two-sided test of H₀: μ = 72 at α = 0.05 conclude?

A two-sided test at α = 0.05 rejects exactly the null values that fall outside the 95% interval.

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.

  1. 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).
  2. Add an attribute d = SGF − KCI. Dot-plot d, and plot d against year. Is there a trend or an outlier?
  3. Record the mean and SD of d and compute t by hand. Compare with d̄ = 5.339 and sd = 7.204.
  4. 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.

0 words
Quick self-check

How confident are you that you can carry out one-sample and paired t-tests and connect them to confidence intervals?

Not yetVery confident

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.

  1. 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).
  2. Find the two-sided P-value for t = 1.6 with df = 15.
    Check your answer
    Answer: ≈ 0.130.
  3. Find the two-sided P-value for t = 2.53 with df = 29.
    Check your answer
    Answer: ≈ 0.017.
  4. 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.
  5. 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.
  6. 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.

  1. 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.
  2. 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.
  3. 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.

  1. 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.

  1. (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).
  2. (Unit 1) Find P(Z > 2.53) for a standard normal Z.
    Check your answer
    Answer: ≈ 0.0057.

Missouri Learning Standards — Mathematics (data and probability) addressed: A2.DS.A.2, A2.DS.A.4, MP.5, MP.6

Extends beyond Missouri Statistics (enrichment): content Missouri places after Statistics

Instructional focus: One-sample and paired t-tests on real data

Reading

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.

YearSt. LouisSpringfieldKansas CityColumbiaSpringfield − Kansas City
199541.6641.8734.6548.27+7.22
199643.7044.8940.4640.02+4.43
199731.2438.5033.1037.20+5.40
199843.6448.4949.5744.70−1.08
199934.0741.5440.1129.81+1.43
200037.3935.3935.0139.30+0.38
200135.3345.3253.5140.54−8.19
200240.9837.8724.8042.33+13.07
200346.0942.6327.9839.45+14.65
200442.3043.2537.6045.98+5.65
200537.8735.3344.1541.24−8.82
200629.9438.9030.9030.15+8.00
200730.5744.3033.0532.96+11.25
200857.9660.1544.6956.81+15.46
200950.9451.8844.9650.47+6.92
201039.1246.1841.9246.00+4.26
201147.2040.6236.9439.70+3.68
201232.3330.9722.3130.93+8.66
201342.6951.8934.5041.53+17.39
201443.4538.6340.1044.16−1.47
201561.2859.7646.6149.77+13.15
201641.4636.2648.6740.09−12.41
201736.6947.5646.0437.65+1.52
201842.6244.8940.7834.80+4.11
201954.0254.4953.2245.01+1.27
202050.0249.7134.1044.74+15.61
202142.5146.9741.2653.26+5.71
202248.9643.2834.5734.09+8.71
202333.1843.0837.4034.64+5.68
202450.8443.2134.6747.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)sdt (df 29)Two-sided P95% interval (in)
St. Louis − Springfield−1.935.85−1.800.082-4.11 to 0.26
St. Louis − Kansas City+3.419.07+2.060.0480.03 to 6.80
St. Louis − Columbia+0.915.76+0.870.39-1.24 to 3.06
Springfield − Kansas City+5.347.20+4.060.00032.65 to 8.03
Springfield − Columbia+2.846.11+2.540.0170.56 to 5.12
Kansas City − Columbia−2.508.02−1.710.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)

Reading

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.

df80%
(tail 0.10)
90%
(tail 0.05)
95%
(tail 0.025)
98%
(tail 0.01)
99%
(tail 0.005)
99.9%
(tail 0.0005)
13.0786.31412.70631.82163.657636.619
21.8862.9204.3036.9659.92531.599
31.6382.3533.1824.5415.84112.924
41.5332.1322.7763.7474.6048.610
51.4762.0152.5713.3654.0326.869
61.4401.9432.4473.1433.7075.959
71.4151.8952.3652.9983.4995.408
81.3971.8602.3062.8963.3555.041
91.3831.8332.2622.8213.2504.781
101.3721.8122.2282.7643.1694.587
121.3561.7822.1792.6813.0554.318
141.3451.7612.1452.6242.9774.140
161.3371.7462.1202.5832.9214.015
181.3301.7342.1012.5522.8783.922
191.3281.7292.0932.5392.8613.883
201.3251.7252.0862.5282.8453.850
241.3181.7112.0642.4922.7973.745
251.3161.7082.0602.4852.7873.725
291.3111.6992.0452.4622.7563.659
301.3101.6972.0422.4572.7503.646
401.3031.6842.0212.4232.7043.551
501.2991.6762.0092.4032.6783.496
531.2981.6742.0062.3992.6723.484
561.2971.6732.0032.3952.6673.473
601.2961.6712.0002.3902.6603.460
731.2931.6661.9932.3792.6453.429
801.2921.6641.9902.3742.6393.416
1001.2901.6601.9842.3642.6263.390
1991.2861.6531.9722.3452.6013.340
1,000 (≈ z)1.2821.6461.9622.3302.5813.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    t1.01.52.02.53.03.54.05.0
60.17800.09210.04620.02330.01200.00640.00360.0012
90.17170.08390.03830.01690.00750.00340.00160.0004
170.16570.07600.03090.01150.00400.00140.00050.0001
180.16530.07550.03040.01120.00380.00130.00040.0000
290.16280.07220.02750.00920.00270.00080.00020.0000
530.16090.06980.02530.00780.00210.00050.00010.0000
560.16080.06960.02520.00770.00200.00050.00010.0000
730.16030.06900.02460.00730.00180.00040.00010.0000
10000.15880.06700.02290.00630.00140.00020.00000.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.

dfTail 0.10Tail 0.05Tail 0.01Tail 0.001Mean
12.713.846.6310.831
24.615.999.2113.822
36.257.8111.3416.273
47.789.4913.2818.474
59.2411.0715.0920.525
610.6412.5916.8122.466
712.0214.0718.4824.327
813.3615.5120.0926.128
914.6816.9221.6727.889
1015.9918.3123.2129.5910
1117.2819.6824.7231.2611
1218.5521.0326.2232.9112

Table 4. Standard normal upper tails for tests

z1.001.281.501.651.962.002.242.502.583.003.50
Upper tail0.15870.10030.06680.05000.02500.02280.01250.00620.00500.00130.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)

Up NextComplete & Continue →

Leave a Reply Cancel reply

The Logic of a Significance Test
Prev
Errors, Power and Significance in the Real World
Next

© 2026 The VR School | Career content by Wiley | Powered by Sejal Learning Systems.

Join free · Accreditation · Privacy Policy · Terms of Service

Modal title

Main Content