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

Two-Sample Tests from Experiments and Observational Data

Unit 3  ·  Modeling & Reporting Workshop  ·  Lesson 14 of 20

Two-Sample Tests from Experiments and Observational Data

A2.DS.A.2 / A2.DS.A.3RLP-STATSB
Hands randomly assign headphone and silent groups beside an observed rain gauge and abstract comparison data.
By the end of this lesson I can…

carry out two-sample t-tests and two-proportion z-tests, compare them with randomization tests, and match each conclusion to what the study design allows.

Instruction

Two-sample t-test. For H0: μ1 = μ2,

t = (x̄1 − x̄2) / √(s12/n1 + s22/n2)

with df from technology (Welch), or conservatively the smaller n minus 1. Conditions: two independent random samples or two groups from random assignment; normal or large samples in each group.

Example 1: a randomized experiment (illustrative data from RLP Statistics A). Silence: x̄ = 13.2 words, s = 1.93, n = 10. Music: x̄ = 11.0, s = 1.83, n = 10. H0: μsilence = μmusic; Ha: ≠.

t = 2.2 / √(1.932/10 + 1.832/10) = 2.2/0.841 ≈ 2.62, df ≈ 17.9, P ≈ 0.018

The exact randomization test from RLP Statistics A gave a two-sided P of 0.025. The two methods agree closely, as they usually do when conditions are met. The t-test is a formula that approximates the randomization distribution. Scope: random assignment means the difference was caused by the treatment, for these volunteers.

Two-proportion z-test. For H0: p1 = p2, pool the samples to estimate the common p under H0:

p̂c = (x1 + x2)/(n1 + n2),   z = (p̂1 − p̂2) / √(p̂c(1 − p̂c)(1/n1 + 1/n2))

Example 2: rain persistence (NOAA, observational). St. Louis winters 2000-2024: rain followed 294 of 688 rainy days (0.427) and 396 of 1,568 dry days (0.253). Pooled p̂c = 690/2,256 ≈ 0.306; SE ≈ 0.0211; z = 0.175/0.0211 ≈ 8.29; P is far below 0.001. Rain is far more likely after a rainy day. Scope: this is an observational record, and the explanation (storms last more than a day) comes from meteorology, not from the test. The days are also not independent draws, so the test’s P-value is too small to be taken literally. The effect, however, is large enough that no reasonable correction changes the conclusion.

Example 3: two eras (NOAA, observational). Annual mean temperature, 1995-2024 versus 1950-1979:

  • St. Louis: 57.89 versus 55.32°F; t ≈ 6.52, P < 0.001.
  • Springfield: 57.08 versus 55.66°F; t ≈ 3.89, P ≈ 0.0003.

Both differences are statistically significant at α = 0.05, and the St. Louis difference (2.57°F) is nearly twice the Springfield one (1.42°F). Scope: these are not random samples, and nothing was assigned. The tests show that the later era’s values are higher than the earlier era’s year-to-year variation would explain. They do not identify causes. The St. Louis station sits in a large metropolitan area that has grown since 1950, and all stations have had equipment changes over the decades. Separating regional climate change from local effects needs more evidence, such as comparisons with rural stations and the scientific literature.

The scope-of-inference table.

Random assignmentNo random assignment
Random selectionCausal, and generalizes to the populationAssociation in the population; not causal
No random selectionCausal for the units studiedAssociation in the units studied only

Put every conclusion you write in one of those four boxes.

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

  • A Randomized Experiment and Three Observational Comparisons: Two-Sample Tests Worked in FullMemory-experiment data as written for RLP Statistics A (illustrative); annual mean temperature from NOAA NCEI Global Summary of the Year, TAVG, stations USW00013994 (St. Louis), USW00013995 (Springfield) and USW00013987 (Joplin), 1950-1979 and 1995-2024; retrieved 2026-11-10 · about 4 min

    The twenty memory-experiment scores from RLP Statistics A with the two-sample t worked in full against the randomization test, and the St. Louis, Springfield and Joplin era tests with the SDs the lesson omits.

  • Two Eras and Two Cities: The Annual Temperatures Behind the Comparison IntervalsNOAA NCEI Global Summary of the Year, element TAVG, stations USW00013994 (St. Louis), USW00013995 (Springfield) and USW00013987 (Joplin) for 1950-1979 and 1995-2024; retrieved 2026-11-10 · about 5 min

    The year-by-year era data for your own two-sample test in the workshop.

