We have a claim about a population, such as the value of its mean, and a sample mean that differs from it. Each sample is generally different, and hence each sample mean will vary, so a sample mean can differ from a claim that is true. Hypothesis testing provides a rule for deciding when the difference is too large to put down to this sampling variation.
It assumes the claim is true, works out how sample means would then vary, and rejects the claim only when a sample mean at least as far from it as ours would occur in fewer than a stated share of samples, conventionally 5%. Hence a true claim is rejected in at most 5% of samples.
The claim under test is called the null hypothesis. The smaller the p-value, the rarer a result at least as far from the null as ours would be if the null were true.
1. What is hypothesis testing? A claim and a sample
Two students disagree about the average grade of economics undergraduates in the UK (a made-up example). Student A claims it is no more than 65%. Student B believes it is higher. They cannot observe every student, so they agree to draw a random sample of 25 and let the data decide.
Suppose the sample mean is 67%. It is above 65, which looks like a point to Student B. But 25 other students would have given a different sample mean, and a figure of 67 could arise from sampling variation alone even if the population mean were 65. To judge the claim we have to ask how much a sample mean varies, and whether 67 is within the range that Student A's claim can explain.
What students say
“Nicky is an excellent econometrics tutor. He explains complex concepts clearly and makes them much easier to understand.”
“I was completely lost in my economics class, and then I started working Nicky and he totally saved me. He was excellent at explaining the material and extremely accommodating to meet with me many times despite us being in different time zones! Highly recommend working with Nicky!”
“Nicky is a very good and thorough teacher. He has excellent knowledge of econometrics and takes the time to work through your questions. Highly recommended!”
“Really great tutor! Encouraging, knowledgeable, friendly”
“Very good lesson, Nicky is very helpful.”
“Very helpful and clear.”
“I gather it was very useful, thank you!”
“Fantastic!”
2. What are the null and alternative hypotheses?
The two claims are written as statements about the unknown population mean, \(\mu\):
$$ H_0: \mu \le 65 \qquad\text{against}\qquad H_1: \mu > 65 . $$The null hypothesis, H0, is the claim being tested: here, Student A's. The alternative hypothesis, H1 (also written HA), is what we conclude if the evidence against H0 is strong enough: here, Student B's.
The two are not treated alike. A test starts by assuming H0 is true and asks whether the data contradict it. If they do, we reject H0 in favour of H1. If they do not, we say that we do not reject H0. We do not say that H0 has been shown to be true, because a sample that is compatible with \(\mu = 65\) is compatible with nearby values as well.
Both hypotheses are about the population. \(\mu\) is a fixed number that we cannot see. The sample mean changes from sample to sample. We write it \(\bar X\) when we mean it as a random quantity, in statements about its distribution or a probability, and \(\bar x\) for the number our sample gives, which we can see. (Books use other letters; the choice is cosmetic.) A hypothesis about \(\bar x\) would be pointless, since we can read it off.
3. Why a sample mean of 67 does not settle it: the sampling distribution
To judge 67 we need the sampling distribution of the sample mean: the distribution of \(\bar X\) across all the samples of 25 we might have drawn. Its spread is measured by the variance of the sample mean, the average squared distance between the sample mean and the population mean, taken over all the samples we could have drawn. Under random sampling (each grade drawn independently from the same population), this variance is the variance of one grade divided by the sample size, \(\sigma^2/n\). Intuitively, the larger the sample, the more closely it resembles the population it was drawn from, and so the less one sample can differ from another by chance. A variance is in squared units, marks squared here. Taking the square root returns it to marks, the units the data are measured in. The result is the standard error of the sample mean: the typical distance between a sample mean and the population mean. Suppose individual grades are normally distributed with a standard deviation of 10 (we take this as known for now; section 8 drops the assumption). Then
$$ \frac{\sigma}{\sqrt{n}} = \frac{10}{\sqrt{25}} = 2 \text{ marks.} $$One grade varies by about 10 marks around the population mean, and the mean of 25 grades by about 2. Since the grades are normal and drawn independently, \(\bar X\) is normal too, centred on the population mean. Lesson 4 derives \(\sigma^2/n\) in full, and lesson 5 sets the standard error beside the standard deviation.
Show where the variance of the sample mean comes from
- The sample mean is a sum divided by n. \(\bar X = (X_1 + X_2 + \dots + X_n)/n\), where \(X_i\) is the grade of the \(i\)th student drawn.
- Dividing by n divides the variance by n squared. A variance is in squared units, so \(\operatorname{Var}(\bar X) = \operatorname{Var}(X_1 + \dots + X_n)/n^2\).
- Independence lets the variances add. Under random sampling the \(X_i\) are independent draws from the same population, so the variance of their sum is the sum of their variances, \(n\sigma^2\).
- Put the two together. \(\operatorname{Var}(\bar X) = n\sigma^2/n^2 = \sigma^2/n\), and the standard error is its square root, \(\sigma/\sqrt{n}\).
A test is possible because, although we do not know \(\mu\), we know how \(\bar X\) is distributed for any given value of \(\mu\): normal, centred on \(\mu\), with standard error 2. Of all the values Student A's claim allows, 65 is the one under which a high sample mean is least surprising: a sample that is hard to reconcile with 65 is harder still to reconcile with 64. Hence we test at the boundary, 65. If the population mean is 65, sample means are normal with mean 65 and standard error 2, and a sample mean of 67 is one standard error above the centre.
4. What is a p-value, and where does it come from?
We want to know how surprising a sample mean of 67 would be if H0 were true. The p-value puts a number on that. It is the probability, if the population mean is 65, of a sample mean at least as large as the one we observed:
$$ \begin{aligned} P(\bar X \ge 67 \mid \mu = 65) &= P\!\left(Z \ge \frac{67 - 65}{2}\right) \\ &= P(Z \ge 1) = 0.159 . \end{aligned} $$In words: the probability of a sample mean of 67 or more when the population mean is 65 (the bar is read "when"). To find it, convert the sample mean into standard errors from 65 (here 1), then take the area of the standard normal distribution beyond that point. Subtracting 65 and dividing by 2 turns a normal variable with mean 65 and standard deviation 2 into a standard normal one (lesson 2 on standardising).
So if the population mean is 65, the boundary of Student A's claim, about one sample in six would still produce a mean of 67 or more, and if it is below 65, fewer would. A result like ours is not unusual under H0, and it is weak evidence against it.
Had the sample mean been 70, the calculation would give \(P(Z \ge 2.5) = 0.006\). If the population mean is 65, only about one sample in 160 would reach 70, and if it is below 65, fewer would. That would be strong evidence against Student A.
The same numbers can be found by counting, which shows what the probability refers to. We drew 10,000 samples of 25 grades from a population whose mean is 65, so that H0 is true by construction:
In the simulation 1,622 of the 10,000 sample means are 67 or more (16.2%, against 15.9% from the formula) and 63 are 70 or more (0.6%). A p-value is the share of the samples that a population mean of 65 would produce in which the sample mean is at least as far above 65 as ours.
5. Significance level, critical value and rejection region
To turn the evidence into a decision we need a rule for how small a p-value must be. That rule is set before the data are seen. The significance level, written \(\alpha\), is the largest probability of rejecting a true H0 that we are prepared to accept. We use 5% on this page; it is a convention, and section 6 shows what changes at 1%.
With \(\alpha = 0.05\) we look for the sample mean that would be exceeded in only 5% of samples if \(\mu = 65\). The standard normal distribution has 5% of its area above 1.645, so that point is 1.645 standard errors above 65:
$$ 65 + 1.645 \times 2 = 68.29 . $$The sample means above 68.29 form the rejection region. The test is: reject H0 if \(\bar x > 68.29\).
Working in standard errors removes the units, so the same cut-off serves for any mean and standard deviation. The test statistic is
$$ z = \frac{\bar x - 65}{2} , $$and the rule becomes: reject H0 if \(z > 1.645\). The cut-off on the scale of the statistic, 1.645, is the critical value of the test; 68.29 is the same cut-off on the scale of the sample mean. A sample mean of 67 gives \(z = 1\) and H0 is not rejected. A sample mean of 70 gives \(z = 2.5\) and H0 is rejected.
The critical value and the p-value are two ways of applying the same rule. The critical value 1.645 is the point with 5% of the area beyond it, so a \(z\) beyond 1.645 has less than 5% of the area beyond it. Rejecting when \(z > 1.645\) and rejecting when the p-value is below 0.05 are the same decision. The p-value is the more useful thing to report, since a reader can compare it with any level: 0.006 rejects at 5% and at 1%, and 0.159 rejects at neither.
6. What are Type I and Type II errors, and what is power?
The decision can be wrong in two ways, depending on whether H0 is in fact true.
| H0 is true | H0 is false | |
|---|---|---|
| Reject H0 | Type I error. Probability at most \(\alpha\), 5% here | Correct. Its probability is called the power (below) |
| Do not reject H0 | Correct. Probability at least 95% here | Type II error. Probability: 1 minus the power |
The columns are the two possible states of the world, and we do not know which holds. The rows are the two decisions. A Type I error is rejecting a true null. We cap its probability when we choose \(\alpha\): it is 5% when the mean is exactly 65 and smaller for any mean below 65. In Figure 3, the 498 samples above 68.29 are Type I errors, 5.0% of the 10,000.
A Type II error is failing to reject a false null. Its probability is not chosen. It depends on the true population mean, the sample size and the significance level. Suppose the population mean is 70. Sample means are then normal with mean 70 and standard error 2, and the test rejects when \(\bar x > 68.29\):
$$ \begin{aligned} P(\bar X > 68.29 \mid \mu = 70) &= P(Z > -0.855) \\ &= 0.804 . \end{aligned} $$The probability that the test rejects a false null is its power: 80.4% against a true mean of 70. The remaining 19.6% is the probability of a Type II error. Power depends on how far the true population mean is above 65. The same calculation for a true mean of 67 gives 26%. So when our sample mean of 67 failed to reject H0, that was no reason to believe Student A: with 25 students, a test of this kind misses a true mean of 67 three times in four.
Lowering \(\alpha\) to 1% moves the cut-off for the sample mean up to 69.65, which makes Type I errors rarer and Type II errors more common: power against a mean of 70 falls from 80% to 57%. A larger sample, with the level held at 5%, leaves the Type I error at 5% and reduces the Type II error, because the standard error shrinks: against a true mean of 67, power is 26% with 25 students, 64% with 100, and reaches 80% with 155. Lesson 8 of the course has the full table of power against the true mean, and the power curves.
7. What is the difference between a one-tailed and a two-tailed test?
Student B's alternative pointed one way, \(\mu > 65\), so only a high sample mean counted against H0 and the whole 5% rejection region was in the upper tail. That is a one-tailed test.
If the alternative is that the mean differs from 65 in either direction, \(H_1: \mu \ne 65\), a very low sample mean is evidence against H0 as well. The 5% is then split between the two tails, 2.5% in each, and H0 is rejected when \(z\) is above 1.96 or below -1.96. That is a two-tailed test, and its p-value is the area in both tails: twice the area beyond the observed \(z\) in its own tail. (That equals twice the one-tailed p-value only when the sample mean lies on the side the one-tailed alternative points to; for a sample mean below 65, the one-tailed p-value for \(H_1: \mu > 65\) is above 0.5.)
The choice can change the conclusion. A sample mean of 68.5 gives \(z = 1.75\): the one-tailed test rejects (1.75 is above 1.645, p = 0.040) and the two-tailed test does not (1.75 is below 1.96, p = 0.080). So the choice has to come from the question, before the data are seen. Picking the tail after looking at the sign of \(z\) doubles the true rate of Type I errors to 10%. Regression software reports two-tailed p-values. Lesson 7 has the picture of the two rejection regions.
8. When do you use a t-test instead of a z-test?
The z-test needs the population standard deviation, \(\sigma\). In practice it is unknown and we estimate it by the sample standard deviation, \(s\). The statistic keeps the same form:
$$ t = \frac{\bar x - \mu_0}{s/\sqrt{n}} . $$In words: t = (sample mean minus the hypothesised mean, \(\mu_0\)) divided by the estimated standard error.
Because \(s\) varies from sample to sample, the statistic as a random quantity, \(T = (\bar X - \mu_0)/(s/\sqrt{n})\) with \(s\) treated as random, varies more than \(Z\) does. Samples in which \(s\) comes out low give a statistic that is too far from zero, and they push more of its distribution into the tails than samples with a high \(s\) pull back. If the data are normal and the population mean is \(\mu_0\), \(T\) follows the t distribution with \(n - 1\) degrees of freedom, which has heavier tails than the normal and so larger critical values. The count is \(n - 1\) because \(s\) is built from deviations about the sample mean, which must add to zero, so only \(n - 1\) of them are free (what degrees of freedom mean; lesson 3 explains why the variance divides by \(n - 1\)).
Take nine students with grades 58, 62, 66, 66, 68, 70, 70, 74 and 78 (made-up numbers). Their mean is 68 and their standard deviation is 6, so the standard error is \(6/\sqrt{9} = 2\) and \(t = (68 - 65)/2 = 1.5\).
| n | Mean | Std. deviation | Std. error | t | Degrees of freedom | p-value, one-tailed | p-value, two-tailed |
|---|---|---|---|---|---|---|---|
| 9 | 68 | 6 | 2 | 1.5 | 8 | 0.086 | 0.172 |
Stata: the code
clear input grade 58 62 66 66 68 70 70 74 78 end ttest grade == 65
Stata: what it prints
. ttest grade == 65
One-sample t test
------------------------------------------------------------------------------
Variable | Obs Mean Std. err. Std. dev. [95% conf. interval]
---------+--------------------------------------------------------------------
grade | 9 68 2 6 63.38799 72.61201
------------------------------------------------------------------------------
mean = mean(grade) t = 1.5000
H0: mean = 65 Degrees of freedom = 8
Ha: mean < 65 Ha: mean != 65 Ha: mean > 65
Pr(T < t) = 0.9140 Pr(|T| > |t|) = 0.1720 Pr(T > t) = 0.0860
R: the code
# nine grades: test H0: mean = 65 against Ha: mean > 65, then the two-sided version with the 95% interval grades <- c(58, 62, 66, 66, 68, 70, 70, 74, 78) t.test(grades, mu = 65, alternative = "greater") t.test(grades, mu = 65)
R: what it prints
> # nine grades: test H0: mean = 65 against Ha: mean > 65, then the two-sided version with the 95% interval
> grades <- c(58, 62, 66, 66, 68, 70, 70, 74, 78)
> t.test(grades, mu = 65, alternative = "greater")
One Sample t-test
data: grades
t = 1.5, df = 8, p-value = 0.086
alternative hypothesis: true mean is greater than 65
95 percent confidence interval:
64.2809 Inf
sample estimates:
mean of x
68
> t.test(grades, mu = 65)
One Sample t-test
data: grades
t = 1.5, df = 8, p-value = 0.172
alternative hypothesis: true mean is not equal to 65
95 percent confidence interval:
63.38799 72.61201
sample estimates:
mean of x
68
Python: the code
from scipy import stats
# nine grades: test H0: mean = 65 against Ha: mean > 65, then the two-sided version with the 95% interval
grades = [58, 62, 66, 66, 68, 70, 70, 74, 78]
res = stats.ttest_1samp(grades, popmean=65, alternative="greater")
print("t statistic:", res.statistic)
print("degrees of freedom:", res.df)
print("one-sided p-value:", res.pvalue)
res2 = stats.ttest_1samp(grades, popmean=65)
ci = res2.confidence_interval(0.95)
print("two-sided p-value:", res2.pvalue)
print("95% interval:", ci.low, ci.high)
Python: what it prints
t statistic: 1.5 degrees of freedom: 8 one-sided p-value: 0.08600164597595561 two-sided p-value: 0.17200329195191122 95% interval: 63.38799172959167 72.61200827040832
With 8 degrees of freedom the one-tailed 5% critical value is 1.860, not 1.645, and the p-value is 0.086. H0 is not rejected. Treating 1.5 as a z-statistic would give a p-value of 0.067: too small, because it ignores the uncertainty in \(s\). As the sample grows, \(s\) settles on \(\sigma\) (the law of large numbers), so the gap closes: with 500 observations the two-tailed 5% critical value of t is 1.965, against 1.960 for z. The normal, t, chi-square and F distributions shows where the t distribution comes from.
9. A test on real data: home advantage in the Premier League
For each Premier League match, take the home side's goals minus the away side's goals, and test \(H_0: \mu = 0\), no home advantage, against \(H_1: \mu \ne 0\). A season's 380 matches are not a random sample; we treat them as independent draws from the matches that sides like these could play, which is an approximation, since each club plays 38 of them. In 2023/24 the mean difference is 0.321 goals with a standard error of 0.106, so \(t = 3.04\) and the null is rejected at the 5% level (p-value 0.003). In 2020/21 the mean is 0.011, \(t = 0.11\) and the p-value is 0.914: not rejected, yet the 95% interval, -0.18 to 0.20, still admits a small advantage in either direction. Lesson 7 works both tests step by step, with the Stata, R and Python code, and lesson 6 shows all five seasons.
10. How the same logic appears in regression output
Every row of a regression table contains a hypothesis test built in the same way. The null hypothesis is that the population coefficient is zero, the test statistic is the estimate divided by its standard error, and the p-value printed beside it is two-tailed. It is read from the t distribution with the regression's degrees of freedom, which is exact if the errors are normally distributed and a large-sample approximation otherwise.
In a regression of log hourly wage on education, experience and tenure for 526 US workers, the coefficient on education is 0.0920 with a standard error of 0.0073. So \(t = 0.09203/0.00733 = 12.56\), and the hypothesis that the population coefficient on education is zero is rejected at any conventional level. To test a value other than zero, subtract it first. Is the coefficient compatible with 0.10, one more year of education going with about 10% higher pay? Then \(t = (0.09203 - 0.10)/0.00733 = -1.09\), with a two-tailed p-value of 0.28: the data do not reject 0.10. Lesson 11 shows where a coefficient's standard error comes from. How to read regression output goes through the whole table.
Other tests in econometrics follow the same logic with a different statistic and a different reference distribution. The F-test of several coefficients at once uses the F distribution. Tests that a set of autocorrelations are all zero (the Q-test in reading the correlogram) use the chi-square distribution. Unit-root tests use their own tables of critical values. In each case: state H0, find the distribution of the statistic if H0 is true, compute the statistic, and compare. The normal, t, chi-square and F distributions says which test uses which.
11. What a p-value does not mean
- It is not the probability that the null hypothesis is true. It is the probability of data at least this extreme if the null is true. Getting from one to the other would need the probability of the null before seeing the data, which the test does not use.
- A p-value of 0.04 does not mean a 4% chance that the conclusion is wrong. The 5% level is how often a true null is rejected. How often a rejection is a mistake depends also on the power and on how plausible the null was.
- A p-value above 0.05 does not show that the null is true. For 2020/21 the p-value is 0.914 and the interval still includes an advantage of 0.2 goals.
- A small p-value does not mean a large difference. With 10,000 students, a sample mean of 65.5 would give \(z = 5\) and a p-value below 0.000001 against the null of 65. Read the size from the estimate and its interval.
- 0.045 and 0.055 do not mean opposite things. They lead to different decisions at the 5% level and are almost the same strength of evidence.
12. Check your understanding
Six questions, marked on the page; every option has an explanation, including the wrong ones. (Without JavaScript the explanations are shown beneath each question.)
1. In the 380 Premier League matches of 2023/24, home goals minus away goals average 0.321, with a standard deviation of 2.06 and a standard error of 0.106. For the null hypothesis of no home advantage, what is the t-statistic, and is the null rejected at the 5% level (critical value 1.97)?
0.106/0.321 = 0.33 is the ratio upside down. The estimate goes on top and its standard error underneath.
0.321/2.06 divides by the standard deviation of single matches. The mean of 380 matches varies far less: its standard error is 2.06/√380 = 0.106.
Correct. t = 0.321/0.106 = 3.0: the mean is three standard errors above zero, which would be very unusual if there were no home advantage.
2. At the 5% level a one-sided z-test rejects when z is above 1.645. A sample gives z = 2.5. Which of these is its p-value?
Correct. The p-value is the area beyond the observed z. The critical value 1.645 is the point with 5% of the area beyond it, and 2.5 lies further out, so the area beyond it has to be below 0.05. It is 0.006.
A p-value of 0.06 is above 0.05, which goes with a z below the critical value 1.645. A z of 2.5 is beyond the critical value, so its p-value is below 0.05.
A larger z means a smaller p-value: the further out the statistic, the less area lies beyond it. A p-value of 0.6 belongs to a z of about -0.25.
0.994 is the area below 2.5. The p-value is the area in the direction of the alternative, above 2.5.
3. When does a test of a mean use the t distribution in place of the standard normal?
The number of tails decides where the rejection region goes. It has nothing to do with the choice between z and t.
Correct. Replacing the unknown standard deviation by an estimate adds variation to the statistic, and for normal data the t distribution, with its heavier tails, is the distribution of the statistic that results. The critical values differ most in small samples (2.306 against 1.96 with 8 degrees of freedom) and by less as the sample grows.
The sign of the difference decides the sign of the statistic, not its distribution.
4. A researcher rejects a null hypothesis at the 5% level. Which statement is correct?
The 5% is the rejection rate when the null is true. How likely this rejection is to be a mistake also depends on how plausible the null was and on the power of the test.
Correct. The significance level is a property of the procedure: the share of samples in which a true null is rejected.
A test does not give the probability that either hypothesis is true. Rejection is evidence against the null, not a 95% proof of the alternative.
5. For the 380 Premier League matches of 2020/21, the test of no home advantage gives p = 0.91. Which reading is justified?
The p-value is the probability of a result at least this far from zero if there were no home advantage. The probability that there was none would also need how plausible that was before the data were seen, and the p-value does not use that.
A large p-value means the data do not contradict the null. They do not contradict a small advantage either: the 95% interval runs from -0.18 to 0.20 goals a match.
Correct. A mean of 0.01 goals with a standard error of 0.097 is what we would expect to see if there were no advantage, and also if there were a small one.
6. A one-sided 5% test has power of 26% against a true mean of 67 when n = 25. Which change raises the power against that alternative?
Correct. More data shrink the standard error, so the two sampling distributions (mean 65 and mean 67) overlap less and the test separates them more often.
A stricter test rejects less often in every case. At the 1% level the power against a mean of 67 falls from 26% to 9%.
A two-sided test spends half of its 5% on the lower tail, where a true mean of 67 puts the sample mean in only 0.15% of samples. The power falls from 26% to 17%.
13. Questions people ask
The null hypothesis is the claim being tested, written as a statement about a population value, such as "the mean is 65 or less". The alternative hypothesis is what we conclude if the data would be too unlikely under the null, such as "the mean is above 65". The test starts by assuming the null is true.
A p-value of 0.05 means that, if the null hypothesis were true, a result at least as extreme as the one observed would turn up in 5% of samples. It is not the probability that the null is true. 0.05 is the conventional threshold: below it, the result is called significant at the 5% level.
A Type I error is rejecting a null hypothesis that is true. A Type II error is failing to reject one that is false. The significance level caps the probability of a Type I error, conventionally at 5%. The probability of a Type II error depends on the true value and the sample size, and equals one minus the power.
A one-tailed test looks for a difference in one stated direction and puts the whole 5% rejection region in that tail (z above 1.645). A two-tailed test looks for a difference in either direction and splits the 5% between the tails (z beyond 1.96 either way). The choice is made from the question, before seeing the data.
Use a t-test when the standard deviation is estimated from the sample and not known in advance. Estimating it adds variation, and for normal data the t distribution matches it with heavier tails: a critical value of 2.306 with 8 degrees of freedom, against 1.96. In large samples the two are almost the same, and regression software reports t-tests throughout.
No. It means the data are compatible with the null, and they are compatible with other values too. With 25 students, a test of "mean 65 or less" fails to reject in 74% of samples when the true mean is 67. Report the confidence interval to show which values the data do rule out.
14. Where next
- The course lessons that go with this page: lesson 7, hypothesis tests step by step, and lesson 8, p-values, Type I and II errors, power, each with five more marked questions.
- Confidence intervals and t-tests: the interval as the set of values a test would not reject, and what "95%" means.
- The normal, t, chi-square and F distributions: where the critical values come from.
- How to read regression output: the t-statistic and p-value in every row of a regression table.
- Hypothesis testing for the mean at A-Level standard, and hypothesis tests in time series for the third-year version.
- My lecture slides on testing a population mean (University of St Andrews, July 2019; PDF, 26 pages): the Student A and Student B example that this page uses, with the worked steps.
- The central limit theorem (lesson 4 of the course), the reason the mean of a large random sample is approximately normal when the data are not, provided their variance is finite.
Send me your test: module, question and deadline
I tutor statistics and econometrics one-to-one, from a first hypothesis test through to regression, panel data and time series. Bring the question you are stuck on and we will work through it in the free 30-minute consultation.
Book a free 30-minute consultation Statistics tuition: how it works
Data and simulations. Grade examples: illustrative numbers (a normal population with standard deviation 10; nine made-up grades). Figure 3: 10,000 samples of 25 grades from a population with mean 65, numpy default_rng(2026) and rng.normal(65, 10, size=(10000, 25)), one row per sample. Premier League: match results from openfootball/england (CC0), seasons 2020/21 and 2023/24, 380 matches each. Wage regression: Wooldridge, Introductory Econometrics: A Modern Approach, data set WAGE1 (526 workers, 1976 Current Population Survey); results quoted, data not republished.
