The logic of significance tests, null and alternative hypotheses, test statistics, critical regions and p-values, Type I and Type II errors and power, one- vs two-tailed tests, and the z-test, t-tests (one-sample, paired, two-sample) and chi-squared tests (goodness of fit, independence, variance) with a decision table for choosing among them.
The logic of a test
A hypothesis test asks: if the null hypothesis were true, how surprising would data like ours be?
State H 0 H_0 H 0 (the default, e.g. μ = μ 0 \mu = \mu_0 μ = μ 0 ) and H 1 H_1 H 1 (what we want evidence for: μ ≠ μ 0 \mu \ne \mu_0 μ = μ 0 , μ > μ 0 \mu > \mu_0 μ > μ 0 or μ < μ 0 \mu < \mu_0 μ < μ 0 ).
Choose the significance level α \alpha α (commonly 0.05).
Compute a test statistic whose distribution under H 0 H_0 H 0 is known.
Either compare it with a critical value (reject if it falls in the critical region) or compute the p-value and reject if p < α p < \alpha p < α .
State the conclusion in context. "Fail to reject H 0 H_0 H 0 " is not "accept H 0 H_0 H 0 ".
Errors and power
H 0 H_0 H 0 trueH 0 H_0 H 0 falseReject H 0 H_0 H 0 Type I error (prob. α \alpha α )correct (power = 1 − β = 1 - \beta = 1 − β ) Do not reject H 0 H_0 H 0 correct (prob. 1 − α 1 - \alpha 1 − α ) Type II error (prob. β \beta β )
H₀ H₁
α β
reject H₀ → ← do not reject
Moving the critical value right lowers α but raises β; only a larger sample (narrower curves) lowers both.
Power increases with sample size, with effect size ∣ μ 1 − μ 0 ∣ |\mu_1 - \mu_0| ∣ μ 1 − μ 0 ∣ , with α \alpha α , and as σ \sigma σ decreases.
p-values
The p-value is the probability, computed under H 0 H_0 H 0 , of a test statistic at least as extreme as the one observed.
Alternative p-value for an observed z z z H 1 : μ > μ 0 H_1: \mu > \mu_0 H 1 : μ > μ 0 (right-tailed)1 − Φ ( z ) 1 - \Phi(z) 1 − Φ ( z ) H 1 : μ < μ 0 H_1: \mu < \mu_0 H 1 : μ < μ 0 (left-tailed)Φ ( z ) \Phi(z) Φ ( z ) H 1 : μ ≠ μ 0 H_1: \mu \ne \mu_0 H 1 : μ = μ 0 (two-tailed)2 ( 1 − Φ ( ∣ z ∣ ) ) 2\bigl(1 - \Phi(\lvert z\rvert)\bigr) 2 ( 1 − Φ (∣ z ∣) )
Common trap
A small p-value says the data are unlikely under H 0 H_0 H 0 ; it is not the probability that H 0 H_0 H 0 is true, and it says nothing about the size or importance of the effect.
Critical values at a glance
α \alpha α one-tailed z z z two-tailed z z z 0.10 1.282 1.645 0.05 1.645 1.96 0.01 2.326 2.576
z-tests
Use when the population standard deviation is known , or for large samples (and for proportions).
Test Statistic One mean z = x ˉ − μ 0 σ / n z = \dfrac{\bar x - \mu_0}{\sigma/\sqrt n} z = σ / n x ˉ − μ 0 Two means (independent) z = ( x ˉ 1 − x ˉ 2 ) − Δ 0 σ 1 2 / n 1 + σ 2 2 / n 2 z = \dfrac{(\bar x_1 - \bar x_2) - \Delta_0}{\sqrt{\sigma_1^2/n_1 + \sigma_2^2/n_2}} z = σ 1 2 / n 1 + σ 2 2 / n 2 ( x ˉ 1 − x ˉ 2 ) − Δ 0 One proportion z = p ^ − p 0 p 0 ( 1 − p 0 ) / n z = \dfrac{\hat p - p_0}{\sqrt{p_0(1 - p_0)/n}} z = p 0 ( 1 − p 0 ) / n p ^ − p 0 Two proportions z = p ^ 1 − p ^ 2 p ^ ( 1 − p ^ ) ( 1 / n 1 + 1 / n 2 ) z = \dfrac{\hat p_1 - \hat p_2}{\sqrt{\hat p(1-\hat p)(1/n_1 + 1/n_2)}} z = p ^ ( 1 − p ^ ) ( 1/ n 1 + 1/ n 2 ) p ^ 1 − p ^ 2 , pooled p ^ = x 1 + x 2 n 1 + n 2 \hat p = \frac{x_1 + x_2}{n_1 + n_2} p ^ = n 1 + n 2 x 1 + x 2
t-tests
Use for (approximately) normal data when σ \sigma σ is unknown and estimated by s s s .
Test Statistic d.f. One-sample t = x ˉ − μ 0 s / n t = \dfrac{\bar x - \mu_0}{s/\sqrt n} t = s / n x ˉ − μ 0 n − 1 n - 1 n − 1 Paired t = d ˉ − Δ 0 s d / n t = \dfrac{\bar d - \Delta_0}{s_d/\sqrt n} t = s d / n d ˉ − Δ 0 on the differencesn − 1 n - 1 n − 1 Two-sample, equal variances (pooled) t = x ˉ 1 − x ˉ 2 s p 1 / n 1 + 1 / n 2 t = \dfrac{\bar x_1 - \bar x_2}{s_p\sqrt{1/n_1 + 1/n_2}} t = s p 1/ n 1 + 1/ n 2 x ˉ 1 − x ˉ 2 , s p 2 = ( n 1 − 1 ) s 1 2 + ( n 2 − 1 ) s 2 2 n 1 + n 2 − 2 s_p^2 = \dfrac{(n_1-1)s_1^2 + (n_2-1)s_2^2}{n_1 + n_2 - 2} s p 2 = n 1 + n 2 − 2 ( n 1 − 1 ) s 1 2 + ( n 2 − 1 ) s 2 2 n 1 + n 2 − 2 n_1 + n_2 - 2 n 1 + n 2 − 2 Two-sample, unequal variances (Welch) t = x ˉ 1 − x ˉ 2 s 1 2 / n 1 + s 2 2 / n 2 t = \dfrac{\bar x_1 - \bar x_2}{\sqrt{s_1^2/n_1 + s_2^2/n_2}} t = s 1 2 / n 1 + s 2 2 / n 2 x ˉ 1 − x ˉ 2 Welch–Satterthwaite approximation
Worked example
Two teaching methods: n 1 = n 2 = 10 n_1 = n_2 = 10 n 1 = n 2 = 10 , means 78 and 72, s 1 = 6 s_1 = 6 s 1 = 6 , s 2 = 8 s_2 = 8 s 2 = 8 . Pooled s p 2 = ( 9 ⋅ 36 + 9 ⋅ 64 ) / 18 = 50 s_p^2 = (9\cdot 36 + 9\cdot 64)/18 = 50 s p 2 = ( 9 ⋅ 36 + 9 ⋅ 64 ) /18 = 50 , s p = 7.07 s_p = 7.07 s p = 7.07 . t = 6 / ( 7.07 0.2 ) = 6 / 3.162 = 1.90 t = 6/(7.07\sqrt{0.2}) = 6/3.162 = 1.90 t = 6/ ( 7.07 0.2 ) = 6/3.162 = 1.90 with 18 d.f.; t 0.025 , 18 = 2.101 t_{0.025,18} = 2.101 t 0.025 , 18 = 2.101 , so the difference is not significant at 5% (two-sided).
Chi-squared tests
All use χ 2 = ∑ ( O − E ) 2 E \chi^2 = \sum \dfrac{(O - E)^2}{E} χ 2 = ∑ E ( O − E ) 2 over cells and are right-tailed; each expected count should be at least about 5.
Test Question Expected counts d.f. Goodness of fit do counts follow a hypothesised distribution? E i = n p i E_i = n\,p_i E i = n p i k − 1 − ( number of estimated parameters ) k - 1 - (\text{number of estimated parameters}) k − 1 − ( number of estimated parameters ) Independence (contingency table) are two categorical variables related? E i j = ( row i ) ( col j ) n E_{ij} = \dfrac{(\text{row}_i)(\text{col}_j)}{n} E ij = n ( row i ) ( col j ) ( r − 1 ) ( c − 1 ) (r-1)(c-1) ( r − 1 ) ( c − 1 ) Homogeneity do several populations share one distribution? same as independence ( r − 1 ) ( c − 1 ) (r-1)(c-1) ( r − 1 ) ( c − 1 ) Single variance (normal data) is σ 2 = σ 0 2 \sigma^2 = \sigma_0^2 σ 2 = σ 0 2 ? — statistic ( n − 1 ) s 2 σ 0 2 \dfrac{(n-1)s^2}{\sigma_0^2} σ 0 2 ( n − 1 ) s 2 , n − 1 n-1 n − 1
Critical values worth knowing (5%): χ 1 2 = 3.841 \chi^2_{1} = 3.841 χ 1 2 = 3.841 , χ 2 2 = 5.991 \chi^2_{2} = 5.991 χ 2 2 = 5.991 , χ 3 2 = 7.815 \chi^2_{3} = 7.815 χ 3 2 = 7.815 , χ 4 2 = 9.488 \chi^2_4 = 9.488 χ 4 2 = 9.488 , χ 5 2 = 11.070 \chi^2_5 = 11.070 χ 5 2 = 11.070 .
Which test?
Recognize it
Testing a mean , σ \sigma σ known or n n n large → z-test .
Testing a mean, σ \sigma σ unknown, small sample, normal data → t-test (paired if the observations come in matched pairs).
Testing a proportion → z-test for proportions.
Counts in categories vs a model → chi-squared goodness of fit .
Two categorical variables in a table → chi-squared independence .
Spread of normal data → chi-squared variance test (or the F-test for two variances).
Quick revision
Practice questions GATE-style questions: 3 one-mark and 7 two-mark. Wrong MCQs cost ⅓ of their marks in the real exam; MSQ and NAT have no negative marking. Attempt each before opening the solution.
Q1 MCQ 1 mark
A Type I error occurs when we
A fail to reject H 0 H_0 H 0 when H 0 H_0 H 0 is false B reject H 0 H_0 H 0 when H 0 H_0 H 0 is true C reject H 0 H_0 H 0 when H 0 H_0 H 0 is false D fail to reject H 0 H_0 H 0 when H 0 H_0 H 0 is true Check answer Show solution
Q2 NAT 2 marks
A machine fills packets with mean weight claimed to be 100 g; the population standard deviation is known to be 15 g. A sample of 36 packets has mean 105 g. The value of the z test statistic for H 0 : μ = 100 H_0: \mu = 100 H 0 : μ = 100 is ______.
Check answer Show solution
Q3 MCQ 2 marks
Packets have claimed mean weight 100 g with known σ = 15 \sigma = 15 σ = 15 g; a sample of 36 has mean 105 g, so z = 2 z = 2 z = 2 . Test H 0 : μ = 100 H_0: \mu = 100 H 0 : μ = 100 against H 1 : μ ≠ 100 H_1: \mu \ne 100 H 1 : μ = 100 at the 5% significance level. The correct conclusion is
A Do not reject H 0 H_0 H 0 , since 2 < 2.576 2 < 2.576 2 < 2.576 B Reject H 0 H_0 H 0 , since ∣ z ∣ = 2 > 1.96 |z| = 2 > 1.96 ∣ z ∣ = 2 > 1.96 C Reject H 0 H_0 H 0 , since z = 2 > 1.645 z = 2 > 1.645 z = 2 > 1.645 but the test is inconclusive two-sided D Do not reject H 0 H_0 H 0 , since the p-value is 0.0228 Check answer Show solution
Q4 NAT 2 marks
A sample of 9 measurements from a normal population has mean 52 and sample standard deviation 3. The value of the t statistic for testing H 0 : μ = 50 H_0: \mu = 50 H 0 : μ = 50 is ______.
Check answer Show solution
Q5 NAT 2 marks
A die is rolled 60 times, giving the face counts 8 , 12 , 9 , 11 , 6 , 14 8, 12, 9, 11, 6, 14 8 , 12 , 9 , 11 , 6 , 14 for faces 1–6. The chi-squared goodness-of-fit statistic for testing whether the die is fair is ______.
Check answer Show solution
Q6 NAT 1 mark
For a chi-squared test of independence on a contingency table with 3 rows and 4 columns, the number of degrees of freedom is ______.
Check answer Show solution
Q7 MSQ 2 marks
Which of the following statements are correct?
One or more options are correct.
A The p-value is the probability that H 0 H_0 H 0 is true B We reject H 0 H_0 H 0 at level α \alpha α when the p-value is less than α \alpha α C For a fixed sample size, lowering α \alpha α increases the probability of a Type II error D The power of a test is 1 − β 1 - \beta 1 − β Check answer Show solution
Q8 NAT 2 marks
100 people are classified by two binary attributes giving the table ( 20 30 30 20 ) \begin{pmatrix} 20 & 30 \\ 30 & 20\end{pmatrix} ( 20 30 30 20 ) . The chi-squared statistic (without continuity correction) for testing independence is ______.
Check answer Show solution
Q9 MCQ 1 mark
Blood pressure is measured on the same 15 patients before and after a treatment. The appropriate test for a change in mean blood pressure is
A two-sample (independent) t-test B paired t-test C chi-squared test of independence D z-test for a proportion
Check answer Show solution
Q10 NAT 2 marks
A coin is tossed 100 times and shows 60 heads. The z statistic for testing H 0 : p = 0.5 H_0: p = 0.5 H 0 : p = 0.5 is ______.
Check answer Show solution