Confidence intervals; z-test, t-test and chi-squared test
Building confidence intervals for a mean, and testing hypotheses with the z-test, t-test and chi-squared tests (goodness of fit, independence, variance): which test to use, the test statistic, and the decision.
You compute and (with the divisor) before any interval or test.
Concept notes
1. Sampling distribution and standard error
Take a random sample from a population with mean and standard deviation . The sample mean is itself a random variable with mean and standard deviation , called the standard error (SE).
If the population is normal, is exactly normal. If not, it is approximately normal for large (central limit theorem; is the usual rule).
The sample standard deviation uses the divisor : . This makes an unbiased estimate of .
Standardising gives the two key statistics:
The second holds for a normal population with unknown. The distribution is symmetric about 0 with heavier tails than , and approaches as the degrees of freedom grow.
2. Confidence intervals
A confidence interval (CI) is a range computed from the sample that contains the true parameter in a stated fraction of repeated samples. A 95% CI means: if we repeated the sampling many times, about 95% of the intervals built this way would contain . It does not mean has a 95% probability of lying in this one fixed interval.
Case
CI for
known (or large)
unknown, normal population
Common values: (90%), (95%), (99%).
Width critical value SE. So:
higher confidence → wider interval;
larger → narrower interval; width falls as , so quadrupling halves the width;
the sample size for a margin of error is , rounded up.
3. Hypothesis testing: the framework
Null hypothesis : the default claim, with an equality (e.g. ).
Alternative : what we look for evidence of. is two-tailed; or is one-tailed.
Significance level : the probability of a Type I error, rejecting when it is true.
Type II error (): failing to reject when it is false. Power .
p-value: the probability, assuming , of a test statistic at least as extreme as the one observed. Reject if p-value , equivalently if the statistic falls in the rejection region.
Steps: state → pick the test → compute the statistic → compare with the critical value (or p-value with ) → conclude.
A two-tailed test at level rejects exactly when the CI does not contain the hypothesised value. For a fixed sample size, lowering raises . We say "fail to reject" , never "accept it as proved".
Two-tailed z-test at α = 0.05: reject H0 when |z| > 1.96 (each shaded tail has area 0.025)
4. z-test and t-test for means
Situation
Statistic
Distribution under
One mean, known (or large )
One mean, unknown, normal data
Two means, known
Two means, equal unknown variances
Paired data (before/after)
on the differences
Here is the pooled variance.
When to use which: known → z. Unknown with a small sample from a normal population → t. With a large sample, is a good estimate of and the z-test is used.
Decision rule for a two-tailed test: reject if (or ). For , reject if (1.645 at 5%).
5. Chi-squared tests
The chi-squared statistic compares observed counts with counts expected under :
Large values mean poor agreement, so these tests are right-tailed: reject if .
Goodness of fit ( categories): does the data follow a given distribution? , where is the number of parameters estimated from the data ( when the distribution is fully specified).
Test of independence ( contingency table): are two categorical variables independent? and .
Test for a variance (normal population): with . This one can be one- or two-tailed.
The chi-squared distribution with degrees of freedom has mean and variance . Counts tests need expected counts that are not too small (each is the usual rule).
Formulas to remember
Standard error of the mean
CI for the mean, σ known for 95%
CI for the mean, σ unknown
Sample size for margin ERound up
One-sample z statistic
One-sample t statistic
Pooled variance
Chi-squared statistic for countsGoodness of fit: ; independence:
Expected count in a contingency table
Chi-squared test for a variance
Common mistakes
Using with divisor instead of in the t statistic.
Using the z critical value 1.96 for a small-sample t-test; read from the table.
Using for a two-tailed test or for a one-tailed test.
Forgetting to subtract estimated parameters from the degrees of freedom in a goodness-of-fit test.
Dividing by instead of in the chi-squared statistic.
Reading a 95% CI as "the true mean lies here with probability 0.95".
Worked examples
Try each step yourself, then reveal the working.
Example 1: 95% confidence interval with known σ
numerical
A sample of 36 bulbs has mean life 50 hours. The population standard deviation is known to be 6 hours. Find the 95% confidence interval for the mean life.
Step 1: Find the standard error.
Try it on paper first.
Example 2: One-sample t-test
numerical
A machine is supposed to fill 50 g packets. A sample of 16 packets gives g and g. Assume normal fill weights. Test against at the 5% level. (.)
Step 1: Which test, and why?
Try it on paper first.
Example 3: Chi-squared goodness of fit: is the die fair?
numerical
A die is rolled 60 times. Faces 1 to 6 appear 8, 12, 9, 11, 6 and 14 times. Test at 5% whether the die is fair. (.)
Step 1: Find the expected counts under H0.
Try it on paper first.
Example 4: Choosing the right test
conceptual
Name the test for each: (a) mean of 400 exam scores compared with 65, population SD unknown; (b) mean of 10 normal measurements compared with 5, SD unknown; (c) whether gender and choice of elective (3 options) are independent; (d) whether a normal population's variance exceeds 4.
Step 1: Think about (a) and (b): what decides z versus t?
Try it on paper first.
Previous year questions
No official GATE DA question is tagged with this topic yet. The topic test below uses practice questions.
Topic test
8 questions: original practice questions, with GATE marking (MCQ wrong answers lose marks). Score 60% or more to pass. A new set is drawn each time.
Mark as mastered
Loading your progress…
My revision notes
Notes written by the GATEiit team against the official GATE DA syllabus; being checked by a reviewer. Updated 2026-11-21. Spotted a mistake? Use Report an issue on any question, or contact us.