Statistics 2nd ed

p-value

Appendix 3 — Using the t-table and F-table

Online z-calculator (type z or x, get areas instantly)
F2,21
t-df22,0.01

Tables give the critical values we compare our test statistic against.
They depend on:

  • The significance level (α, often 0.05)
  • The degrees of freedom (df)

t-table

  • Rows = degrees of freedom (df)
  • Columns = significance level (α)

Example:

  • Independent-samples t-test with n₁ = 12, n₂ = 12
  • df = 12 + 12 – 2 = 22
  • At α = 0.05 (two-tailed) → critical t ≈ 2.07
  • If $$|t| \geq 2.07$$ → significant

F-table

  • Needs two df values:
    • df between (numerator)
    • df within (denominator)

Example:

  • One-way ANOVA, 3 groups, N = 24
  • df between = k – 1 = 2
  • df within = N – k = 21
  • At α = 0.05 → critical F ≈ 3.47
  • If computed F ≥ 3.47 → significant

Student Tips

  • Always compute df correctly.
  • Use tables if no software is available.
  • Most calculators or apps today give exact p-values — faster than tables.

📱 QR: Interactive critical value calculator (t and F tables online)


Visuals

Figure C.1 — Snippet of a t-table row (df = 22, α = 0.05 highlighted).
Figure C.2 — F-table grid with numerator df = 2, denominator df = 21 marked.


Practice self-test quiz

In the space below, please find practice problems and self-test quizzes. For full access, please signup free.

Lecture 6 — ANOVA (Partitioning the Variance)

variance partitioning
two normal curves different means
anova summary table

The t-test compares two means. But what if we have three or more groups?
We could run multiple t-tests, but that inflates the chance of error.

The solution is the Analysis of Variance (ANOVA).
ANOVA partitions the variability into two parts: between groups and within groups.


Partitioning the Variance

Total variability = variability between groups + variability within groups.

  • Between groups: differences due to the factor (treatment).
  • Within groups: differences due to chance or individual variation.

Symbolic formula:
$$F = \frac{MS_{\text{between}}}{MS_{\text{within}}}$$

Formula in words:
$$F = \frac{\text{mean square between groups}}{\text{mean square within groups}}$$

Where:

  • $$MS_{\text{between}} = \tfrac{SS_{\text{between}}}{df_{\text{between}}}$$
  • $$MS_{\text{within}} = \tfrac{SS_{\text{within}}}{df_{\text{within}}}$$

Degrees of Freedom

  • $$df_{\text{between}} = k - 1$$
  • $$df_{\text{within}} = N - k$$
  • $$df_{\text{total}} = N - 1$$

Where $$k$$ = number of groups, $$N$$ = total number of observations.


Example (One-way ANOVA)

Three groups of students use different study techniques:

  • Group A: mean = 70
  • Group B: mean = 75
  • Group C: mean = 85

Suppose calculations give:

  • $$SS_{\text{between}} = 300, , df_{\text{between}} = 2 \Rightarrow MS_{\text{between}} = 150$$
  • $$SS_{\text{within}} = 200, , df_{\text{within}} = 12 \Rightarrow MS_{\text{within}} = 16.7$$

Then:

$$F = \frac{150}{16.7} = 9.0$$

This F value is compared to the F table at df = (2, 12).


Definition

  • ANOVA: compares means across three or more groups.
  • F ratio: signal-to-noise ratio (treatment effect vs. error).

Visual Placeholders

Figure L6.1 — Partitioning Variance. Total variability divided into Between vs. Within.

Figure L6.2 — One-way ANOVA Layout. Bar graph with three groups (A, B, C).

Figure L6.3 — ANOVA Summary Table. Source | SS | df | MS | F | p.


Why This Matters

ANOVA generalizes the t-test to multiple groups.
It is one of the most widely used tools in psychology, education, and medicine.
Understanding the F ratio is key: a large F means treatment differences are greater than chance variation. 

Practice self-test quiz

In the space below, please find practice problems and self-test quizzes. For full access, please signup free.

Lecture 5 — The t-test

t-test independence
paired treatments
t-pairded
t z

This lecture emphasizes conceptual understanding of the t-test, its logic, and how it fits into the broader structure of statistical reasoning.

The t-test is one of the most widely used statistical tools.
It compares two means and asks: Is the difference between them real, or could it be due to chance?

