We have a sample, but we want to make a decision about the whole population. The sample is noisy: even if nothing special is happening, random fluctuation produces patterns. So we need a disciplined rule that controls how often we get fooled by randomness. Hypothesis testing is exactly that rule.
WHAT is a test statistic? A single number computed from the data that measures how far the sample sits from what H0 predicts, measured in units of standard error so we know its random distribution.
We want to test H0:μ=μ0 using sample mean Xˉ from n observations with known population SD σ.
Step 1 — distribution of Xˉ. Each Xi has mean μ and variance σ2. The sample mean is Xˉ=n1∑Xi.
E[Xˉ]=μ,Var(Xˉ)=n21∑Var(Xi)=nσ2.Why this step? Variance of a sum of independent variables adds; the 1/n2 comes from the constant factor squared.
Step 2 — standard error. So the spread of Xˉ is SE=σ/n. Why? SD is the square root of variance.
Step 3 — standardize under H0.Assume H0 true, so μ=μ0. By the Central Limit Theorem, Xˉ is approximately normal, hence
Z=σ/nXˉ−μ0∼N(0,1).Why this step? Subtract the assumed mean, divide by SE → a unit-free score telling us how many standard errors the data is from H0.
WHY there's a tradeoff: lowering α (being stricter about rejecting) pushes the critical cutoff farther out, which makes it harder to detect true effects → β rises. The only way to shrink both is to increase n (narrows both distributions).
Same as Ex.2 but Xˉ=71: T=1.51=0.667<1.753 → fail to reject. Why this wording? We did not prove the method useless; we just lack evidence. Absence of evidence ≠ evidence of absence.
Recall Feynman: explain it to a 12-year-old
Imagine you suspect a coin is rigged. You start by believing it's fair (that's the null). You flip it 100 times and get 80 heads. Now ask: "If the coin really were fair, how often would pure luck give me something this lopsided?" If the answer is "almost never" (tiny p-value), you stop believing it's fair. If "eh, happens sometimes," you shrug and keep believing it's fair — not because you proved it, but because you have no good reason to doubt it. A Type I error is yelling "rigged!" about a perfectly fair coin. A Type II error is calling a loaded coin fair.
Hypothesis testing ka basic idea ek courtroom jaisa hai. Hum pehle null hypothesisH0 ko sach maan lete hain — yeh "kuch special nahi ho raha" wala boring claim hota hai (jaise machine theek hai, ya nayi method ka koi farak nahi). Phir hum apne data ko dekhte hain aur poochte hain: "agar H0 sach hota, to itna ajeeb data milne ki probability kitni hoti?" Yeh probability hi p-value hai. Agar p-value bahut chhota hai (chosen α, usually 0.05, se kam), matlab data H0 ke under bahut hi rare fluke hai — to hum H0 ko reject kar dete hain.
Test statistic sirf ek number hai jo batata hai data H0 se kitna door hai, standard error ke units mein. Jaise z=(Xˉ−μ0)/(σ/n). Iska derivation simple hai: sample mean Xˉ ka variance σ2/n hota hai (CLT se), to standardize karke humein N(0,1) score milta hai. Agar σ pata nahi, to s use karke t-test lagate hain.
Do tarah ki galtiyan ho sakti hain. Type I error (α) — sach H0 ko galti se reject kar dena, yaani false alarm (innocent ko convict). Type II error (β) — galat H0 ko reject na karna, yaani asli effect ko miss kar dena. Yaad rakho: dono ko ek saath kam karna mushkil hai — strict banoge (α chhota) to β badh jayega; dono ko chhota karna hai to sample size n badhao.
Sabse common galti: log sochte hain p-value matlab "H0 ke sach hone ki probability". Galat! p-value P(data∣H0) hai, na ki P(H0∣data). Aur "fail to reject" ka matlab H0 prove ho gaya nahi hota — bas itna ki abhi enough evidence nahi mila. Yeh distinctions exam aur real research dono mein bahut important hain.