One-Sample Statistical Tests – Analytical Statistics (T), NYU – Study Notes
offline

Difficulty: Intermediate | Prerequisites: Foundations doc (significance, power, testing procedure, estimators).

Big Picture

One-sample tests are the simplest hypothesis tests: you have one sample and you want to know whether its mean or variance matches a claimed value. The Z-test applies when the population variance is known; the t-test when it is not; and the chi-squared test when the question is about the variance itself rather than the mean. These three tests form the backbone of everything that follows (two-sample tests, ANOVA, regression) because the logic is identical, just scaled up.

TL;DR

Known σ² and testing μ: use the Z-test. Unknown σ²: use the t-test. Testing σ² itself: use the chi-squared test. Each has a test statistic, a null distribution, and rejection rules for one-sided and two-sided alternatives.


Key Terms

Z-statistic (one-sample)

Z = (X̄ₙ − μ₀) / (σ/√n). Under H₀, Z ~ N(0, 1).

In simple terms, this measures how many known standard deviations the sample mean is from the hypothesised value.

T-statistic (one-sample)

Tₙ = √n · (X̄ₙ − μ₀) / Sₓ. Under H₀, Tₙ ~ t_{n−1}.

Think of it as: the Z-statistic but with S replacing σ, which costs you one degree of freedom.

Chi-squared statistic (one-sample, variance test)

χ² = (n−1) S² / σ₀². Under H₀, χ² ~ χ²_{n−1}.

This measures whether the observed sample variance is plausibly consistent with a claimed population variance.

Critical region

The set of values of the test statistic for which you reject H₀. Defined by α and the tail direction.

Confidence interval

A range of parameter values consistent with the data at a given confidence level (1 − α). Inverting the test: the set of μ₀ values you would not reject.


1-Sample Z-Test (Test of μ, σ² Known)

When to use: You are testing a claim about the population mean μ, and the population variance σ² is known.

Assumptions: X₁, ..., Xₙ ~ N(μ, σ²), with σ² known.

Test statistic:

Z = (X̄ₙ − μ₀) / (σ/√n) ~ N(0, 1) under H₀: μ = μ₀

Rejection rules and p-values:

  • H_A: μ ≠ μ₀ (two-sided): reject if |Z| > Φ⁻¹(1 − α/2). P-value = 2[1 − Φ(|Z|)]

  • H_A: μ > μ₀ (right-tailed): reject if Z > Φ⁻¹(1 − α). P-value = 1 − Φ(Z)

  • H_A: μ < μ₀ (left-tailed): reject if Z < Φ⁻¹(α). P-value = Φ(Z)

Worked example from the notes

Goal: find the critical region that yields the most powerful test of H₀: μ = μ₀ vs H_A: μ > μ₀ at α = 0.05.

The test statistic is Z₀ = X̄ₙ / (σ/√n) ~ N(0, √n) under H₀. Reject right tail.

C(k) = {X̄ₙ > k}, so α = P(Z₀ > √n · k) = 1 − Φ(√n · k) = 0.05.

Solving: Φ(√n · k) = 0.95, so k = Φ⁻¹(0.95) / √n, giving C(k) = {X̄ₙ > Φ⁻¹(0.95)/√n}.

Calculating power:

1 − β = P(X̄ₙ > k | H_A) = P(Z > Φ⁻¹(0.95) − √n · (μ_A − μ₀)/σ) = 1 − Φ(1.64 − √n · δ/σ)

where δ = μ_A − μ₀ is the true departure from the null.


1-Sample T-Test (Test of μ, σ² Unknown)

When to use: You are testing a claim about the population mean μ, but the population variance is unknown and must be estimated from the sample.

Assumptions: X₁, ..., Xₙ ~ N(μ, σ²), σ² unknown.

Test statistic:

Tₙ = √n · (X̄ₙ − μ₀) / Sₓ ~ t_{n−1} under H₀: μ = μ₀

where Sₓ is the sample standard deviation.

Rejection rules and p-values:

  • H_A: μ ≠ μ₀: reject if |T₀| > t_{n−1}(1 − α/2). P-value = 2[1 − t_{n−1}(|T₀|)]

  • H_A: μ > μ₀: reject if T₀ > t_{n−1}(1 − α). P-value = 1 − t_{n−1}(T₀)

  • H_A: μ < μ₀: reject if T₀ < t_{n−1}(α). P-value = t_{n−1}(T₀)

Worked example from the notes

Given: α = 0.05, X̄ₙ = 22, n = 9, Sₓ known from sample.

Test 1: H₀: μ = 20 vs H_A: μ > 20 (one-sided)

T₀ = √9 · (22 − 20) / Sₓ = 2 (using the given calculation).

t₈(0.95) = 1.86. Since T₀ = 2 > 1.86, we reject H₀ at α = 0.05.

Test 2: H₀: μ = 20 vs H_A: μ ≠ 20 (two-sided)

t₈(0.975) = 2.306 and t₈(0.025) = −2.306.

T₀ = 2. Is 2 > 2.306? No. Is 2 < −2.306? No. We do not reject H₀ at α = 0.05.

Notice: the same data leads to rejection with a one-sided test but not with a two-sided test. This is because the two-sided test splits α across both tails, making each individual threshold harder to clear.

Confidence interval for μ:

−t_{n−1}(1 − α/2) < √n · (X̄ₙ − μ) / Sₓ < t_{n−1}(1 − α/2)