The t-test is closely related to the z-test.
When the population standard deviation is unknown and the sample size is small, we use t instead of z.


Types of t-Tests

  • One-sample t-test: compares a sample mean to a known or hypothesized population mean.
  • Independent-samples t-test: compares means from two separate groups.
  • Paired-samples t-test: compares two scores from the same group (before vs. after).

Symbolic Formulas

One-sample t-test
$$t = \frac{\bar{X} - \mu_0}{s / \sqrt{n}}$$

Independent-samples t-test
$$t = \frac{\bar{X}_1 - \bar{X}_2}{\sqrt{\tfrac{s_1^2}{n_1} + \tfrac{s_2^2}{n_2}}}$$

Paired-samples t-test
$$t = \frac{\bar{D}}{s_D / \sqrt{n}}$$


Degrees of Freedom

  • One-sample: $$df = n - 1$$
  • Independent-samples: $$df = n_1 + n_2 - 2$$
  • Paired-samples: $$df = n - 1$$

Example (Independent t-Test)

Two groups of students try different study methods:

  • Group A: \(n = 10\), mean = 80, SD = 10
  • Group B: \(n = 10\), mean = 90, SD = 10

$$t = \frac{80 - 90}{\sqrt{\tfrac{10^2}{10} + \tfrac{10^2}{10}}} = \frac{-10}{\sqrt{10 + 10}} = \frac{-10}{\sqrt{20}} = \frac{-10}{4.47} = -2.24$$

Degrees of freedom = 18.
Compare this t-value to the critical value in the t-table at \(df = 18\).


Example (Paired t-Test)

Students take a test before and after tutoring.
Differences (After − Before): 4, 6, 5, 3, 2.

Mean difference:
$$\bar{D} = \frac{4 + 6 + 5 + 3 + 2}{5} = 4$$

Standard deviation of differences:
$$s_D = 1.58$$

$$t = \frac{4}{1.58 / \sqrt{5}} = \frac{4}{0.71} = 5.63$$

Degrees of freedom = 4.
This large t-value indicates strong evidence of improvement.


Definition

  • Independent t-test: compares two separate groups.
  • Paired t-test: compares the same group measured twice.
  • Degrees of freedom (df): number of independent pieces of information.

Visuals

Figure L5.1 — Independent t-Test. Bar graph of two groups (A and B) with means and SEM error bars.

Figure L5.2 — Paired t-Test. Line plot showing before vs. after scores for each student.

Figure L5.3 — t vs. z Distribution. Overlay of the normal (z) curve and t curves with df = 5 and 20.


Why This Matters

The t-test is the workhorse of statistics.
It forms the foundation for many other methods (ANOVA, regression, mixed models).
Understanding t means understanding how we compare signal (mean difference) to noise (variability).

Practice self-test quiz

In the space below, please find practice problems and self-test quizzes. For full access, please signup free.

Lesson 6 — The t-Test: Worked Examples & Calculations

t- one sample
t- one sample curve
t- independent boxplot
t- independent means
t- independent curve
t welch
t paired profile
t- paird curve
t-residuals

Introduction. This lesson is hands-on, data-driven, and calculation-oriented. It prepares students to do t-tests with data. The t-test compares means when the population standard deviation is unknown and is estimated from the sample, so the standardized statistic follows Student’s t distribution with appropriate degrees of freedom (df). The three common variants are: (a) one-sample (compare a sample mean to a reference value \( \mu_0 \)); (b) independent-samples (compare means of two unrelated groups); and (c) paired-samples (compare repeated measures on the same units by testing the mean of the differences). All t-tests assume independent observations and approximately normal residuals; only the pooled independent-samples test assumes equal variances.


A) One-Sample t-Test

Goal. Test whether a sample mean differs from a known/reference mean \( \mu_0 \).

Design & Experiment

A company claims average battery life is \( \mu_0 = 10 \) hours. We test \( n=12 \) units.

Data

Hours (n = 12)
9.6, 10.1, 10.5, 9.9, 9.7, 10.4, 9.8, 9.6, 10.2, 9.5, 10.3, 9.8

Figure A1: Histogram/QQ plot for one-sample data.

Step 1 — Sum, Mean, Variance

\(\sum x = 119.4 \Rightarrow \bar X = 9.95.\) Using \( \sum (x-\bar X)^2 = 1.086 \Rightarrow s^2 = 1.086/11 = 0.0987,\; s = 0.314.\)