Vocabulary in context

  • two-sample t-test — A test of H₀: μ₁ = μ₂ using the difference in sample means divided by its standard error.
  • two-proportion z-test — A test of H₀: p₁ = p₂ that uses the pooled proportion in the standard error.
  • pooled proportion — The combined proportion of successes in both samples, used to estimate p under H₀: p₁ = p₂.
  • scope of inference — The population to which, and the causal strength with which, a conclusion applies, set by the study design.

Formative check

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

+50 XP

The music experiment’s t-test gives P ≈ 0.018 and the randomization test gives P ≈ 0.025. What does this show?

Both measure how unusual a 2.2-word difference is under ‘no effect’; the t-test does it with a formula.
Myth or Fact?

Because the St. Louis two-era test has P < 0.001, it proves the warming was caused by regional climate change.

The data are observational. The test rules out chance variation as the explanation but cannot separate regional climate change from local urban and equipment effects.
Flashcard

Random assignment

Tap to reveal
Answer

Supports cause and effect.

Flashcard

Random selection

Tap to reveal
Answer

Supports generalizing to the population.

Flashcard

Paired data

Tap to reveal
Answer

Test the differences (paired t).

Flashcard

Two proportions under H₀

Tap to reveal
Answer

Use the pooled p̂ in the SE.

Carry out a two-sample t-test comparing 1995-2024 with 1950-1979 for a Missouri station and variable of your choice (NOAA Global Summary of the Year; the Lesson 2.4 reading has St. Louis, Springfield and Joplin temperatures). Give hypotheses, conditions, t, df, P-value and a 95% interval for the difference. Then write a scope statement that places your conclusion in the correct box of the scope-of-inference table, naming one alternative explanation.

0 words
Quick self-check

How confident are you that you can carry out two-sample tests and state conclusions that match the study design?

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. Two independent samples: x̄₁ = 13.2, s₁ = 1.93, n₁ = 10; x̄₂ = 11.0, s₂ = 1.83, n₂ = 10. Find the two-sample t statistic.
    Check your answer
    Answer: t ≈ 2.62.
  2. Two proportions: 45 of 100 and 30 of 100. Find the pooled proportion and the z statistic for H₀: p₁ = p₂.
    Check your answer
    Answer: p̂c = 0.375; z ≈ 2.19.
  3. Random assignment, no random selection: what can the conclusion claim?
    Check your answer
    Answer: Cause and effect for the units studied; generalizing beyond them is a judgment.
  4. Random selection, no random assignment: what can the conclusion claim?
    Check your answer
    Answer: Association in the population; not causation.
  5. A two-sample t-test gives t = 2.62 with df = 17.9. Find the two-sided P-value.
    Check your answer
    Answer: ≈ 0.0174.
  6. Why use the pooled proportion in a two-proportion test but not in the interval?
    Check your answer
    Answer: The test assumes H₀: p₁ = p₂, so both samples estimate one common p; the interval makes no such assumption.

Application

Use the skill in context. Show your reasoning.

  1. (Illustrative data, RLP Statistics A) The helicopter experiment: long blades mean 2.5063 s, short 2.3812 s, n = 8 each. A two-sample t-test gives t ≈ 2.78, df ≈ 13.7, two-sided P ≈ 0.0148. The exact randomization test gave a one-sided P of about 0.0099. Compare and conclude.
    Check your answer
    Answer: The t-test’s one-sided P would be about 0.0074, close to the randomization value; both give convincing evidence that longer blades increased flight time for these randomly assigned helicopters.
  2. Springfield winter days 2000-2024: rain followed 234 of 584 rainy days and 353 of 1,672 dry days. Carry out a two-proportion z-test and state the scope.
    Check your answer
    Answer: Pooled p̂ ≈ 0.260; z ≈ 9.0; P far below 0.001. Rain is much more likely after a rainy day. Observational record from one station; consecutive days are not independent, so the P-value is too small to take literally, but the effect is too large to be chance.
  3. Joplin annual mean temperature, 1995-2024 against 1950-1979 (NOAA): means 58.77 and 57.39°F. A Welch test gives t ≈ 3.87, df ≈ 58.0, P ≈ 0.0003. State the conclusion and its scope.
    Check your answer
    Answer: Convincing evidence that Joplin’s recent years averaged warmer than the earlier era, by about 1.38°F. The record is observational at one airport station, so the test does not identify the cause.

