∑GATE DA Atlas

Hypothesis Testing — z-test, t-test and Chi-squared Tests

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.

Section 110 practice questions

The logic of a test

A hypothesis test asks: if the null hypothesis were true, how surprising would data like ours be?

  1. State H0H_0 (the default, e.g. μ=μ0\mu = \mu_0) and H1H_1 (what we want evidence for: μ≠μ0\mu \ne \mu_0, μ>μ0\mu > \mu_0 or μ<μ0\mu < \mu_0).
  2. Choose the significance level α\alpha (commonly 0.05).
  3. Compute a test statistic whose distribution under H0H_0 is known.
  4. 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.
  5. State the conclusion in context. "Fail to reject H0H_0" is not "accept H0H_0".

Errors and power

H0H_0 trueH0H_0 false
Reject H0H_0Type I error (prob. α\alpha)correct (power =1−β= 1 - \beta)
Do not reject H0H_0correct (prob. 1−α1 - \alpha)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|, with α\alpha, and as σ\sigma decreases.

p-values

The p-value is the probability, computed under H0H_0, of a test statistic at least as extreme as the one observed.

Alternativep-value for an observed zz
H1:μ>μ0H_1: \mu > \mu_0 (right-tailed)1−Φ(z)1 - \Phi(z)
H1:μ<μ0H_1: \mu < \mu_0 (left-tailed)Φ(z)\Phi(z)
H1:μ≠μ0H_1: \mu \ne \mu_0 (two-tailed)2(1−Φ(∣z∣))2\bigl(1 - \Phi(\lvert z\rvert)\bigr)

Critical values at a glance

α\alphaone-tailed zztwo-tailed zz
0.101.2821.645
0.051.6451.96
0.012.3262.576

z-tests

Use when the population standard deviation is known, or for large samples (and for proportions).

TestStatistic
One meanz=xˉ−μ0σ/nz = \dfrac{\bar x - \mu_0}{\sigma/\sqrt n}
Two means (independent)z=(xˉ1−xˉ2)−Δ0σ12/n1+σ22/n2z = \dfrac{(\bar x_1 - \bar x_2) - \Delta_0}{\sqrt{\sigma_1^2/n_1 + \sigma_2^2/n_2}}
One proportionz=p^−p0p0(1−p0)/nz = \dfrac{\hat p - p_0}{\sqrt{p_0(1 - p_0)/n}}
Two proportionsz=p^1−p^2p^(1−p^)(1/n1+1/n2)z = \dfrac{\hat p_1 - \hat p_2}{\sqrt{\hat p(1-\hat p)(1/n_1 + 1/n_2)}}, pooled p^=x1+x2n1+n2\hat p = \frac{x_1 + x_2}{n_1 + n_2}

t-tests

Use for (approximately) normal data when σ\sigma is unknown and estimated by ss.

TestStatisticd.f.
One-samplet=xˉ−μ0s/nt = \dfrac{\bar x - \mu_0}{s/\sqrt n}n−1n - 1
Pairedt=dˉ−Δ0sd/nt = \dfrac{\bar d - \Delta_0}{s_d/\sqrt n} on the differencesn−1n - 1
Two-sample, equal variances (pooled)t=xˉ1−xˉ2sp1/n1+1/n2t = \dfrac{\bar x_1 - \bar x_2}{s_p\sqrt{1/n_1 + 1/n_2}}, sp2=(n1−1)s12+(n2−1)s22n1+n2−2s_p^2 = \dfrac{(n_1-1)s_1^2 + (n_2-1)s_2^2}{n_1 + n_2 - 2}n1+n2−2n_1 + n_2 - 2
Two-sample, unequal variances (Welch)t=xˉ1−xˉ2s12/n1+s22/n2t = \dfrac{\bar x_1 - \bar x_2}{\sqrt{s_1^2/n_1 + s_2^2/n_2}}Welch–Satterthwaite approximation

Chi-squared tests

All use χ2=∑(O−E)2E\chi^2 = \sum \dfrac{(O - E)^2}{E} over cells and are right-tailed; each expected count should be at least about 5.

TestQuestionExpected countsd.f.
Goodness of fitdo counts follow a hypothesised distribution?Ei=n piE_i = n\,p_ik−1−(number of estimated parameters)k - 1 - (\text{number of estimated parameters})
Independence (contingency table)are two categorical variables related?Eij=(rowi)(colj)nE_{ij} = \dfrac{(\text{row}_i)(\text{col}_j)}{n}(r−1)(c−1)(r-1)(c-1)
Homogeneitydo several populations share one distribution?same as independence(r−1)(c−1)(r-1)(c-1)
Single variance (normal data)is σ2=σ02\sigma^2 = \sigma_0^2?—statistic (n−1)s2σ02\dfrac{(n-1)s^2}{\sigma_0^2}, n−1n-1

Critical values worth knowing (5%): χ12=3.841\chi^2_{1} = 3.841, χ22=5.991\chi^2_{2} = 5.991, χ32=7.815\chi^2_{3} = 7.815, χ42=9.488\chi^2_4 = 9.488, χ52=11.070\chi^2_5 = 11.070.

Which test?

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.

Q1MCQ1 mark

A Type I error occurs when we

Q2NAT2 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 H0:μ=100H_0: \mu = 100 is ______.

Q3MCQ2 marks

Packets have claimed mean weight 100 g with known σ=15\sigma = 15 g; a sample of 36 has mean 105 g, so z=2z = 2. Test H0:μ=100H_0: \mu = 100 against H1:μ≠100H_1: \mu \ne 100 at the 5% significance level. The correct conclusion is

Q4NAT2 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 H0:μ=50H_0: \mu = 50 is ______.

Q5NAT2 marks

A die is rolled 60 times, giving the face counts 8,12,9,11,6,148, 12, 9, 11, 6, 14 for faces 1–6. The chi-squared goodness-of-fit statistic for testing whether the die is fair is ______.

Q6NAT1 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 ______.

Q7MSQ2 marks

Which of the following statements are correct?

One or more options are correct.

Q8NAT2 marks

100 people are classified by two binary attributes giving the table (20303020)\begin{pmatrix} 20 & 30 \\ 30 & 20\end{pmatrix}. The chi-squared statistic (without continuity correction) for testing independence is ______.

Q9MCQ1 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

Q10NAT2 marks

A coin is tossed 100 times and shows 60 heads. The z statistic for testing H0:p=0.5H_0: p = 0.5 is ______.