Step 2 — Test Statistic & p-value

\(\displaystyle SE = \frac{s}{\sqrt{n}} = \frac{0.314}{\sqrt{12}} = 0.0906,\quad t = \frac{\bar X - \mu_0}{SE} = \frac{9.95 - 10}{0.0906} = -0.552,\quad df = n-1 = 11. \)

Two-tailed \(p \approx 0.59\) → fail to reject \(H_0\).

Figure A2: t curve (df=11) with observed \(t\) marked.

Conclusion (One-Sample)

No evidence the true mean differs from 10 hours (\(t(11)=-0.55,\; p=.59\)).


B) Independent-Samples t-Test

Goal. Test whether two teaching methods lead to different average exam scores.

Design & Experiment

Twenty students are randomly assigned to one of two methods (n = 10 per group).

  • Method A: Active discussion
  • Method B: Structured lecture

After a 2-week module, everyone takes the same 100-point exam.

Data

Method AMethod B
7278
6882
7580
7077
6979
7381
7183
7476
7678
7280

Figure B1: Boxplots of scores by group.

Step 1 — Sums & Means

\(\displaystyle \sum A=720 \Rightarrow \bar A=72.0,\qquad \sum B=794 \Rightarrow \bar B=79.4,\qquad \bar A-\bar B=-7.4. \)

Step 2 — Within-Group Variability (sample variances)

  • \(SS_A=60.0 \Rightarrow s_A^2=60/9=6.6667.\)
  • \(SS_B=44.40 \Rightarrow s_B^2=44.40/9=4.9333.\)

Figure B2: Group means with SEM error bars.

Step 3 — Pooled Variance & Standard Error (Student’s t)

\(\displaystyle s_p^2=\frac{9(6.6667)+9(4.9333)}{18}=5.8000,\qquad SE=\sqrt{5.8\,(0.1+0.1)}=\sqrt{1.16}=1.0770. \)

Step 4 — Test Statistic, df, p

\(\displaystyle t=\frac{-7.4}{1.0770}=-6.872,\qquad df=18,\qquad p\ (\text{two-tailed}) \ll .001. \)

Figure B3: t distribution with observed \(t\) marked (two-tailed).

t-Test Summary Table (Independent)

GroupnMeanSDSE(mean)
Method A1072.002.5820.816
Method B1079.402.2220.703
\(\bar A-\bar B\)SE (pooled)tdfp (2-tailed)
-7.401.0770-6.87218< .001

Optional Welch: \(SE_W=\sqrt{0.6667+0.4933}=1.0770,\; df_W\approx 17.61,\; t=-6.872,\; p\ll .001.\; Figure B4: Welch vs pooled comparison sketch.

Conclusion (Independent)

Method B yields higher mean scores than Method A (\(t(18)=-6.87,\; p\ll .001\)).


C) Paired-Samples (Dependent) t-Test

Goal. Test whether the mean change (After − Before) differs from zero for the same participants.

Design & Experiment

Eight students take an exam before and after a study-skills workshop.

Data

BeforeAfterDifference \(d\) (After − Before)
70744
73752
68735
74795
71743
70722
73774
74773

Figure C1: Paired profile plot (lines per subject) + histogram of differences.

Step 1 — Mean Difference & Variability

\(\sum d = 28 \Rightarrow \bar d = 3.5.\) \(\sum (d-\bar d)^2 = 10 \Rightarrow s_d^2 = 10/7 = 1.4286,\; s_d=1.196.\)

Step 2 — Test Statistic & p-value

\(\displaystyle SE_{\bar d} = \frac{s_d}{\sqrt{n}}=\frac{1.196}{\sqrt{8}}=0.423,\quad t=\frac{\bar d}{SE_{\bar d}}=\frac{3.5}{0.423}=8.28,\quad df=n-1=7,\quad p\ll .001. \)

Figure C2: t curve (df=7) with observed \(t\) marked.

Conclusion (Paired)

Scores improve after the workshop (\(t(7)=8.28,\; p\ll .001\)).


Assumptions (checklist)

  • Independent observations (between units; pairing respected for the paired test).
  • Approximately normal residuals (or differences for the paired test).
  • Equal variances only for the pooled independent-samples test; if doubtful, report Welch’s t.

Figure D1: QQ plots and Levene/Brown–Forsythe sketch.

Practice self-test quiz

In the space below, please find practice problems and self-test quizzes. For full access, please signup free.