Module 14 · 14 min read · Free chapter
Sampling and hypothesis testing
Inference uses a sample to learn about a population. The sample mean has standard error σ/√n and is near normal in large samples. A good estimator is unbiased, efficient and consistent. A confidence interval gives a range that captures the truth in most samples. A test rejects the null when the statistic is extreme; Type I rejects a true null, Type II keeps a false one.
Start from zero: why sample and test?
A survey question. India's unemployment rate is announced from a labour survey of about four lakh people, not from a count of all 140 crore residents. Counting everyone every quarter would be far too slow and costly. So the figure is an estimate, and the honest question is how far it could be from the truth.
Two jobs of inference. Statistical inference uses a sample to say something about the population it came from. The first job is estimation: giving a best guess of an unknown number, with a margin of error. The second job is testing: deciding whether the data support a claim, such as "the new scheme raised farm incomes" or "returns to scale are constant".
Why economists need it. Every regression coefficient, poverty ratio and inflation forecast is computed from limited data. Without inference, a policymaker cannot tell a real effect from chance variation. This chapter builds the tools, and the next chapter applies them to regression.
Sampling and sampling distributions
Population and sample. The population is the whole group of interest, and a parameter such as the population mean μ describes it. A sample is the part actually observed, and a statistic such as the sample mean is computed from it. We use statistics to estimate parameters.
Ways to draw a sample. In simple random sampling, every unit has an equal chance of selection. In stratified sampling, the population is split into groups such as rural and urban, and each group is sampled separately, which gives more precise results when groups differ. Systematic sampling picks every kth unit from a list, and cluster sampling picks whole villages or blocks to save travel cost.
How large surveys work. Big national surveys use multistage stratified sampling: districts are stratified, villages are picked within them, and households are picked within villages. This keeps costs low while still covering every region. Non-random methods such as convenience or quota samples are cheaper but can be badly biased.
Two kinds of error. Sampling error arises because we see only part of the population, and it shrinks as the sample grows. Non-sampling error comes from wrong answers, poor questions, non-response or data entry slips. A census has no sampling error but can still have large non-sampling error.
The sampling distribution. If we drew many samples, would vary from sample to sample. Its distribution is the sampling distribution, with mean μ and standard deviation , called the standard error. Quadrupling the sample size halves the standard error, which is why precision gets expensive.
Central limit theorem. Whatever the shape of the population, is approximately normal when n is large, roughly above 30. This is why the normal, t, chi-square and F distributions from the previous chapter drive almost all testing. For small samples from a normal population with unknown σ, the t distribution with degrees of freedom is used instead.
Estimators and their properties
Estimator and estimate. An estimator is a rule, such as "take the sample mean". An estimate is the number the rule gives for one particular sample. Since samples vary, an estimator is a random variable, and we judge it by how its sampling distribution behaves.
Unbiasedness. An estimator is unbiased if : on average across samples, it hits the true value. The sample mean is unbiased for μ. The sample variance with divisor n is biased downwards, which is why the divisor is used.
Efficiency. Among unbiased estimators, the one with the smallest variance is efficient. Both the sample mean and the sample median are unbiased for the centre of a normal population, but the mean has smaller variance, so it is preferred. When an estimator is slightly biased but much less variable, we compare mean squared error: .
Consistency. An estimator is consistent if it gets arbitrarily close to the true value as the sample size grows. A simple sufficient condition is that its bias and its variance both go to zero as . Consistency is the minimum we ask of an estimator in large samples, and it is the property most at risk when a regressor is correlated with the error.
A worked example. Take the model where the errors have mean zero and variance . Minimising gives the OLS estimator . Then , so it is unbiased, and , which goes to zero as n grows. So is consistent.
Sufficiency. A sufficient statistic uses all the information in the sample about the parameter, so nothing more can be learned from the raw data. The sample mean is sufficient for the mean of a normal population. This property is less often asked, but it should be named in a full answer.
Methods of estimation. Least squares picks the parameter values that minimise the sum of squared deviations, with no assumption about the error distribution. The method of moments sets sample moments equal to population moments. Maximum likelihood (MLE) picks the parameter values that make the observed sample most probable, which needs an assumed distribution.
OLS and MLE compared. In the linear model with normal errors, MLE gives the same coefficients as OLS. The two differ in the error variance: MLE divides the residual sum of squares by n and is biased, while OLS divides by and is unbiased. MLE is attractive in large samples because it is consistent and asymptotically efficient, and it extends to models such as logit and probit where OLS does not fit.
Confidence intervals
From a point to a range. A single estimate is almost never exactly right. A confidence interval gives a range built so that, in repeated samples, a stated share of such ranges would contain the true value. The share, such as 95 per cent, is the confidence level.
Mean with known σ. Because is normal with standard error , the 95 per cent interval is
A 99 per cent interval uses 2.58 instead of 1.96, so it is wider. More confidence costs precision.
Mean with unknown σ. In practice σ is unknown and is replaced by the sample standard deviation s. The multiplier then comes from the t distribution with degrees of freedom, which has fatter tails than the normal. For a sample of 10, the 5 per cent two-tail t value is 2.262, not 1.96.
A regression coefficient. In the model , the OLS slope has standard error , where is the deviation of from its mean. The 95 per cent interval is
with degrees of freedom because two parameters were estimated.
Reading it correctly. A 95 per cent interval does not mean there is a 95 per cent chance the true value lies in this particular range. The true value is fixed; it is the interval that varies across samples. The correct reading is that the method captures the true value in 95 of every 100 samples.
Why it matters for policy. Survey reports print the estimate with its interval for this reason. If a poverty ratio is 20 per cent with an interval of 18 to 22, a fall to 19 per cent in the next round may be noise. Intervals keep debates honest about what the data can and cannot show.
Testing hypotheses
The logic. A test starts with a null hypothesis , usually a claim of "no effect", such as . The alternative is what we accept if the data make the null implausible. We assume the null is true, work out how surprising our sample would be, and reject the null only if the sample is very surprising.
Steps. First, state and . Second, choose a level of significance α, usually 5 per cent. Third, compute a test statistic whose distribution under the null is known. Fourth, compare it with the critical value, or equivalently look at the p-value, and decide.
Testing a regression slope. For against , the statistic is
which follows the t distribution with degrees of freedom. If exceeds the critical value, say 2.0 for a moderate sample, we reject the null and call X statistically significant. The confidence interval gives the same answer: reject if zero lies outside the 95 per cent interval.
Two kinds of mistakes. A Type I error rejects a null that is true, and its probability is α. A Type II error fails to reject a null that is false, and its probability is written β. The power of a test, , is the chance of detecting an effect that is really there.
The trade-off. For a fixed sample, lowering α to avoid false alarms raises the chance of missing real effects. The only way to cut both errors is a larger sample or a better design. A court that convicts only on very strong evidence protects the innocent but lets more of the guilty go free; tests face the same choice.
One tail or two. A two-tailed test is used when the alternative is "not equal", as in . A one-tailed test is used when theory predicts a sign, such as a negative price effect on demand. A one-tailed test puts the whole α in one tail, so its critical value is smaller.
The p-value. The p-value is the probability, if the null were true, of getting a statistic at least as extreme as the one observed. A p-value of 0.01 means such a result would turn up only once in a hundred samples by chance. Reject the null when the p-value is below α; it is the smallest level at which the null would be rejected.
t, F and chi-square tests in economics
Testing a restriction from theory. Take the Cobb-Douglas function . In logs it becomes , which OLS can estimate. Constant returns to scale means , and this is a single linear restriction we can test.
The t version. Under , the statistic is
with degrees of freedom. The covariance term is often forgotten, but it matters because the two estimates are usually correlated. If is below the 5 per cent critical value, the data are consistent with constant returns.
The F version. Another way is to estimate the model twice: unrestricted, and restricted by imposing . Then
where m is the number of restrictions and k the number of parameters in the unrestricted model. A large F means the restriction worsens the fit too much to be believed. With one restriction, F equals the square of the t statistic.
Overall significance. The F test of that all slope coefficients are zero asks whether the regression explains anything at all. It can be written in terms of as
It is possible for this F to be significant while each t is not, a classic sign of multicollinearity, taken up in the next chapter.
Chi-square tests. The chi-square distribution tests a variance against a stated value, the goodness of fit of observed frequencies to a theoretical distribution, and independence in a contingency table. For example, it can test whether loan default is independent of a borrower's caste or gender group. It compares observed with expected counts: .
Testing two means or variances. The t test compares two group means, such as wages of trained and untrained workers. The F test compares two variances, and it is the basis of tests for heteroscedasticity. Analysis of variance (ANOVA) uses F to compare several group means at once.
Significance is not importance. With a huge sample, a tiny effect can be statistically significant yet economically trivial. With a small sample, a large effect may fail to reach significance. A good answer reports the size of the coefficient and its interval, not just whether it is significant.
Misuse to avoid. Running many specifications and reporting only the one with p below 0.05 inflates false findings. This is called data mining or p-hacking. Pre-registered designs, replication and honest reporting of all tests are the remedies.
Descriptive lens: how papers ask this, and how to answer
Questions on this chapter take these forms: showing that an estimator is unbiased or consistent; the principles of OLS and maximum likelihood; building a confidence interval and describing the testing procedure for a regression coefficient; and testing a restriction from theory, such as constant returns to scale, with t or F.
Answer plan for "Show that the OLS estimator of α in Yᵢ = α + uᵢ is consistent."
- Minimise to get .
- Show using .
- Show using independent errors with constant variance.
- Conclude: bias is zero and variance goes to zero, so converges in probability to α.
Answer plan for "Test H₀: b₁ + b₂ = 1 in a Cobb-Douglas function." Take logs, estimate by OLS, form the t statistic with the covariance term, compare with , and interpret acceptance as constant returns to scale. Mention the restricted F test as an alternative.
Our practice questions (written by us for practice, not previous-year questions):
- Distinguish between sampling and non-sampling errors. Why do large surveys use stratified multistage sampling? (10 marks)
- Define unbiasedness, efficiency and consistency of an estimator. Can a biased estimator be preferred? (12 marks)
- Explain the meaning of a 95 per cent confidence interval and the common mistake in reading it. (8 marks)
- What are Type I and Type II errors? Why can they not both be reduced for a given sample size? (10 marks)
- "Statistical significance is not economic significance." Discuss with examples. (15 marks)
Keywords: population, parameter, sample, statistic, simple random, stratified, systematic, cluster, multistage sampling, sampling error, non-sampling error, sampling distribution, standard error, central limit theorem, degrees of freedom, estimator, estimate, unbiasedness, efficiency, consistency, sufficiency, mean squared error, least squares, method of moments, maximum likelihood, confidence interval, confidence level, null hypothesis, alternative hypothesis, level of significance, test statistic, critical region, Type I error, Type II error, power, one-tailed, two-tailed, p-value, t test, F test, restricted and unrestricted regression, overall significance, chi-square test, goodness of fit, contingency table, ANOVA, constant returns to scale, p-hacking.
Quick revision
- Parameter describes the population, statistic the sample. Sampling: simple random, stratified, systematic, cluster, multistage. Standard error of the mean ; CLT makes near normal for large n.
- Unbiased: . Efficient: least variance. Consistent: bias and variance go to zero as n grows. . OLS, method of moments, MLE; MLE equals OLS for β under normal errors but its error variance divides by n.
- 95% interval ; with s or for β use t with or degrees of freedom.
- Test: , , α, test statistic, critical region. Type I = reject a true null (α); Type II = keep a false null (β); power = . p-value below α means reject.
- t for one coefficient or one restriction (include the covariance term for ); F for several restrictions or overall fit; chi-square for variance, goodness of fit and independence.