2. Review of Probability and Statistics

A recap of the probability and statistics needed for simulation: probability axioms, random variables, convergence modes, stochastic processes, and estimation of means and variances.

2.1. Axioms of Probability

  • Sample space Ω\Omega: the collection of all outcomes of a random experiment. Each element ω∈Ω\omega \in \Omega is called a sample point.
  • Event: any subset of the sample space, A⊆ΩA \subseteq \Omega.
  • Probability: a function that assigns to each event AA a number P(A)P(A). It is not an arbitrary function; it must satisfy the following axioms:
    1. 0≤P(A)≤10 \le P(A) \le 1
    2. P(Ω)=1P(\Omega) = 1
    3. If A1,A2,…A_1, A_2, \dots are pairwise disjoint (Ai∩Aj=∅A_i \cap A_j = \emptyset for i≠ji \ne j), then P(⋃i=1∞Ai)=∑i=1∞P(Ai)P\left(\bigcup_{i=1}^\infty A_i\right) = \sum_{i=1}^\infty P(A_i).

2.2. Random Variables and Their Properties

A random variable is a function that assigns to each ω∈Ω\omega \in \Omega a numerical value: X:Ω→(−∞,∞)X : \Omega \to (-\infty, \infty).

The cumulative distribution function (c.d.f.) is

F(x)=P(X≤x)=P({ω:X(ω)≤x}).F(x) = P(X \le x) = P(\{\omega : X(\omega) \le x\}).

Properties:

  1. FF is non-decreasing in xx, and right-continuous with left limits. At a jump, the value at the point equals the value after the jump: F(x0)=F(x0+)F(x_0) = F(x_0^+).

    x₀ F(x₀⁻) F(x₀) jump = P(X = x₀)
  2. lim⁡x→∞F(x)=1\lim_{x \to \infty} F(x) = 1, lim⁡x→−∞F(x)=0\lim_{x \to -\infty} F(x) = 0

  3. P(a<X≤b)=F(b)−F(a)P(a < X \le b) = F(b) - F(a)

2.2.1. Two types of random variables

Discrete: XX takes a countable number of different values. A discrete r.v. is described by its probability mass function (p.m.f.) pX(x)=P(X=x)p_X(x) = P(X = x):

  1. 0≤pX(x)≤10 \le p_X(x) \le 1
  2. ∑all xpX(x)=1\sum_{\text{all } x} p_X(x) = 1
  3. F(x)=P(X≤x)=∑y≤xpX(y)F(x) = P(X \le x) = \sum_{y \le x} p_X(y)
  4. pX(x)=F(x)−F(x−)p_X(x) = F(x) - F(x^-) (value right after the jump minus value right before the jump)

Continuous: there exists a function ff (the probability density function, p.d.f.) such that F(x)=∫−∞xf(y) dyF(x) = \int_{-\infty}^{x} f(y)\,dy:

  1. f(x)≥0f(x) \ge 0
  2. ∫−∞∞f(x) dx=1\int_{-\infty}^{\infty} f(x)\,dx = 1
  3. P(a≤X≤b)=∫abf(x) dxP(a \le X \le b) = \int_a^b f(x)\,dx
  4. dF(x)dx=f(x)\dfrac{dF(x)}{dx} = f(x)

2.2.2. Expectation and variance

Expectation of a r.v.:

