Math ClubMath Club
v1 · padrão canônico

Lesson 104 — z-test and Student's t-test

z-test for mean with known sigma. Student's t-test: one-sample, two independent samples (Welch and pooled), and paired. Application conditions and choosing the appropriate test.

Used in: 3.º ano do EM (17-18 anos) · Equiv. Stochastik LK alemão · Equiv. Math B japonês · H2 Statistics singapurense

T=Xˉμ0s/ntn1(one sample, σ unknown)T = \frac{\bar X - \mu_0}{s/\sqrt{n}} \sim t_{n-1} \quad \text{(one sample, } \sigma \text{ unknown)}
Choose your door

Rigorous notation, full derivation, hypotheses

Rigorous definition

z-test — sigma known

t-test — one sample

"The Student's t-distribution is appropriate when we use the sample standard deviation ss in place of σ\sigma. The heavier tails reflect the additional uncertainty of estimating σ\sigma." — OpenIntro Statistics, §5.3

t-test — two independent samples

Paired t-test

sigmaknown?Yesz-testNoOneor two samples?Onet (n-1 df)one sampleTwoDependentpairs?Yespaired tNo (independent)Welch t

Decision tree for test selection. Use Welch by default for two independent samples.

Solved examples

Exercise list

20 exercises · 5 with worked solution (25%)

12 3 3 1 1
  1. Ex. 104.1

    H0:μ=20H_0: \mu = 20, H1:μ20H_1: \mu \neq 20. Data: n=16n = 16, Xˉ=22\bar X = 22, s=5s = 5. t-statistic and conclusion with α=0.05\alpha = 0.05.

  2. Ex. 104.2

    H0:μ=50H_0: \mu = 50, H1:μ<50H_1: \mu < 50. Data: n=36n = 36, Xˉ=48\bar X = 48, s=8s = 8. Calculate TT and the p-value. Conclusion with α=0.05\alpha = 0.05.

  3. Ex. 104.3

    Blood pressure of 10 patients before and after diet. Differences: 2, 3, 1, 4, 2, 3, 1, 2, 3, 1 mmHg. H0:μD=0H_0: \mu_D = 0, H1:μD>0H_1: \mu_D > 0. At the 5% level, did the diet reduce pressure?

  4. Ex. 104.4

    Group A: n1=30n_1 = 30, Xˉ1=85\bar X_1 = 85, s1=4s_1 = 4. Group B: n2=25n_2 = 25, Xˉ2=80\bar X_2 = 80, s2=3s_2 = 3. Welch t two-tailed at the 5% level.

  5. Ex. 104.5

    You want to compare average salaries between two departments of a company, with possibly different variances. What is the best strategy?

  6. Ex. 104.6

    Population average IQ: μ0=100\mu_0 = 100, σ=15\sigma = 15 (known). A class of n=64n = 64 has Xˉ=102\bar X = 102. At the 5% level, does the class have an average IQ different from the population?

  7. Ex. 104.7Answer key

    Reaction time (ms) of 10 drivers before and after a cup of coffee. Differences: 2, -1, 3, 1, 2, 0, 1, 2, -1, 2. At the 5% level, did coffee alter reaction time?

  8. Ex. 104.8Answer key

    Group 1: n1=15n_1 = 15, Xˉ1=75\bar X_1 = 75, s1=10s_1 = 10. Group 2: n2=20n_2 = 20, Xˉ2=70\bar X_2 = 70, s2=9s_2 = 9. Use pooled t two-tailed at the 5% level (assuming equal variances).

  9. Ex. 104.9Answer key

    A doctor measures the blood pressure of 20 patients before and after a treatment. Which test is most appropriate?

  10. Ex. 104.10

    Study hours of n=20n = 20 university students: Xˉ=4.5\bar X = 4.5 h/day, s=1.2s = 1.2 h. H0:μ=5H_0: \mu = 5. Two-tailed at the 5% level.

  11. Ex. 104.11

    Coin flipped 100 times: 52 heads. At the 5% level, is the coin fair? (Use z-test for proportion with σp^=p0(1p0)/n\sigma_{\hat p} = \sqrt{p_0(1-p_0)/n}.)

  12. Ex. 104.12

    Classes A and B: n1=20n_1 = 20, Xˉ1=45\bar X_1 = 45, s1=7s_1 = 7; n2=30n_2 = 30, Xˉ2=40\bar X_2 = 40, s2=10s_2 = 10. Welch t at the 5% level.

  13. Ex. 104.13

    What is the relationship between the z-test and the t-test for large samples?

  14. Ex. 104.14Answer key

    Typing speed (wpm) of 10 students before and after course: before [40, 35, 50, 45, 38, 42, 47, 36, 44, 41], after [45, 38, 57, 47, 42, 48, 48, 39, 49, 45]. At the 5% level, did the course improve speed?

  15. Ex. 104.15Answer key

    A production line must fill bottles with 200 mL. Sample of n=25n = 25: Xˉ=198\bar X = 198 mL, s=12s = 12 mL. At the 5% level, is the process unregulated?

  16. Ex. 104.16

    A school applied a Math tutoring program. SAEB score of 10 students before: [60, 55, 70, 65, 58, 62, 67, 56, 64, 61]. After: [75, 63, 82, 85, 63, 72, 85, 63, 76, 74]. Use the appropriate test at the 5% level.

  17. Ex. 104.17

    A school network tested a new teaching methodology. Control school (n1=50n_1 = 50): Xˉ1=505\bar X_1 = 505 points, s1=20s_1 = 20. Pilot school (n2=60n_2 = 60): Xˉ2=520\bar X_2 = 520, s2=25s_2 = 25. At the 1% level, did the methodology improve results? Also calculate effect size.

  18. Ex. 104.18

    Industrial process temperature: μ0=30\mu_0 = 30°C, σ=8\sigma = 8°C. Calculate the two-tailed z-test for Xˉ=31\bar X = 31°C with n=100n = 100 and then with n=10000n = 10000. Compare p-values and discuss the difference between statistical and practical significance.

  19. Ex. 104.19

    Show algebraically that the paired test has a smaller standard error than the Welch t (for the same nn per group), when the correlation ρ\rho between pairs is positive. How much smaller is the standard error for ρ=0.7\rho = 0.7 and s1=s2s_1 = s_2?

  20. Ex. 104.20

    Derive the Welch-Satterthwaite formula for the effective degrees of freedom ν\nu of the Welch test. Verify that for n1=n2n_1 = n_2 and s1=s2s_1 = s_2, the formula reduces to ν=2(n1)\nu = 2(n-1), coinciding with the pooled t.

Sources

Updated on 2025-05-14 · Author(s): Clube da Matemática

Found an error? Open an issue on GitHub or submit a PR — open source forever.