Challenge

Stretch problems. Expect to think before you write.

  1. Show that for a 2 × 2 table the square of the two-proportion z statistic equals the chi-square statistic, using the St. Louis winter values z ≈ 8.29 and χ² ≈ 68.8.
    Check your answer
    Answer: 8.29² ≈ 68.8, matching χ² ≈ 68.8 (any small gap is rounding). The two-sided two-proportion z-test and the 2 × 2 chi-square test are the same test.

Review

Keep earlier skills sharp.

  1. (Unit 2) Paired or independent: before-and-after blood pressure on the same 30 patients?
    Check your answer
    Answer: Paired.
  2. (RLP Statistics A) What design feature supports a causal conclusion?
    Check your answer
    Answer: Random assignment of treatments.

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

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

Instructional focus: Two-sample inference and the scope of conclusions

Reading

A Randomized Experiment and Three Observational Comparisons: Two-Sample Tests Worked in Full

Memory-experiment data as written for RLP Statistics A (illustrative); annual mean temperature from NOAA NCEI Global Summary of the Year, TAVG, stations USW00013994 (St. Louis), USW00013995 (Springfield) and USW00013987 (Joplin), 1950-1979 and 1995-2024; retrieved 2026-11-10 · SLS original, with public domain NOAA data

Why this reading. The lesson’s first example is “illustrative data from RLP Statistics A”: a memory experiment whose twenty scores live in another course. Its third example gives St. Louis’s two-era test as a bare t and P, with no SDs to reproduce them from. The workshop then asks for a two-sample test of your own, with the interval and a scope statement. This reading supplies the twenty scores, works the era tests in full for three Missouri stations, so the open question can be done from the Lesson 2.4 reading’s data or from the summaries here. The critical-values reading has the t tables.

Table 1. The memory experiment (illustrative, from RLP Statistics A)

Twenty volunteers were randomly assigned, ten to study a word list in silence and ten with music playing; the response is words recalled. The data were written for RLP Statistics A to teach the randomization test and are not from a real study.

Student12345678910MeanSD
Silence1412151113161214101513.21.932
Music11913121081211141011.01.826

Two-sample t, worked. Difference 13.2 − 11.0 = 2.2 words. SE = √(1.9322/10 + 1.8262/10) = √(0.3733 + 0.3333) = 0.841. t = 2.2/0.841 = 2.62. Welch df = (0.3733 + 0.3333)2/(0.37332/9 + 0.33332/9) = 17.9. From Table 2 of the critical-values reading at df 18: the tail beyond 2.5 is 0.0112 and beyond 3.0 is 0.0038, so two-sided P is between 0.008 and 0.022; T.DIST.2T gives 0.017. Conservative df = 9 gives t* = 2.262 and P ≈ 0.028. Interval: 2.2 ± 2.101(0.841) = 0.4 to 4.0 words, the lesson’s “roughly 0.4 to 4.0”.

Against the randomization test. RLP Statistics A shuffled the twenty scores into two groups of ten many times and found a difference of 2.2 or more in either direction about 2.5% of the time. The t-test’s 0.017 is the normal-curve approximation to that shuffling distribution. Both say: with random assignment and no real effect, a gap this large is unusual. Scope: random assignment, no random selection: causal for these twenty volunteers, and generalizing beyond them is an argument about similarity, not a statistical result.