E[X]={∑all xx pX(x)X discrete∫−∞∞x f(x) dxX continuous\mathbf{E}[X] = \begin{cases} \displaystyle\sum_{\text{all } x} x\, p_X(x) & X \text{ discrete} \\[6pt] \displaystyle\int_{-\infty}^{\infty} x\, f(x)\,dx & X \text{ continuous} \end{cases}

Expectation of a function of a r.v., Y=g(X)Y = g(X):

E[Y]={∑all yy pY(y)=∑all xg(x) pX(x)X discrete∫−∞∞y fY(y) dy=∫−∞∞g(x) fX(x) dxX continuous\mathbf{E}[Y] = \begin{cases} \displaystyle\sum_{\text{all } y} y\, p_Y(y) = \sum_{\text{all } x} g(x)\, p_X(x) & X \text{ discrete} \\[6pt] \displaystyle\int_{-\infty}^{\infty} y\, f_Y(y)\,dy = \int_{-\infty}^{\infty} g(x)\, f_X(x)\,dx & X \text{ continuous} \end{cases}

Variance:

Var⁡(X)=E[(X−E[X])2]={∑all x(x−E[X])2 pX(x)X discrete∫−∞∞(x−E[X])2 f(x) dxX continuous=E[X2]−(E[X])2\begin{aligned} \operatorname{Var}(X) &= \mathbf{E}\left[(X - \mathbf{E}[X])^2\right] \\ &= \begin{cases} \displaystyle\sum_{\text{all } x} (x - \mathbf{E}[X])^2\, p_X(x) & X \text{ discrete} \\[6pt] \displaystyle\int_{-\infty}^{\infty} (x - \mathbf{E}[X])^2\, f(x)\,dx & X \text{ continuous} \end{cases} \\ &= \mathbf{E}[X^2] - \left(\mathbf{E}[X]\right)^2 \end{aligned}

Standard deviation: Var⁡(X)\sqrt{\operatorname{Var}(X)}.

2.3. Bivariate Random Variables

Let X:Ω→RX : \Omega \to \mathbb{R} and Y:Ω→RY : \Omega \to \mathbb{R} be two r.v.s. The pair (X,Y)(X, Y) is called a bivariate r.v., described by the joint c.d.f.

F(x,y)=P(X≤x,  Y≤y).F(x, y) = P(X \le x,\; Y \le y).

Marginal c.d.f.s

FX(x)=P(X≤x)=lim⁡y→∞F(x,y),FY(y)=P(Y≤y)=lim⁡x→∞F(x,y).\begin{aligned} F_X(x) &= P(X \le x) = \lim_{y \to \infty} F(x, y), \\ F_Y(y) &= P(Y \le y) = \lim_{x \to \infty} F(x, y). \end{aligned}

Discrete case. Joint p.m.f. and marginals:

p(x,y)=P(X=x,  Y=y),pX(x)=∑all yp(x,y),pY(y)=∑all xp(x,y).\begin{aligned} p(x, y) &= P(X = x,\; Y = y), \\ p_X(x) &= \sum_{\text{all } y} p(x, y), \qquad p_Y(y) = \sum_{\text{all } x} p(x, y). \end{aligned}

Conditional p.m.f. of XX given Y=yY = y:

pX∣Y(x∣y)=p(x,y)pY(y),pY(y)>0.p_{X \mid Y}(x \mid y) = \frac{p(x, y)}{p_Y(y)}, \qquad p_Y(y) > 0.

Continuous case. Joint p.d.f. ff and marginals:

F(x,y)=∫−∞x∫−∞yf(u,v) dv du,fX(x)=∫−∞∞f(x,y) dy,fY(y)=∫−∞∞f(x,y) dx.\begin{aligned} F(x, y) &= \int_{-\infty}^{x} \int_{-\infty}^{y} f(u, v)\,dv\,du, \\ f_X(x) &= \int_{-\infty}^{\infty} f(x, y)\,dy, \qquad f_Y(y) = \int_{-\infty}^{\infty} f(x, y)\,dx. \end{aligned}

Conditional p.d.f. of XX given Y=yY = y:

fX∣Y(x∣y)=f(x,y)fY(y),fY(y)>0.f_{X \mid Y}(x \mid y) = \frac{f(x, y)}{f_Y(y)}, \qquad f_Y(y) > 0.

Independence. XX and YY are independent iff F(x,y)=FX(x) FY(y)F(x, y) = F_X(x)\, F_Y(y) for all x,yx, y; equivalently

  • discrete: p(x,y)=pX(x) pY(y)p(x, y) = p_X(x)\, p_Y(y)
  • continuous: f(x,y)=fX(x) fY(y)f(x, y) = f_X(x)\, f_Y(y)

Expectation of Z=g(X,Y)Z = g(X, Y):

E[Z]=E[g(X,Y)]={∑all x∑all yg(x,y) p(x,y)discrete∫−∞∞∫−∞∞g(x,y) f(x,y) dx dycontinuous\mathbf{E}[Z] = \mathbf{E}[g(X, Y)] = \begin{cases} \displaystyle\sum_{\text{all } x}\sum_{\text{all } y} g(x, y)\, p(x, y) & \text{discrete} \\[6pt] \displaystyle\int_{-\infty}^{\infty}\int_{-\infty}^{\infty} g(x, y)\, f(x, y)\,dx\,dy & \text{continuous} \end{cases}

Covariance

cov⁡(X,Y)=E[(X−E[X])(Y−E[Y])]=E[XY]−E[X] E[Y].\begin{aligned} \operatorname{cov}(X, Y) &= \mathbf{E}\left[(X - \mathbf{E}[X])(Y - \mathbf{E}[Y])\right] \\ &= \mathbf{E}[XY] - \mathbf{E}[X]\,\mathbf{E}[Y]. \end{aligned}

  • If X=YX = Y, then cov⁡(X,Y)=Var⁡(X)\operatorname{cov}(X, Y) = \operatorname{Var}(X).
  • If XX and YY are independent, then cov⁡(X,Y)=0\operatorname{cov}(X, Y) = 0, i.e. E[XY]=E[X] E[Y]\mathbf{E}[XY] = \mathbf{E}[X]\,\mathbf{E}[Y].
  • The converse fails in general: cov⁡(X,Y)=0⇏\operatorname{cov}(X, Y) = 0 \not\Rightarrow independence. But if (X,Y)(X, Y) is jointly normal, then cov⁡(X,Y)=0  ⟺  X\operatorname{cov}(X, Y) = 0 \iff X and YY are independent.
  • cov⁡>0\operatorname{cov} > 0: positively correlated — when XX is above its mean, YY tends to be above its mean (and below with below).
  • cov⁡<0\operatorname{cov} < 0: negatively correlated — when XX is above its mean, YY tends to be below its mean.

Correlation coefficient

corr⁡(X,Y)=cov⁡(X,Y)Var⁡(X) Var⁡(Y)∈[−1,1].\operatorname{corr}(X, Y) = \frac{\operatorname{cov}(X, Y)}{\sqrt{\operatorname{Var}(X)}\,\sqrt{\operatorname{Var}(Y)}} \in [-1, 1].

2.4. Convergence Modes

Let X1,X2,…X_1, X_2, \dots be a sequence of r.v.s. Each XnX_n is a function Xn(ω)X_n(\omega), so “converge to X∗(ω)X^*(\omega)” is not the ordinary limit of a sequence of numbers like lim⁡n→∞1/n=0\lim_{n \to \infty} 1/n = 0; we need to say in what sense the functions converge.

Convergence with probability 1 (a.s. convergence, strong convergence).
Here XnX_n is still a random variable, so the statement is a probability:

P({ω:lim⁡n→∞Xn(ω)=X∗(ω)})=1.P\left(\left\{\omega : \lim_{n \to \infty} X_n(\omega) = X^*(\omega)\right\}\right) = 1.

For almost every sampled ω\omega, plugging it into XnX_n gives a sequence of numbers that converges to X∗(ω)X^*(\omega). The equality may fail on a set of ω\omega of probability zero (e.g. on Ω=[0,1]\Omega = [0,1] with the uniform measure, failing only at ω=0.5\omega = 0.5 still gives probability 1).

Convergence in distribution (weak convergence).
Let FnF_n be the c.d.f. of XnX_n and F∗F^* the c.d.f. of X∗X^*. These are ordinary functions, not random, so we take the limit directly:

lim⁡n→∞Fn(x)=F∗(x)at all continuity points x of F∗.\lim_{n \to \infty} F_n(x) = F^*(x) \quad \text{at all continuity points } x \text{ of } F^*.

Theorem (Strong Law of Large Numbers, SLLN).
Let X1,X2,…X_1, X_2, \dots be i.i.d. with E∣X1∣<∞\mathbf{E}|X_1| < \infty and E[X1]=μ\mathbf{E}[X_1] = \mu. Let Xˉn=1n∑i=1nXi\bar{X}_n = \frac{1}{n}\sum_{i=1}^n X_i. Then Xˉn→μ\bar{X}_n \to \mu with probability 1:

P({ω:lim⁡n→∞1n∑i=1nXi(ω)=μ})=1.P\left(\left\{\omega : \lim_{n \to \infty} \frac{1}{n}\sum_{i=1}^{n} X_i(\omega) = \mu\right\}\right) = 1.

This is exactly the first mode, with limit X∗≡μX^* \equiv \mu a constant random variable. The only assumption is that the mean exists; the variance may be infinite.

(Contrast the Weak LLN, which only gives convergence in probability: P(∣Xˉn−μ∣>ε)→0P(|\bar{X}_n - \mu| > \varepsilon) \to 0 for each fixed ε>0\varepsilon > 0. This is weaker — it does not say that any individual sample path settles down.)

Theorem (Central Limit Theorem, CLT).
Let X1,X2,…X_1, X_2, \dots be i.i.d. with E[X1]=μ\mathbf{E}[X_1] = \mu and 0<Var⁡(X1)=σ2<∞0 < \operatorname{Var}(X_1) = \sigma^2 < \infty. Define

Zn=Xˉn−μσ/n,Fn(x)=P(Zn≤x).Z_n = \frac{\bar{X}_n - \mu}{\sigma / \sqrt{n}}, \qquad F_n(x) = P(Z_n \le x).

Then Zn→N(0,1)Z_n \to N(0, 1) in distribution:

lim⁡n→∞Fn(x)=Φ(x)for all x,\lim_{n \to \infty} F_n(x) = \Phi(x) \quad \text{for all } x,

where Φ\Phi is the N(0,1)N(0,1) c.d.f. (Since Φ\Phi is continuous everywhere, every xx is a continuity point.)

Why these two are the canonical examples. Same setup, two different questions, two different modes:

SLLN CLT
object Xˉn\bar{X}_n itself rescaled fluctuation n(Xˉn−μ)/σ\sqrt{n}(\bar{X}_n - \mu)/\sigma
mode with probability 1 (strong) in distribution (weak)
limit constant μ\mu N(0,1)N(0, 1)
needs E∣X1∣<∞\mathbf{E}\lvert X_1\rvert < \infty Var⁡(X1)<∞\operatorname{Var}(X_1) < \infty

SLLN says the average lands on μ\mu; CLT says how it wobbles on the way in — at scale 1/n1/\sqrt{n}. CLT cannot be strengthened to a.s. convergence: for any fixed ω\omega, Zn(ω)Z_n(\omega) does not settle down but keeps oscillating forever. Only its distribution stabilizes. This illustrates that weak convergence is genuinely weaker, not just a technical relaxation.

2.5. Stochastic Processes

A stochastic process is a collection of r.v.s {X(t):t∈T}\{X(t) : t \in T\} indexed by tt, which usually represents time.

  • If TT is discrete / continuous, we have a discrete-time / continuous-time process.
  • If the values X(t)X(t) take are discrete / continuous, we have a discrete-state / continuous-state process.

Example: single-server FCFS queue. Interarrival times X1,X2,…X_1, X_2, \dots are i.i.d. and service times Y1,Y2,…Y_1, Y_2, \dots are i.i.d. Let DiD_i be the delay of the ii-th customer. Then D1=0D_1 = 0 and

Dn+1=max⁡{Dn+Yn−Xn+1,  0}(Lindley’s equation).D_{n+1} = \max\{D_n + Y_n - X_{n+1},\; 0\} \qquad \text{(Lindley's equation)}.

For instance D2=max⁡{Y1−X2,0}D_2 = \max\{Y_1 - X_2, 0\}: customer 2 waits only if customer 1’s service outlasts the gap between the two arrivals. {Dn}\{D_n\} is a discrete-time, continuous-state process.

Example: Poisson process. Let SnS_n be the arrival time of the nn-th customer, S0=0S_0 = 0, and let the interarrival times Xn=Sn−Sn−1X_n = S_n - S_{n-1} be i.i.d. Exp(λ)\text{Exp}(\lambda), so Sn=∑i=1nXiS_n = \sum_{i=1}^n X_i. The number of arrivals up to time tt is

N(t)=max⁡{n:Sn≤t}.N(t) = \max\{n : S_n \le t\}.

{N(t):t≥0}\{N(t) : t \ge 0\} is a continuous-time, discrete-state process, called a Poisson process with rate λ\lambda.

2.6. Estimation of Means and Variances

Let X1,…,XnX_1, \dots, X_n be i.i.d. with mean μ\mu and variance σ2\sigma^2.

Sample mean

Xˉ(n)=X1+X2+⋯+Xnn,E[Xˉ(n)]=μ,\bar{X}(n) = \frac{X_1 + X_2 + \cdots + X_n}{n}, \qquad \mathbf{E}[\bar{X}(n)] = \mu,

so Xˉ(n)\bar{X}(n) is an unbiased estimator of μ\mu.

Sample variance

S2(n)=1n−1∑i=1n(Xi−Xˉ(n))2,E[S2(n)]=σ2,S^2(n) = \frac{1}{n-1}\sum_{i=1}^n \left(X_i - \bar{X}(n)\right)^2, \qquad \mathbf{E}[S^2(n)] = \sigma^2,

so S2(n)S^2(n) is an unbiased estimator of σ2\sigma^2.

Both Xˉ(n)\bar{X}(n) and S2(n)S^2(n) are point estimators, and both are themselves random variables.

Idea. Replace the point estimator by an interval estimator (confidence interval), so that one can assert with a certain degree of confidence that the interval contains the true mean μ\mu.

2.6.1. Confidence Intervals

Case 1. Population distribution arbitrary, σ2\sigma^2 known.

Notation. Let Z∼N(0,1)Z \sim N(0,1) and define the upper α\alpha-quantile zαz_\alpha by

P(Z>zα)=α.P(Z > z_\alpha) = \alpha.

zα 0 N(0, 1) area = α

By symmetry of the standard normal, P(Z<−zα)=αP(Z < -z_\alpha) = \alpha, and hence

P(−zα/2≤Z≤zα/2)=1−α.P\left(-z_{\alpha/2} \le Z \le z_{\alpha/2}\right) = 1 - \alpha.

Derivation. By the Central Limit Theorem, for large nn,

Xˉ(n)−μσ/n  ≈  Z∼N(0,1).\frac{\bar{X}(n) - \mu}{\sigma / \sqrt{n}} \;\approx\; Z \sim N(0,1).

Therefore

P(−zα/2≤Xˉ(n)−μσ/n≤zα/2)  ≈  P(−zα/2≤Z≤zα/2)=1−α.P\left(-z_{\alpha/2} \le \frac{\bar{X}(n) - \mu}{\sigma/\sqrt{n}} \le z_{\alpha/2}\right) \;\approx\; P\left(-z_{\alpha/2} \le Z \le z_{\alpha/2}\right) = 1 - \alpha.

Rearranging the event inside the probability,

−zα/2≤Xˉ(n)−μσ/n≤zα/2  ⟺  Xˉ(n)−zα/2σn≤μ≤Xˉ(n)+zα/2σn.-z_{\alpha/2} \le \frac{\bar{X}(n) - \mu}{\sigma/\sqrt{n}} \le z_{\alpha/2} \iff \bar{X}(n) - z_{\alpha/2}\frac{\sigma}{\sqrt{n}} \le \mu \le \bar{X}(n) + z_{\alpha/2}\frac{\sigma}{\sqrt{n}}.

Conclusion. An approximate 100(1−α)%100(1-\alpha)\% confidence interval for μ\mu is

[ Xˉ(n)−zα/2σn,  Xˉ(n)+zα/2σn ].\left[\, \bar{X}(n) - z_{\alpha/2}\frac{\sigma}{\sqrt{n}},\; \bar{X}(n) + z_{\alpha/2}\frac{\sigma}{\sqrt{n}} \,\right].

Case 2. Population normal, σ2\sigma^2 unknown.

Notation. Let T∼tn−1T \sim t_{n-1} (Student’s tt with n−1n-1 degrees of freedom) and define tα, n−1t_{\alpha,\,n-1} by

P(T>tα, n−1)=α.P(T > t_{\alpha,\,n-1}) = \alpha.

Since the tt distribution is symmetric about 00,

P(−tα/2, n−1≤T≤tα/2, n−1)=1−α.P\left(-t_{\alpha/2,\,n-1} \le T \le t_{\alpha/2,\,n-1}\right) = 1 - \alpha.

Derivation. Let X1,…,Xn∼i.i.d.N(μ,σ2)X_1, \dots, X_n \overset{\text{i.i.d.}}{\sim} N(\mu, \sigma^2) with σ2\sigma^2 unknown, and estimate σ2\sigma^2 by S2(n)S^2(n). Replacing σ\sigma by S(n)S(n) in the standardized mean gives

Xˉ(n)−μS(n)/n  ∼  tn−1\frac{\bar{X}(n) - \mu}{S(n)/\sqrt{n}} \;\sim\; t_{n-1}

exactly (not just approximately), because Xˉ(n)\bar{X}(n) and S2(n)S^2(n) are independent under normality, with (n−1)S2(n)σ2∼χn−12\frac{(n-1)S^2(n)}{\sigma^2} \sim \chi^2_{n-1}. Hence

P(−tα/2, n−1≤Xˉ(n)−μS(n)/n≤tα/2, n−1)=1−α,P\left(-t_{\alpha/2,\,n-1} \le \frac{\bar{X}(n) - \mu}{S(n)/\sqrt{n}} \le t_{\alpha/2,\,n-1}\right) = 1 - \alpha,

and rearranging as in Case 1 gives:

Conclusion. An exact 100(1−α)%100(1-\alpha)\% confidence interval for μ\mu is

[ Xˉ(n)−tα/2, n−1S(n)n,  Xˉ(n)+tα/2, n−1S(n)n ].\left[\, \bar{X}(n) - t_{\alpha/2,\,n-1}\frac{S(n)}{\sqrt{n}},\; \bar{X}(n) + t_{\alpha/2,\,n-1}\frac{S(n)}{\sqrt{n}} \,\right].

Comparison of the two intervals.

zα/2 tα/2, n−1 N(0, 1) t (dashed): heavier tails

For every nn and every α∈(0,1)\alpha \in (0,1),

tα/2, n−1  >  zα/2,t_{\alpha/2,\,n-1} \;>\; z_{\alpha/2},

because the tn−1t_{n-1} distribution has heavier tails than N(0,1)N(0,1). Consequently the tt-interval is wider than the zz-interval with the same S(n)S(n): the extra width is the price of estimating σ\sigma from the data rather than knowing it.

As n→∞n \to \infty, tn−1→N(0,1)t_{n-1} \to N(0,1) and so tα/2, n−1↓zα/2t_{\alpha/2,\,n-1} \downarrow z_{\alpha/2}; the two intervals coincide in the limit. In practice the difference is negligible for n≳30n \gtrsim 30.

Which is “better” depends on what is known:

  • σ2\sigma^2 known (Case 1): use zα/2z_{\alpha/2}. The interval is narrower, but only approximately at level 1−α1-\alpha unless the population is normal.
  • σ2\sigma^2 unknown and population normal (Case 2): use tα/2, n−1t_{\alpha/2,\,n-1}. The interval is exactly at level 1−α1-\alpha; substituting zα/2z_{\alpha/2} here would give an interval that is too narrow and under-covers μ\mu, especially for small nn.

2.6.2. Hypothesis Testing Concerning the Mean

Goal: determine whether a claim about μ\mu is true or not.

H0:μ=μ0(null hypothesis)vs.H1:μ≠μ0(alternative hypothesis)H_0: \mu = \mu_0 \quad \text{(null hypothesis)} \qquad \text{vs.} \qquad H_1: \mu \ne \mu_0 \quad \text{(alternative hypothesis)}

Steps in hypothesis testing

  1. Set up H0H_0 and H1H_1.
  2. Specify the significance level α\alpha: the maximum allowed type I error probability, P(reject H0∣H0 true)≤αP(\text{reject } H_0 \mid H_0 \text{ true}) \le \alpha.
Accept H0H_0 Reject H0H_0
H0H_0 is true correct type I error
H1H_1 is true type II error correct
  1. Choose the test statistic and the rejection region.
    For a normal population with σ2\sigma^2 unknown, use

    tn=Xˉ(n)−μ0S(n)/n,t_n = \frac{\bar{X}(n) - \mu_0}{S(n)/\sqrt{n}},

    which has a tn−1t_{n-1} distribution under H0H_0. The rejection region is { ∣tn∣>tα/2, n−1 }\{\,|t_n| > t_{\alpha/2,\,n-1}\,\}, so that P(reject H0∣H0)=αP(\text{reject } H_0 \mid H_0) = \alpha.
  2. Substitute the observed values into the test statistic and make the decision:
    • if ∣tn∣>tα/2, n−1|t_n| > t_{\alpha/2,\,n-1}, reject H0H_0;
    • if ∣tn∣≤tα/2, n−1|t_n| \le t_{\alpha/2,\,n-1}, do not reject H0H_0.

Remark. Rejecting H0H_0 is equivalent to μ0∉[Xˉ(n)±tα/2, n−1 S(n)/n]\mu_0 \notin \left[\bar{X}(n) \pm t_{\alpha/2,\,n-1}\, S(n)/\sqrt{n}\right], the CI from Case 2. If instead σ2\sigma^2 is known (Case 1), replace S(n)S(n) by σ\sigma and tα/2, n−1t_{\alpha/2,\,n-1} by zα/2z_{\alpha/2}.

2.6.3. Statistical tables (zz, tt, χ2\chi^2)

Every test so far ends by comparing a statistic against a threshold read from a table. All three tables answer the same question in the same way.

What a table contains. For a distribution with c.d.f. FF, the upper α\alpha-quantile xαx_\alpha is defined by

P(X>xα)=α,equivalentlyF(xα)=1−α.P(X > x_\alpha) = \alpha, \qquad\text{equivalently}\qquad F(x_\alpha) = 1 - \alpha .

So xα=F−1(1−α)x_\alpha = F^{-1}(1-\alpha): the table is just the inverse c.d.f. evaluated at a few convenient values of α\alpha. This is why zαz_\alpha, tα,n−1t_{\alpha, n-1}, and χd,α2\chi^2_{d,\alpha} all have the same shape of definition — only the distribution changes.

How the numbers are computed. There is no closed form for F−1F^{-1} in any of these three cases, so the entries are computed numerically: evaluate F(x)F(x) (itself an integral, computed by series expansion or numerical quadrature) and solve F(x)=1−αF(x) = 1-\alpha for xx by root-finding. For the chi-square distribution with dd degrees of freedom the density is

fd(x)=12d/2 Γ(d/2) xd/2−1e−x/2,x>0,f_d(x) = \frac{1}{2^{d/2}\,\Gamma(d/2)}\, x^{d/2 - 1} e^{-x/2}, \qquad x > 0,

and χd,α2\chi^2_{d,\alpha} is the number that leaves area α\alpha to its right under this curve. Before computers these values were tabulated once and printed in the back of textbooks; today any software returns them directly (in R, qchisq(1-alpha, df); in Python, scipy.stats.chi2.ppf(1-alpha, df)).

Reading the χ2\chi^2 table. Rows are degrees of freedom dd, columns are α\alpha. The entry is χd,α2\chi^2_{d,\alpha}.

d\αd \backslash \alpha 0.10 0.05 0.025 0.01
1 2.706 3.841 5.024 6.635
2 4.605 5.991 7.378 9.210
3 6.251 7.815 9.348 11.345
4 7.779 9.488 11.143 13.277
5 9.236 11.070 12.833 15.086
6 10.645 12.592 14.449 16.812
8 13.362 15.507 17.535 20.090
10 15.987 18.307 20.483 23.209
15 22.307 24.996 27.488 30.578
20 28.412 31.410 34.170 37.566
24 33.196 36.415 39.364 42.980

E.g. χ3, 0.052=7.815\chi^2_{3,\,0.05} = 7.815: a χ32\chi^2_3 variable exceeds 7.8157.815 with probability 0.050.05.

Two things to notice.

  • The entries grow with dd, because E[χd2]=d\mathbf{E}[\chi^2_d] = d and Var⁡(χd2)=2d\operatorname{Var}(\chi^2_d) = 2d: more terms in the sum of squares means a larger typical value. A raw χ2\chi^2 value therefore means nothing without its degrees of freedom.
  • The χ2\chi^2 table is one-sided (upper tail only), unlike the zz and tt tables which are used two-sided for confidence intervals. That is because χ2\chi^2 statistics measure squared deviation, so only large values are evidence against H0H_0.

For large dd a table is unnecessary: χd2≈N(d,2d)\chi^2_d \approx N(d, 2d), so χd,α2≈d+zα2d\chi^2_{d,\alpha} \approx d + z_\alpha\sqrt{2d}. Check at d=24d = 24, α=0.05\alpha = 0.05: 24+1.64548=35.424 + 1.645\sqrt{48} = 35.4 against the exact 36.41536.415.


2. Review of Probability and Statistics
http://example.com/2026/09/08/2026-09-08-review-of-prob-and-stats/
Author
Wind_like
Posted on
September 8, 2026
Licensed under