Concept map / Inference distributions

Share

Normal, t, chi-square, and F distributions

Compare normal and t tails, construct a chi-square from squared normal draws, and read the upper tail of an F distribution.

1Three distributions built from normal draws

Five scores give a standardized mean of 2.5. Is that as surprising as a z score of 2.5 from the normal distribution? No, because the standard deviation in the denominator came from the same five scores.

Square some independent standard normal draws and add them up: the sum has a chi-square distribution, and the number of draws is its degrees of freedom. A normal draw divided by the square root of a chi-square over its degrees of freedom has Student’s t distribution. A ratio of two such scaled chi-squares has an F distribution. Switch between the three below. Tail probabilities include the parts beyond the axes.

Density−6−4−20246Value of t or z
Student’s tStandard normalt beyond the cutoff

With 4 degrees of freedom, t puts 11.6% of its probability beyond ±2. The normal puts 4.6% there, so t lands out there 2.6 times as often.

2Beyond ±3 with five degrees of freedom

Six scores, standardized with their own standard deviation, give a t statistic with 5 degrees of freedom. How often does it land beyond ±3, compared with a standard normal z?

3A squared t is an F

Student’s t divides a standard normal draw Z by the square root of an independent chi-square U over its degrees of freedom ν. Square T and the top becomes a chi-square with 1 degree of freedom, so T² is an F with 1 and ν degrees of freedom. Point at a symbol to light up its curve or slider.

T=ZU/ν,U=Z12+⋯+Zν2∼χν2T=\frac{\htmlClass{term-z}{Z}}{\sqrt{\htmlClass{term-u}{U}/\htmlClass{term-nu}{\nu}}},\qquad \htmlClass{term-u}{U}=Z_1^2+\cdots+Z_{\htmlClass{term-nu}{\nu}}^2\sim\chi^2_{\htmlClass{term-nu}{\nu}}
T2=Z2/1U/ν  ∼  F1, νT^2=\frac{\htmlClass{term-z}{Z^2}/1}{\htmlClass{term-u}{U}/\htmlClass{term-nu}{\nu}}\;\sim\;\htmlClass{term-f}{F_{1,\,\nu}}

With ν = 4: P(|T| > 2) = 11.6% from the t distribution, and P(F1,4 > 4) = 11.6% from the F distribution. They are computed separately and agree.

4Check yourself

The tasks use the three views in section 1 and tick themselves when you meet them.

  • In the t view, set the cutoff to 3 and raise the degrees of freedom until the t tail is less than twice the normal tail.Now: Cutoff 2, 4 df: t tail 11.6%, 2.552 times the normal tail of 4.6%
  • In the chi-square view, with 4 squared draws, find the cutoff that leaves between 4.5% and 5.5% above it.Now: 4 draws, 19.9% above 6
  • Make the F view repeat the t view: 1 numerator df, a denominator df equal to the t degrees of freedom, and an observed F equal to the squared t cutoff (with the cutoff above 0).Now: t with 4 df beyond ±2: 11.6%. F with 2 and 27 df at or above 3: 6.7%

5Tail areas in R

The p functions give tail areas and the q functions give cutoffs. The snippet repeats the lab’s starting settings, checks that a two-sided t tail equals an F tail with 1 numerator degree of freedom, and builds a chi-square from four squared draws. The 20,000 simulated sums average 4.025, and 0.202 of them exceed 6, close to the exact 0.199 from pchisq.

Tail areas for t, chi-square, and FShow the code
# Two-sided tail beyond 2: t with 4 df against the normal
round(c(t = 2 * pt(-2, df = 4), z = 2 * pnorm(-2)), 4)

# t squared is F with 1 and 4 df, so the tails agree
pf(2^2, df1 = 1, df2 = 4, lower.tail = FALSE)

# t with 5 df beyond 3, as a multiple of the normal tail
2 * pt(-3, df = 5) / (2 * pnorm(-3))

# Chi-square with 4 df: area above 6, and the 5% cutoff
pchisq(6, df = 4, lower.tail = FALSE)
qchisq(0.95, df = 4)

# Build the chi-square from squared normal draws
set.seed(1)
u <- replicate(20000, sum(rnorm(4)^2))
round(c(mean = mean(u), above6 = mean(u > 6)), 3)

# F tail for an observed F of 3 with 2 and 27 df
pf(3, df1 = 2, df2 = 27, lower.tail = FALSE)

Uses base R only.

What the three distributions are for