Table 2. Two eras at three Missouri stations (real; NOAA Global Summary of the Year)

Annual mean temperature, 1950–1979 against 1995–2024, 30 years each. The year-by-year values are in the Lesson 1.2 reading (St. Louis and Springfield) and the Lesson 2.4 reading (all three stations, both eras).

StationEarlier mean (SD)Later mean (SD)DifferenceSEWelch dftTwo-sided P95% interval
St. Louis55.317 (1.358)57.890 (1.681)2.5730.394555.56.52< 0.00011.78 to 3.36
Springfield55.663 (1.298)57.080 (1.516)1.4170.364456.63.890.00030.69 to 2.15
Joplin57.390 (1.394)58.770 (1.365)1.3800.356258.03.870.00030.67 to 2.09

St. Louis, worked. SE = √(1.3582/30 + 1.6812/30) = 0.3945; t = 2.573/0.3945 = 6.52; df 55.5; from the df-56 row of the t-table reading the tail beyond 3.5 is 0.0005, so the two-sided P is far below 0.001 and technology says < 0.0001. That is the lesson’s t ≈ 6.52. The interval, 1.78 to 3.36°F, is the effect size the P-value hides: the later era is warmer by somewhere between about 1.8 and 3.4 degrees.

Springfield and Joplin sit lower: t = 3.89 (P = 0.0003) and t = 3.87 (P = 0.0003), both significant at 0.05 and at 0.001, with differences near 1.4°F. Three stations, one clear pattern and one much larger value, and the same design in every case: no random sampling, no assignment. All three belong in the same box of the scope table, association in the units studied, and the alternative explanations (urban growth around the St. Louis airport, instrument and siting changes, the warm years since 2012) are the same for all three. Do not let one big t at one station stand for “Missouri”.

For the workshop

Take a station and variable from the Lesson 2.4 reading (temperature) or, for precipitation eras, ask whether the Lesson 3.2 reading’s 1995–2024 rain totals can be compared with anything (they cannot, without the earlier era; that is a data-availability limit worth stating rather than working around). Give hypotheses, check the shape of each era with a dot plot, compute t and the Welch df by the formula above, find the P-value, give the 95% interval for the difference, and write a scope sentence that places your conclusion in the right box of the scope-of-inference table and names one alternative explanation.

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

Two Eras and Two Cities: The Annual Temperatures Behind the Comparison Intervals

NOAA NCEI Global Summary of the Year, element TAVG, stations USW00013994 (St. Louis), USW00013995 (Springfield) and USW00013987 (Joplin) for 1950-1979 and 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 three worked intervals rest on 120 annual values it never prints: St. Louis in two eras, and St. Louis against Springfield year by year. The workshop then asks you to build one paired and one two-sample interval of your own from the same NOAA product. Both jobs need the numbers. They are here, arranged so the lesson’s figures can be recomputed, and so that other pairings (Joplin’s two eras, St. Louis minus Joplin) can be built from the same table.

Table 1. Annual mean temperature (°F), NOAA Global Summary of the Year

Stations USW00013994 (St. Louis Lambert International Airport), USW00013995 (Springfield-Branson National Airport) and USW00013987 (Joplin Regional Airport). Left block: the earlier era, 1950–1979. Right block: the later era, 1995–2024, with the paired St. Louis minus Springfield difference. Retrieved 2026-11-10; no year is missing.