Rearranging: X̄ₙ − t_{n−1}(1 − α/2) · Sₓ/√n < μ < X̄ₙ + t_{n−1}(1 − α/2) · Sₓ/√n

From the example: 19.694 < μ < 24.306 at 95% confidence.


1-Sample χ²-Test (Test on σ² of a Normal Distribution)

When to use: You want to test whether the population variance equals a specific value.

Assumptions: X₁, ..., Xₙ ~ N(μ, σ²), μ unknown.

Test statistic:

χ² = (n−1) S² / σ₀² ~ χ²_{n−1} under H₀: σ² = σ₀²

Rejection rules and p-values:

  • H_A: σ² ≠ σ₀²: reject if χ² > (χ²_{n−1})⁻¹(1 − α/2) or χ² < (χ²_{n−1})⁻¹(α/2). P-value = 2 · min{χ²_{n−1}(observed), 1 − χ²_{n−1}(observed)}

  • H_A: σ² > σ₀²: reject if χ² > (χ²_{n−1})⁻¹(1 − α). P-value = 1 − χ²_{n−1}(observed)

  • H_A: σ² < σ₀²: reject if χ² < (χ²_{n−1})⁻¹(α). P-value = χ²_{n−1}(observed)

Key point: The chi-squared distribution is not symmetric, so the two-sided rejection region uses different quantiles for the left and right tails. You cannot simply double one tail.


Common Misconceptions

  • Students mix up when to use Z vs t. The rule is simple: if σ is known, use Z. If σ is unknown and estimated by S, use t. The t-distribution has heavier tails to account for the extra uncertainty in estimating σ.

  • The chi-squared test for variance is not symmetric, so you cannot just double a one-sided p-value to get the two-sided p-value the way you can with Z or t.

  • A confidence interval is not a probability statement about μ. Once computed, the interval either contains μ or it does not. The 95% refers to the procedure: if you repeated the experiment many times, 95% of the intervals would contain the true μ.

  • Passing a one-sided test does not guarantee passing the corresponding two-sided test at the same α. The worked example in the notes demonstrates this precisely.


Why It Matters / Exam Flags

⚠️ Be able to set up a Z-test and a t-test from scratch, including writing down the test statistic, stating the null distribution, and computing the critical value from a table.

⚠️ The confidence interval construction from inverting the t-test is a classic exam question. Know the formula and be able to compute it by hand.

⚠️ The one-sided vs two-sided distinction is frequently tested. The notes' worked example (T₀ = 2, which rejects one-sided but not two-sided) is the exact type of problem you should expect.

⚠️ Know that (n−1)S²/σ₀² ~ χ²_{n−1} and what happens when you test in each tail direction.


Quick Self-Test

  1. True or False: The Z-test and t-test give identical results when σ is known.

    • True (in the sense that if σ is known you would use the Z-test; the t-test is for when σ is unknown).

  1. Fill in the blank: The t-distribution has ______ tails than the normal distribution.

    • heavier (fatter)

  1. True or False: A 95% confidence interval means there is a 95% probability that μ lies inside the interval.

    • False. The interval is fixed once computed. 95% refers to the long-run coverage rate of the procedure.

  1. Fill in the blank: The chi-squared test for variance uses ______ degrees of freedom.

    • n − 1

  1. True or False: If T₀ = 2.1 and t₈(0.975) = 2.306, you reject H₀ in a two-sided test at α = 0.05.

    • False. 2.1 < 2.306, so you do not reject.


Practice Q&A

Q: You have a sample of n = 25 observations from a normal population with known σ = 4. The sample mean is 52. Test H₀: μ = 50 vs H_A: μ > 50 at α = 0.05.

A: Z = (52 − 50) / (4/√25) = 2 / 0.8 = 2.5. Critical value: Φ⁻¹(0.95) = 1.645. Since 2.5 > 1.645, reject H₀.

Q: Using the same data, construct a 95% confidence interval for μ.

A: X̄ ± Φ⁻¹(0.975) · σ/√n = 52 ± 1.96 · 0.8 = 52 ± 1.568, so (50.432, 53.568).

Q: Now suppose σ is unknown and S = 4. Repeat the test from the first question using a t-test.

A: T = (52 − 50) / (4/√25) = 2.5. Under H₀, T ~ t₂₄. t₂₄(0.95) ≈ 1.711. Since 2.5 > 1.711, reject H₀. The critical value is slightly larger than 1.645 because the t-distribution has heavier tails.

Q: Explain why the worked example in the notes rejects H₀ with a one-sided test but fails to reject with a two-sided test.

A: The one-sided critical value t₈(0.95) = 1.86 is smaller than the two-sided critical value t₈(0.975) = 2.306. The test statistic T₀ = 2 falls between these two thresholds: large enough to reject one-sided (2 > 1.86) but not large enough to reject two-sided (2 < 2.306).

Q: When would you use a chi-squared test instead of a t-test?

A: When the question is about the population variance σ² rather than the mean μ. For example, a manufacturer claims their production process has σ² = 4. You collect data and want to test this claim.


Related Terms / Search Tags

One-sample Z-test, one-sample t-test, one-sample chi-squared test, variance test, test statistic, critical value, rejection region, p-value, confidence interval, degrees of freedom, Student's t-distribution, chi-squared distribution, known variance, unknown variance, sample mean, sample variance, hypothesis testing, Analytical Statistics NYU, normal distribution test