YearSt. LouisSpringfieldJoplinYearSt. LouisSpringfieldJoplinSt. Louis − Springfield
195054.454.356.0199557.056.258.1+0.8
195154.454.256.0199654.954.357.4+0.6
195257.256.758.8199755.154.457.3+0.7
195358.558.260.3199858.757.959.7+0.8
195458.558.761.2199957.957.659.4+0.3
195557.256.158.3200056.155.958.1+0.2
195657.056.959.0200157.756.659.2+1.1
195756.356.058.0200257.856.258.6+1.6
195854.154.256.4200356.555.858.3+0.7
195956.355.557.7200457.556.758.6+0.8
196054.654.756.3200558.057.859.4+0.2
196153.854.756.8200658.558.860.6−0.3
196254.655.558.1200758.358.159.1+0.2
196354.357.258.1200855.455.157.4+0.3
196456.056.757.6200956.655.256.7+1.4
196556.056.958.9201058.056.558.3+1.5
196654.154.556.2201158.757.059.0+1.7
196754.655.356.8201261.259.561.5+1.7
196854.554.255.8201356.455.456.3+1.0
196954.655.156.9201455.855.356.1+0.5
197055.054.657.1201558.857.858.7+1.0
197156.256.758.4201660.459.460.3+1.0
197254.655.857.8201760.259.160.4+1.1
197355.956.657.7201857.457.658.1−0.2
197454.855.756.5201957.257.457.7−0.2
197555.355.756.8202058.257.258.9+1.0
197654.055.054.9202159.057.759.2+1.3
197755.456.957.4202257.857.158.9+0.7
197853.253.956.4202360.459.160.4+1.3
197954.153.455.5202461.259.761.4+1.5

Summary statistics, for checking

SeriesnMeanSample SD
St. Louis 1950–19793055.3171.358
St. Louis 1995–20243057.8901.681
Springfield 1950–19793055.6631.298
Springfield 1995–20243057.0801.516
Joplin 1950–19793057.3901.394
Joplin 1995–20243058.7701.365

The lesson’s two-sample interval, with the Welch degrees of freedom shown

St. Louis, later minus earlier: 57.89 − 55.32 = 2.573°F. SE = √(1.3582/30 + 1.6812/30) = √(0.06145 + 0.09415) = 0.3945. Technology’s df comes from the Welch formula, which you can evaluate yourself: with v1 = s12/n1 and v2 = s22/n2,

df = (v1 + v2)2 / (v12/(n1 − 1) + v22/(n2 − 1)) = (0.06145 + 0.09415)2 / (0.061452/29 + 0.094152/29) = 55.5.

From the critical-values reading, t* at df = 56 is about 2.003 (technology, at 55.55, gives 2.0036). Interval: 2.573 ± 2.004(0.3945) = 1.78 to 3.36°F. The conservative df = 29 gives t* = 2.045 and 1.77 to 3.38. Welch df always lands between the smaller n − 1 and n1 + n2 − 2; when the two SDs are close it is near the top of that range.

The lesson’s paired interval

The 30 differences in the last column sum to 24.3, so d̄ = 0.8100; sd = 0.5689; SE = 0.5689/√30 = 0.1039; t* = 2.045 (df = 29); interval 0.598 to 1.022°F. 27 of the 30 differences are positive: St. Louis ran warmer than Springfield in 27 of the 30 years (the airport sits in a large urban area, and Springfield’s station is on a higher plateau).

What pairing bought. Treat the same 60 values as two independent samples instead. SE = 0.4133, Welch df 57.4, t* 2.002, interval -0.02 to 1.64°F: the same center and a width of 1.65 against 0.42. Nearly four times wider, and for nothing. Warm years and cool years hit both airports together, and the paired analysis subtracts that shared swing out before it measures the gap.

For the workshop: two more pairings this table supports

Joplin, two eras (two-sample). 58.770 − 57.390 = 1.380; SE = 0.3562; Welch df 58.0. Finish it: the interval, and a scope sentence. Compare its width with St. Louis’s and say why the two stations’ differences are so different in size.

St. Louis minus Joplin, paired, 1995–2024. Compute the 30 differences from the right block. Before you compute an interval, plot them against year: is there a trend? A paired t-interval assumes the differences are draws from one stable process, and if they drift, the interval describes an average of something that is changing. (For reference, the mean of the 30 differences is -0.880°F.)

Whatever you build, the scope statement is the same shape as the lesson’s: these are not random samples of anything; the interval treats the years as draws from the climate of an era at a fixed instrument, and it says how big a difference is relative to year-to-year variation, not what caused it.

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)

Up NextComplete & Continue →

Leave a Reply Cancel reply

Errors, Power and Significance in the Real World
Prev
Performance Task — Significance Test Investigation
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