Part 1

Hypothesis testing

By the end of this part you will be able to take any hypothesis-testing question in this course, fill in the same six boxes, and write a complete answer without deciding anything on the fly.

Every hypothesis test in this syllabus is the same procedure. Only three things change from question to question: which formula goes on top, which table you look in, and how many tails. Everything else — the order of the steps, the words in the conclusion — never changes. So the goal here is not to understand six tests. It is to learn one machine and six settings.

In plain English

A hypothesis test is an argument by contradiction. You assume the boring thing is true ("the coin is fair", "the variance really is 20"), you work out how surprising your data would be if that were true, and if the answer is "very surprising indeed", you stop believing the boring thing. That is all. The formulas just measure "surprising" in a standard unit.

1.1 · The machine — six steps, every single time

Write these six lines down before you look at the numbers. Leave gaps. Then fill them in. Examiners give marks for the steps, not only the final number, and the instruction on your paper is explicit — "answer all the questions with detailed steps in a proper order without any kind of step jump." A correct answer with three steps missing loses more marks than a wrong answer with all six present.

The six-step skeleton — copy this into your answer script
  1. State the hypotheses.

    $H_0$ and $H_1$, in symbols, about a population parameter ($\mu$, $p$, $\sigma^2$) — never about $\bar{x}$, $\hat{p}$ or $s^2$. Note which one has the equals sign: that is always $H_0$.

  2. State the level of significance and the tail.

    Write $\alpha = 0.05$ (or whatever is given) and the words "left-tailed", "right-tailed" or "two-tailed". The tail comes from the direction of $H_1$ — nothing else.

  3. Name the test statistic and write its formula.

    One line, un-substituted. This is the step that earns marks for knowing which test it is.

  4. Find the critical value, or the rejection region.

    State the table, the degrees of freedom, and the value you read off, e.g. "from the $t$-table with $df = 8$, $t_{0.05,8} = 1.860$". Do this before you compute, so you cannot be accused of choosing it to suit your answer.

  5. Compute the test statistic.

    Full substitution, then the number. Four decimal places, as the paper asks.

  6. Decide, then conclude in words.

    Compare, state "reject $H_0$" or "do not reject $H_0$", then one sentence in the language of the original question. Underline it.

Steps 1, 2, 3 and 4 can all be written before you touch the calculator. That is usually half the marks.

1.2 · Step 1 — turning the English into H₀ and H₁

This is where most marks are lost, and it is pure translation. Two rules settle every case:

The two rules

Rule 1 — the equals sign lives in $H_0$. $H_0$ always contains $=$, $\ge$ or $\le$. $H_1$ never contains an equals sign. If you have written $H_1: \mu = 50$ you have made a mistake.

Rule 2 — $H_1$ is what you would need evidence to believe. $H_0$ is the status quo, the claim, the "no change" position. You only abandon it under pressure.

Here is the phrase book. Find the wording of your question in the left column.

The question says…$H_0$$H_1$Tail
"is the mean equal to 50", "can we say the variance is 20"$\mu = 50$$\mu \ne 50$Two-tailed
"has the mean increased", "is it more than", "does it exceed"$\mu \le 50$$\mu > 50$Right
"has the mean fallen", "is it less than", "is it below"$\mu \ge 50$$\mu < 50$Left
"the manufacturer claims at least 90%"$p \ge 0.90$$p < 0.90$Left
"the supplier claims at most 5% defective"$p \le 0.05$$p > 0.05$Right
"test whether the two differ"equalnot equalTwo-tailed
The trap in "test the claim"

When a question says "test the claim of the manufacturer", the claim goes into $H_0$ — because the claim is the thing being defended, and the test asks whether the data forces us to abandon it. Rejecting $H_0$ then means the claim is not supported. Students frequently put the claim into $H_1$ and end up writing the opposite conclusion to the one their own arithmetic supports.

1.3 · Step 3 — choosing the test statistic

Read the question for three words only: what is being tested (a mean, a proportion, a variance), and if it is a mean, is $\sigma$ known. That is the entire decision.

  • What parameter does the question ask about?
    • A mean $\mu$ — "average", "mean lifetime", "mean weight"
      • Is the population $\sigma$ given?
        • Yes $\rightarrow$ $Z$ test, $\;z = \dfrac{\bar{x}-\mu_0}{\sigma/\sqrt{n}}$, use the $Z$-table
        • No, only the sample $s$ (or raw data) $\rightarrow$ $t$ test, $\;t = \dfrac{\bar{x}-\mu_0}{s/\sqrt{n}}$, $df = n-1$
    • A proportion $p$ — "percentage", "% conforming", "fraction defective", a count out of $n$
      • $\rightarrow$ $Z$ test for a proportion, $\;z = \dfrac{\hat{p}-p_0}{\sqrt{p_0(1-p_0)/n}}$
    • A variance $\sigma^2$ or a standard deviation $\sigma$ — "variance", "variability", "consistency", "spread"
      • $\rightarrow$ $\chi^2$ test, $\;\chi^2 = \dfrac{(n-1)s^2}{\sigma_0^2}$, $df = n-1$
Exam technique

The giveaway for a proportion test is a count: "164 out of 200", "36 of 400 were defective". The giveaway for a variance test is the word variance or a target spread, e.g. "is the population variance equal to 20 square kgs". The giveaway for a $t$ test is being handed raw data with no $\sigma$ — because then you must compute $s$ yourself, and the moment you compute $s$ you are in $t$ territory.

The three formulas, side by side
$$ z=\frac{\bar{x}-\mu_0}{\sigma/\sqrt{n}} \qquad t=\frac{\bar{x}-\mu_0}{s/\sqrt{n}} \qquad z=\frac{\hat{p}-p_0}{\sqrt{\dfrac{p_0(1-p_0)}{n}}} \qquad \chi^2=\frac{(n-1)s^2}{\sigma_0^2} $$
Notice the shape is identical in the first three: (what I saw) − (what H0 claims), divided by the standard error. The $\chi^2$ is the odd one out because variances are ratios, not differences — you divide instead of subtracting.
The commonest slip in the proportion test

The denominator uses $p_0$ — the value from $H_0$ — not $\hat{p}$ from the sample. You are asking "how would $\hat{p}$ behave if $H_0$ were true", so everything about the null world comes from $H_0$. (A confidence interval for $p$ is different: there, with no null to assume, you use $\hat{p}$. Same symbol, different job.)

1.4 · Step 4 — finding the critical value

Three questions, in this order: which table, how many tails, how many degrees of freedom.

TestTabledfTwo-tailed at 5%One-tailed at 5%One-tailed at 1%
$Z$ (mean or proportion)$Z$—$\pm 1.96$$1.645$$2.326$
$t$ (mean, $\sigma$ unknown)$t$$n-1$$\pm t_{0.025,\,df}$$t_{0.05,\,df}$$t_{0.01,\,df}$
$\chi^2$ (variance)$\chi^2$$n-1$$\chi^2_{0.975}$ and $\chi^2_{0.025}$right tail: $\chi^2_{0.05}$ · left tail: $\chi^2_{0.95}$
Splitting $\alpha$ — why 5% becomes 2.5%

A two-tailed test is suspicious of departures in both directions, so the 5% of "surprising" outcomes has to be shared out, 2.5% at each end. That is why the two-tailed 5% critical value is $z_{0.025}=1.96$ and not $z_{0.05}=1.645$. One-tailed tests put the whole 5% at one end. Students who forget to halve $\alpha$ reject far too often.

Reading the $\chi^2$ table — the one that catches everybody

The $\chi^2$ table is labelled by upper-tail area. The column headed $\chi^2_{0.050}$ holds the value with 5% of the area to its right. So for a two-tailed test at 5% you need both $\chi^2_{0.975}$ (the small one, on the left) and $\chi^2_{0.025}$ (the big one, on the right). The $\chi^2$ curve is not symmetric, so — unlike $Z$ and $t$ — you cannot get the left value by putting a minus sign on the right one. You must look up two separate numbers.

1.5 · Deciding — two routes that always agree

There are two ways to finish, and they always agree. Use whichever the question names; if it names neither, the critical-value route is faster.

Critical-value routep-value route
What you comparetest statistic vs critical valuep-value vs $\alpha$
Reject $H_0$ whenthe statistic falls in the rejection region$p \le \alpha$
The sentence"$|z| = 2.04 > 1.96$, so reject $H_0$""$p = 0.0414 < 0.05$, so reject $H_0$"
Best whenthe table gives an exact critical valuethe question says "use the p-value method"
In plain English — what a p-value is

The p-value is the answer to: "if $H_0$ were true, what fraction of samples would look at least this extreme?" A p-value of 0.0414 says only about 4 samples in 100 would be this far out by luck alone. A p-value of 0.40 says 40 in 100 would — so nothing about your sample is surprising, and you have no case against $H_0$. Small p, reject. Say it to yourself as "small p means surprising means the null takes the blame".

1.6 · The p-value method, in detail

Because one full question on the May 2026 paper demanded it by name, this deserves its own recipe. The only new skill is converting a test statistic into a tail area — and then doubling it, or not.

Computing a p-value
  1. Compute the test statistic as usual.

    Nothing changes about steps 1–5.

  2. Look up the area in the tail your $H_1$ points at.

    Left-tailed $H_1$ ($<$) $\rightarrow$ area to the left of your $z$: read $\Phi(z)$ straight off the table.
    Right-tailed $H_1$ ($>$) $\rightarrow$ area to the right: $1 - \Phi(z)$.

  3. If the test is two-tailed, double it.

    $p = 2 \times P(Z > |z|)$. Two-tailed means "extreme in either direction", so both tails count.

  4. Compare with $\alpha$ and state the comparison explicitly.

    Write the inequality out — "$0.0001 < 0.01$" — then the decision. The comparison itself carries marks.

With $t$ and $\chi^2$ you cannot get an exact p-value — bracket it instead

The $Z$-table gives areas, so a $Z$ p-value is exact. The $t$ and $\chi^2$ tables give only a handful of critical values, so you can only trap the p-value between two columns. That is a perfectly good exam answer, and is what is expected. For example, with $t = 2.8823$ on $df = 8$: the table row reads $t_{0.025,8} = 2.306$ and $t_{0.01,8} = 2.896$. Your value sits between them, so $0.01 < p < 0.025$. Since $p < 0.05$, reject at 5%. Write it exactly like that.

1.7 · The conclusion sentence — a template you can memorise

The final mark is for saying what happened in the language of the question, not in the language of statistics. Two templates cover everything.

When you reject:
Since test statistic falls in the rejection region (or p < α), we reject $H_0$ at the α×100% level. There is sufficient evidence to conclude that $H_1$ in the question's own words.
When you do not reject:
Since test statistic does not fall in the rejection region (or p > α), we do not reject $H_0$ at the α×100% level. There is insufficient evidence to conclude that $H_1$ in the question's own words.
Never write "we accept $H_0$"

Failing to convict is not the same as proving innocence. A small sample can fail to detect a real effect, so "do not reject" means only "this data was not enough". Write "do not reject $H_0$" or "there is insufficient evidence". Examiners deduct for "accept".

1.8 · The real thing — exam Q5, broken apart

May 2026 end-term · Question 5 · 7 marks · testing a proportion by the p-value method

Now watch the machine run on the actual paper. Every step below is labelled with the step of the recipe it comes from, so you can see there is nothing new happening — only the six boxes being filled.

Exam Question 5 7 marks

A manufacturer claimed that at least 90% of the components which he supplied are conforming to the specifications. However, a random sample of 200 components showed only 164 were conforming to the specifications. Test the claim of the manufacturer at 1% level of significance by using p-value method.

Reading the question before any maths

Three things to extract, and one instruction to obey:

  • What is being tested? "90% of the components" and a count "164 of 200" — this is a proportion. So the $Z$ test for a proportion.
  • What is the claim? "at least 90%", i.e. $p \ge 0.90$. And it is the manufacturer's claim, so it goes in $H_0$.
  • What is $\alpha$? 1%, so $\alpha = 0.01$.
  • What method? The question says p-value method. You must show a p-value; a critical-value answer alone will not score full marks.
Given $n = 200$ · $x = 164$ · $p_0 = 0.90$ · $\alpha = 0.01$
Step 1 state the hypotheses

The claim carries the equals sign, so it is $H_0$. The alternative is what would disprove the claim: that the true conforming rate is below 90%.

$$ H_0: p \ge 0.90 \qquad\text{against}\qquad H_1: p < 0.90 $$

(Writing $H_0: p = 0.90$ is also accepted — the test is computed at the boundary either way.)

Step 2 significance level and tail

$\alpha = 0.01$. Because $H_1$ points left ($<$), this is a left-tailed test. That single fact decides the whole of the final step, so write it down now.

Step 3 name the statistic

Sample proportion first, because everything else needs it:

$$ \hat{p}=\frac{x}{n}=\frac{164}{200}=0.82 $$

Then the test statistic, un-substituted:

$$ z=\frac{\hat{p}-p_0}{\sqrt{\dfrac{p_0(1-p_0)}{n}}} $$

Check the sample is large enough for the normal approximation: $np_0 = 200(0.90) = 180 \ge 5$ and $n(1-p_0) = 200(0.10) = 20 \ge 5$. Both comfortably pass, so $Z$ is valid. One line, and it is a mark.

Step 4 the p-value method replaces the critical value

With the p-value method you do not need a critical value — but it costs nothing to note that a left-tailed test at 1% would reject below $-z_{0.01} = -2.326$, and it lets you sanity-check the final decision.

Step 5 compute

Denominator first, slowly — this is where arithmetic slips happen:

$$ \sqrt{\frac{0.90 \times 0.10}{200}}=\sqrt{\frac{0.09}{200}}=\sqrt{0.00045}=0.0212 $$

Then the statistic:

$$ z=\frac{0.82-0.90}{0.0212132}=\frac{-0.08}{0.0212132}=-3.7712 $$
Step 6a the p-value

$H_1$ points left, so the p-value is the area to the left of $-3.7712$ — no doubling, because this is a one-tailed test.

$$ p\text{-value}=P(Z < -3.7712) \approx 0.0001 $$

Printed $Z$-tables usually stop around $z = -3.49$, where the area is $0.0002$. Since $-3.7712$ lies even further into the tail, the area is smaller still. Write "$p\text{-value} < 0.0002$, approximately $0.0001$" — that is honest and fully creditable.

Step 6b decide and conclude

Compare, explicitly:

$$ p\text{-value} = 0.0001 \;<\; \alpha = 0.01 $$
Reject $H_0$. At the 1% level there is sufficient evidence that fewer than 90% of components conform, so the manufacturer's claim is not supported.

Sanity check against the other route: $z = -3.7712 < -2.326$, which is deep inside the rejection region. Same decision, as it must be.

Why this one is worth 7 marks

Because it hides three separate judgements: recognising a proportion from a count, putting the manufacturer's claim in $H_0$ rather than $H_1$, and using $p_0$ — not $\hat p$ — inside the square root. Get those three right and the arithmetic is one line.

1.9 · The real thing — exam Q6, broken apart

May 2026 end-term · Question 6 · 6 marks · testing a variance with $\chi^2$

Exam Question 6 6 marks

Weights (in kgs) of 10 students are given below: 38, 40, 45, 53, 47, 43, 55, 48, 52, 49. Can we say that the population variance of the distribution of weights of all students from which the above sample of 10 students was drawn is equal to 20 square kgs? Test an appropriate hypothesis at 5% level.

Reading the question
  • "population variance … equal to 20" — a variance test, so $\chi^2$.
  • "equal to" — no direction is suggested, so this is two-tailed.
  • Raw data is given and no $\sigma$, so you must compute $s^2$ yourself.
  • "Test an appropriate hypothesis" is the examiner telling you to choose the test — which is part of what is being marked.
Given $n = 10$ · $\sigma_0^2 = 20$ · $\alpha = 0.05$ · raw data
Step 1 & 2 hypotheses, level, tail
$$ H_0: \sigma^2 = 20 \qquad\text{against}\qquad H_1: \sigma^2 \ne 20 $$

$\alpha = 0.05$, two-tailed, $df = n - 1 = 9$.

Step 3 the statistic
$$ \chi^2=\frac{(n-1)s^2}{\sigma_0^2}\;\sim\;\chi^2_{n-1} \quad\text{where}\quad s^2=\frac{\sum (x-\bar{x})^2}{n-1} $$
Step 4 two critical values, because two tails

From the $\chi^2$ table with $df = 9$, splitting $\alpha$ into 2.5% at each end:

$$ \chi^2_{0.975,\,9}=2.700 \qquad\text{and}\qquad \chi^2_{0.025,\,9}=19.023 $$

So the rule is: reject $H_0$ if $\chi^2 < 2.700$ or $\chi^2 > 19.023$; otherwise do not reject. Remember the table is labelled by right-tail area, which is why the lower critical value sits in the column headed $\chi^2_{0.975}$.

Step 5a build the deviation table

First the mean. $\sum x = 38+40+45+53+47+43+55+48+52+49 = 470$, so

$$ \bar{x}=\frac{470}{10}=47 $$

A whole-number mean is a gift — the deviations stay clean. Tabulate them:

$x$38404553474355485249Σ
$x-\bar{x}$−9−7−260−481520
$(x-\bar{x})^2$8149436016641254280

The deviations summing to $0$ is your free arithmetic check — if that row does not total zero, your mean is wrong and everything after it will be too.

Step 5b sample variance, then the statistic
$$ s^2=\frac{280}{10-1}=\frac{280}{9}=31.1111 $$

Now substitute. Notice the $n-1$ cancels against the $n-1$ inside $s^2$, so in practice $\chi^2 = \sum(x-\bar{x})^2 / \sigma_0^2$ — a useful shortcut and a good check:

$$ \chi^2=\frac{(10-1)(31.1111)}{20}=\frac{280}{20}=14.0000 $$
Step 6 decide and conclude
$$ 2.700 \;<\; 14.0000 \;<\; 19.023 $$

The statistic lands between the two critical values, i.e. outside both rejection regions.

Do not reject $H_0$. At the 5% level there is insufficient evidence that the population variance differs from 20 square kgs, so we may take it to be 20.
If you are asked to bracket the p-value too

Look along the $df = 9$ row for $14.0000$: it lies between $\chi^2_{0.100,9}=14.684$ and $\chi^2_{0.250}$ (off this table). Since $14.0000 < 14.684$, the right-tail area exceeds $0.10$, so for a two-tailed test $p > 0.20$ — comfortably above $0.05$, confirming the same decision.

1.10 · The mistakes that actually cost marks

  • Hypotheses about the sample. $H_0: \bar{x} = 47$ is meaningless — you know $\bar{x}$. Hypotheses are always about the population: $\mu$, $p$, $\sigma^2$.
  • Forgetting to halve $\alpha$. Two-tailed at 5% is $1.96$, not $1.645$. This single slip flips a decision surprisingly often.
  • Using $\hat{p}$ in the standard error. In a test it is $p_0$ under the square root, every time.
  • Dividing by $n$ instead of $n-1$ when computing $s^2$ from raw data. The test needs the sample variance with $n-1$.
  • Taking the left $\chi^2$ value as minus the right one. $\chi^2$ is not symmetric and is never negative. Two tails means two separate lookups.
  • Writing "accept $H_0$". Say "do not reject".
  • Stopping at the number. No sentence in the question's own words means a lost mark, no matter how perfect the arithmetic.
  • Rounding too early. Carry the full calculator value into the next step and round only the final answer, to four decimals as the paper instructs.

Part 1 recap

  • One machine, six steps, written before the numbers: hypotheses · level and tail · statistic · critical value · compute · conclude.
  • $H_0$ owns the equals sign and owns the claim. $H_1$ sets the tail.
  • Mean with $\sigma$ $\rightarrow$ $Z$ · mean without $\sigma$ $\rightarrow$ $t$, $df=n-1$ · proportion $\rightarrow$ $Z$ with $p_0$ inside the root · variance $\rightarrow$ $\chi^2$, $df=n-1$, two lookups if two-tailed.
  • p-value route: area in the tail $H_1$ points at, doubled if two-tailed; reject when $p \le \alpha$. With $t$ and $\chi^2$, bracket it between two columns.
  • Finish with a sentence in the question's own words, and underline it.
Part 2

Correlation and regression

By the end of this part you will be able to recognise which of the four question types you have been handed, and run the fixed procedure for it — including the one where you are given no data at all, only two equations.

Correlation asks how tightly two quantities move together, and answers with a single number between $-1$ and $+1$. Regression asks what line best describes that movement, and answers with an equation you can predict from. They come from the same arithmetic — which is why, in an exam, one table of column sums usually answers every part of the question.

2.1 · First, identify which of four questions you have

Correlation and regression questions come in exactly four flavours in this course. Spend ten seconds deciding which one you are looking at, because they need completely different procedures — and two of them need no data at all.

You are given…It is asking for…Procedure
Two columns of measurements (sales, cost, height)$r$, and/or a regression line, and/or a predictionBuild the Σ table (§2.2)
Two columns of ranks, or measurements the question calls "rank"rank correlationSpearman (§2.4)
Only summary totals: $n$, $\sum x$, $\sum y$, $\sum xy$, $\sum x^2$, $\sum y^2$$r$, lines, $R^2$Same formulas — the table is already done for you (§2.2)
Only two regression equations and maybe one variancethe means, $r$, a standard deviationWork backwards (§2.5)
Exam technique

The fourth type — two equations, no data — looks alarming and is the easiest question on the paper. It is simultaneous equations plus one square root. It appeared as Q8 in May 2026 and is worth 6 marks for about four minutes of work. Learn it first if you are short of time.

2.2 · The Σ table — one table, every answer

When you are given raw pairs, do not go hunting for a formula yet. Build five columns. Everything the question can possibly ask for is then a substitution away.

Building the Σ table
  1. Draw five columns: $x$, $y$, $xy$, $x^2$, $y^2$.

    Add a $\sum$ row at the bottom. If the question only asks for $r$ or for the line of $y$ on $x$, you can skip the $y^2$ column — but it costs one minute and protects you if a later part needs it.

  2. Fill the table row by row, not column by column.

    Going across a row keeps the pairing right. Going down a column is how pairs get mismatched.

  3. Total each column and write $n$ next to the totals.

    Check: $\sum x$ divided by $n$ should look like a plausible average of the $x$ column. Ten seconds, catches most addition slips.

  4. Compute the three building blocks once.

    $$ S_{xy}=n\sum xy-\sum x\sum y,\qquad S_{xx}=n\sum x^{2}-\Big(\sum x\Big)^{2},\qquad S_{yy}=n\sum y^{2}-\Big(\sum y\Big)^{2} $$

  5. Read every answer off those three numbers.

    $$ r=\frac{S_{xy}}{\sqrt{S_{xx}S_{yy}}},\qquad b_{yx}=\frac{S_{xy}}{S_{xx}},\qquad b_{xy}=\frac{S_{xy}}{S_{yy}} $$

$S_{xy}$ appears in all three. Compute it once, carefully, and the rest is division.
In plain English — what $r$ is measuring

$S_{xy}$ is large and positive when the pairs that are above average in $x$ are also above average in $y$. The square root underneath is just a scaling factor that strips out the units, so that the answer comes out between $-1$ and $+1$ whether you measured in rupees or lakhs. That is the whole idea: $S_{xy}$ measures the agreement, the denominator makes it comparable.

The two regression lines
$$ \text{Y on X:}\quad y-\bar{y}=b_{yx}(x-\bar{x}),\qquad b_{yx}=\frac{S_{xy}}{S_{xx}}=r\frac{S_y}{S_x} $$ $$ \text{X on Y:}\quad x-\bar{x}=b_{xy}(y-\bar{y}),\qquad b_{xy}=\frac{S_{xy}}{S_{yy}}=r\frac{S_x}{S_y} $$
Y on X is the line you use to predict $y$ from a given $x$ · X on Y predicts $x$ from a given $y$ · both lines pass through $(\bar{x},\bar{y})$, which is why they intersect there.
Which line, though?

Read the question for the word estimate or predict and see which variable is unknown. "Estimate sales when advertising is 60" means $y$ (sales) is unknown, so use Y on X. Using the wrong line gives a plausible-looking wrong number and loses every mark for that part. The two lines are genuinely different, and only coincide when $r = \pm 1$.

The three faces of the same $r$

You may meet $r$ written three ways, and they are all one formula in disguise:

$$ r=\frac{\operatorname{Cov}(x,y)}{S_x S_y}=\frac{\sum(x-\bar{x})(y-\bar{y})}{\sqrt{\sum(x-\bar{x})^2\sum(y-\bar{y})^2}}=\frac{n\sum xy-\sum x\sum y}{\sqrt{\big[n\sum x^2-(\sum x)^2\big]\big[n\sum y^2-(\sum y)^2\big]}} $$

Use the last one in exams: it needs no means and no subtraction inside the table, so there is nothing to round and nothing to carry. Use the middle one only if the question hands you the deviations already.

2.3 · Spearman's rank correlation

When the data is already ranks — or when the question says "rank correlation" — you do not build a Σ table at all. You rank both columns, subtract, square, and add.

Spearman's rank correlation coefficient
$$ \rho = 1-\frac{6\sum d^{2}}{n(n^{2}-1)} $$
d the difference between the two ranks of the same individual · n the number of pairs · the 6 is not a mystery, it is what makes $\rho$ come out on the $-1$ to $+1$ scale.
The Spearman procedure
  1. Rank the first column.

    Pick a direction — largest gets rank 1, or smallest gets rank 1 — and say which you chose. Either works, provided you use the same direction for both columns. Mixing directions flips the sign of your answer.

  2. Rank the second column the same way.

    Check both rank columns sum to $\tfrac{n(n+1)}{2}$. For $n=10$ that is 55. If they do not, you have skipped or duplicated a rank.

  3. Compute $d = R_x - R_y$ for each row, then $d^2$.

    Check $\sum d = 0$. It must be, since both rank columns have the same total. This is a free, reliable error-catcher — use it every time.

  4. Add the $d^2$ column and substitute.

    $\rho = 1 - \dfrac{6\sum d^2}{n(n^2-1)}$. For $n = 10$ the denominator is $10 \times 99 = 990$; for $n=8$ it is $8 \times 63 = 504$.

  5. Interpret in one sentence.

    "A strong positive rank correlation, so the two rankings largely agree."

When ranks are tied

If two or more values in a column are equal they must share a rank — you give each of them the average of the positions they occupy — and then the formula needs a small repair.

Spearman with tied ranks
$$ \rho = 1-\frac{6\left[\sum d^{2}+\sum \dfrac{m(m^{2}-1)}{12}\right]}{n(n^{2}-1)} $$
m the number of items sharing one tied rank · the correction is added once per tie group, in both columns · a group of 2 contributes $0.5$, a group of 3 contributes $2$, a group of 4 contributes $5$.
In plain English — why ties need a correction

The plain formula quietly assumes every rank from 1 to $n$ is used exactly once. Ties break that: two items sharing rank 5.5 means nobody has rank 5 or 6, so the spread of the rank column shrinks a little. The correction term adds back exactly the amount of spread the ties removed. Forget it and your $\rho$ comes out slightly too large.

Getting tied ranks right

Rank as if there were no ties, then average the positions. Three values tied for positions 2, 3 and 4 all get $(2+3+4)/3 = 3$, and the next value down gets rank 5 — not rank 4. The next rank always resumes at the position after the last one consumed.

2.4 · Working backwards from two regression lines

This is the "partially destroyed laboratory record" question, and it is entirely mechanical once you know the three facts it rests on.

The three facts this question type is built on

Fact 1. Both lines pass through $(\bar{x}, \bar{y})$. So solving the two equations simultaneously gives you the means — no data required.

Fact 2. $b_{yx} \times b_{xy} = r^2$. So $r = \pm\sqrt{b_{yx}b_{xy}}$, with the sign taken from the (shared) sign of the two coefficients.

Fact 3. $b_{yx} = r\dfrac{\sigma_y}{\sigma_x}$. So if you know $r$, one coefficient and one standard deviation, the other standard deviation falls out.

The hidden difficulty — which equation is which line?

The question hands you two equations and does not tell you which is $Y$ on $X$ and which is $X$ on $Y$. You have to work it out, and there is a clean test:

Since $r^2 = b_{yx}b_{xy}$ and $r^2$ can never exceed 1, the product of the two regression coefficients can never exceed 1. So: assume one assignment, compute the product. If it is $\le 1$, your assumption was right. If it is $> 1$, swap them and the product becomes its reciprocal, which is then $< 1$. Show this check in your answer — it is worth marks on its own.

Two lines, no data — the procedure
  1. Solve the two equations simultaneously.

    The solution is $(\bar{x}, \bar{y})$. Say so explicitly: "since both regression lines pass through the point of means, the intersection gives $\bar{x}$ and $\bar{y}$."

  2. Assume an assignment and extract both coefficients.

    Rearrange the line you called $Y$ on $X$ into $y = \ldots x + \ldots$ and read $b_{yx}$ off. Rearrange the other into $x = \ldots y + \ldots$ and read $b_{xy}$ off. Make $y$ the subject for one and $x$ the subject for the other — that is the step people rush and get wrong.

  3. Test the assumption.

    If $b_{yx}b_{xy} \le 1$, keep it. If not, swap the two lines and redo step 2.

  4. Take the square root for $r$.

    $r = \pm\sqrt{b_{yx}b_{xy}}$. Both coefficients positive $\rightarrow$ take $+$. Both negative $\rightarrow$ take $-$. They always share a sign, because they both carry the sign of $\operatorname{Cov}(x,y)$.

  5. Use $b = r\sigma_y/\sigma_x$ for whichever standard deviation is missing.

    And check with the other coefficient: $b_{xy}$ should equal $r\sigma_x/\sigma_y$. If it does, all four numbers are consistent.

2.5 · The real thing — exam Q7, broken apart

May 2026 end-term · Question 7 · 7 marks · Spearman's rank correlation

Exam Question 7 7 marks

Find the rank correlation coefficient between the Advertisement Cost and Sales from the data given below.

Advertisement Cost ('000 Rs.)39656290827525983678
Sales (Lakhs Rs.)47535886626860915184
Reading the question
  • "rank correlation coefficient" — Spearman, not Pearson. Do not build a Σ table.
  • The data are measurements, not ranks, so you must rank them yourself. That is the first two marks.
  • Scan for repeats before you start: 39, 65, 62, 90, 82, 75, 25, 98, 36, 78 — all different; 47, 53, 58, 86, 62, 68, 60, 91, 51, 84 — all different. No ties, so the plain formula applies and no correction term is needed. Say this out loud in your answer.
Given $n = 10$ pairs · no ties
Step 1 rank the advertisement cost

Choose a direction and state it: rank 1 to the largest value. Sorting the cost column descending gives $98, 90, 82, 78, 75, 65, 62, 39, 36, 25$, so $98$ takes rank 1, $90$ takes rank 2, and so on down to $25$ at rank 10.

Step 2 rank sales the same way

Sorted descending, sales are $91, 86, 84, 68, 62, 60, 58, 53, 51, 47$ — so $91$ takes rank 1 and $47$ takes rank 10. Same direction as before, which is what keeps the sign honest.

Step 3 the working table — write it out exactly like this
Cost $x$Sales $y$$R_x$$R_y$$d=R_x-R_y$$d^2$
3947810−24
655368−24
62587700
90862200
826235−24
75685411
2560106416
98911100
36519900
78844311
Σ5555030

Both checks pass: each rank column totals $\tfrac{10 \times 11}{2} = 55$, and $\sum d = 0$. Only now is it safe to substitute.

Step 4 substitute
$$ \rho = 1-\frac{6\sum d^{2}}{n(n^{2}-1)} = 1-\frac{6(30)}{10(10^{2}-1)} = 1-\frac{180}{10 \times 99} = 1-\frac{180}{990} $$ $$ \rho = 1 - 0.1818 = 0.8182 $$
Step 5 interpret — do not skip this
$\rho = 0.8182$. There is a strong positive rank correlation between advertisement cost and sales: firms that spend more on advertising tend to rank higher on sales.

One caution worth a sentence if the question invites comment: this is association, not proof of cause. High sales could equally be funding the advertising budget.

Where the 7 marks sit

Roughly: 2 for correct ranking of both columns, 2 for a correct $d$ and $d^2$ table, 1 for stating the formula, 1 for the arithmetic, 1 for the interpretation. Notice that five of the seven marks are earned before you touch the formula. Write the table out in full even if you can see the answer.

2.6 · The real thing — exam Q8, broken apart

May 2026 end-term · Question 8 · 2+2+2 marks · regression lines, backwards

Exam Question 8 6 marks

In a partially destroyed laboratory record of an analysis of bivariate data, the following results only are legible: $\operatorname{Var}(X) = 9$, and the two regression lines are

$$ 8X-10Y+66=0 \qquad\text{and}\qquad 40X-18Y=214 $$

Find: (a) the mean values of $X$ and $Y$; (b) the coefficient of correlation between $X$ and $Y$; (c) the standard deviation of $Y$.

Reading the question
  • Two regression equations, one variance, no data. This is type four — work backwards.
  • $\operatorname{Var}(X) = 9 \Rightarrow \sigma_x = 3$. Take that square root now; part (c) needs it.
  • The three parts are deliberately in order: (a) needs nothing but algebra, (b) needs (a)'s working, (c) needs (b)'s answer. So a mistake in (b) costs you (c) as well — check (b) before moving on.
Given $\operatorname{Var}(X) = 9$, so $\sigma_x = 3$ · two regression lines
Part (a) the mean values — 2+2 marks

The principle, stated first: both regression lines pass through the point of means $(\bar{x},\bar{y})$, so that point satisfies both equations at once. Finding it is simply solving the pair.

Write them in standard form:

$$ 8x-10y=-66 \qquad \cdots (1) $$ $$ 40x-18y=214 \qquad \cdots (2) $$

Multiply (1) by 5 so the $x$ terms match:

$$ 40x-50y=-330 \qquad \cdots (3) $$

Subtract (3) from (2):

$$ (40x-18y)-(40x-50y)=214-(-330) \;\Rightarrow\; 32y=544 \;\Rightarrow\; y=17 $$

Substitute back into (1):

$$ 8x=-66+10(17)=-66+170=104 \;\Rightarrow\; x=13 $$
$\bar{x}=13$ and $\bar{y}=17$

Check both equations: $8(13)-10(17)+66 = 104-170+66 = 0$ ✓ and $40(13)-18(17) = 520-306 = 214$ ✓.

Part (b) the coefficient of correlation — 2 marks

Assume the first line is $Y$ on $X$ and the second is $X$ on $Y$. Rearrange each so the correct variable is the subject.

First line, make $y$ the subject:

$$ 8x-10y+66=0 \;\Rightarrow\; 10y=8x+66 \;\Rightarrow\; y=0.8x+6.6 \;\Rightarrow\; b_{yx}=0.8 $$

Second line, make $x$ the subject:

$$ 40x-18y=214 \;\Rightarrow\; 40x=18y+214 \;\Rightarrow\; x=0.45y+5.35 \;\Rightarrow\; b_{xy}=0.45 $$

Now test the assumption:

$$ b_{yx}\times b_{xy}=0.8\times0.45=0.36 \;\le\; 1 \quad\checkmark $$

The product does not exceed 1, so the assumption was correct. (Had we assigned them the other way round we would have got $b_{xy}=1.25$ and $b_{yx}=2.2222$, whose product is $2.7778 > 1$ — impossible, since that product is $r^2$.)

Both coefficients are positive, so take the positive root:

$$ r=+\sqrt{b_{yx}\,b_{xy}}=\sqrt{0.36}=0.6 $$
$r = 0.6000$ — a moderate positive correlation
Part (c) the standard deviation of Y — 2 marks

Use the definition of the regression coefficient that contains $\sigma_y$:

$$ b_{yx}=r\frac{\sigma_y}{\sigma_x} \;\Rightarrow\; 0.8=0.6\times\frac{\sigma_y}{3} $$ $$ \sigma_y=\frac{0.8\times 3}{0.6}=4 $$
$\sigma_y = 4$, so $\operatorname{Var}(Y) = 16$

Confirm with the other coefficient, which must agree: $b_{xy}=r\dfrac{\sigma_x}{\sigma_y}=0.6\times\dfrac{3}{4}=0.45$ ✓ — exactly the value read off the second line. All four quantities are consistent.

Six marks, four minutes

If you can do simultaneous equations you can do this question. The only genuinely statistical steps are "both lines pass through the means" and "the product of the coefficients is $r^2$, so it cannot exceed 1". Memorise those two sentences and this question is free marks every time it appears.

2.7 · The mistakes that actually cost marks

  • Ranking the two columns in opposite directions. If largest gets rank 1 in one column and smallest gets rank 1 in the other, $\rho$ comes out with the wrong sign. State your direction and use it twice.
  • Skipping a rank after a tie. Three values tied at positions 2, 3, 4 all get rank 3, and the next value gets rank 5, not 4.
  • Forgetting the tie correction. Whenever any value repeats in either column, the $\sum \frac{m(m^2-1)}{12}$ term must appear.
  • Using the wrong regression line to predict. Predicting $y$? Use $Y$ on $X$. Predicting $x$? Use $X$ on $Y$.
  • Failing to test which line is which in the "two lines given" question. Without the $b_{yx}b_{xy} \le 1$ check you have a 50% chance of a wrong $r$ and a wrong $\sigma$.
  • Reporting $r > 1$. An impossible value means an arithmetic error — nearly always a mis-squared total in $S_{xx}$ or $S_{yy}$. Go back rather than writing it down.
  • Losing the sign of $r$. It is the sign of $S_{xy}$ (or of the regression coefficients), not something you choose. A negative $S_{xy}$ gives a negative $r$ and two negative coefficients.
  • Claiming causation. "Advertising causes sales" is not something $\rho = 0.8182$ can support. Say "associated with".

Part 2 recap

  • Identify the type first: raw pairs · ranks · summary totals · two equations. Each has its own fixed route.
  • For raw pairs, build $x, y, xy, x^2, y^2$ once, compute $S_{xy}, S_{xx}, S_{yy}$ once, then read off $r$, $b_{yx}$ and $b_{xy}$ by division.
  • Spearman: same ranking direction in both columns · check both rank columns total $\frac{n(n+1)}{2}$ and $\sum d = 0$ · add the tie correction whenever a value repeats.
  • Two lines given: solve simultaneously for the means · check $b_{yx}b_{xy} \le 1$ to see which line is which · $r = \pm\sqrt{b_{yx}b_{xy}}$ · $b_{yx}=r\sigma_y/\sigma_x$ for the missing standard deviation.
  • Always finish with a sentence about what the number means, and never claim cause.
Part 3

Thirteen solved examples

Every question type from Parts 1 and 2, worked end to end. Try each one on paper first, then reveal — the value is in the attempt, not the reading.

These are ordered to build on each other: examples 1–6 drill the hypothesis-testing machine, 7–12 drill correlation and regression, and 13 joins the two. Each solution shows the full six-step layout an examiner expects, and finishes with a short note on why that step was necessary — so you are learning the reasoning, not memorising an answer.

3.1 · Hypothesis testing — examples 1 to 6

Example 1 — $Z$ test for a mean, two-tailed, by both routes

A manufacturer states that the mean lifetime of its bulbs is 1600 hours. From long records the population standard deviation is known to be 120 hours. A random sample of 64 bulbs gives a mean lifetime of 1570 hours. Test the manufacturer's statement at the 5% level of significance, using both the critical-value method and the p-value method.

Given $\mu_0 = 1600$ · $\sigma = 120$ · $n = 64$ · $\bar{x} = 1570$ · $\alpha = 0.05$

Hint: $\sigma$ is given, not estimated — which of the four test statistics does that settle? And does the wording suggest a direction, or not?

  1. Hypotheses. The claim is an equality with no direction suggested, so it is two-tailed. $$ H_0: \mu = 1600 \qquad H_1: \mu \ne 1600 $$
  2. Level and tail. $\alpha = 0.05$, two-tailed, so $2.5\%$ sits in each tail.
  3. Test statistic. $\sigma$ is known, so this is a $Z$ test: $$ z=\frac{\bar{x}-\mu_0}{\sigma/\sqrt{n}} $$
  4. Critical values. From the $Z$-table, $z_{0.025} = 1.96$. Reject $H_0$ if $|z| > 1.96$.
  5. Compute. Standard error first: $$ \frac{\sigma}{\sqrt{n}}=\frac{120}{\sqrt{64}}=\frac{120}{8}=15 $$ $$ z=\frac{1570-1600}{15}=\frac{-30}{15}=-2.0000 $$
  6. Decide — critical-value route. $|-2.0000| = 2.0000 > 1.96$, so the statistic falls in the rejection region. Reject $H_0$.
  7. Decide — p-value route. Two-tailed, so double the tail area: $$ p = 2\times P(Z < -2.00) = 2 \times 0.0228 = 0.0456 $$ $$ 0.0456 < 0.05 \;\Rightarrow\; \text{reject } H_0 $$
Reject $H_0$ at the 5% level. There is sufficient evidence that the mean lifetime of the bulbs is not 1600 hours; the sample suggests it is lower.
Why the two routes must agree

They are the same comparison seen from two sides. "Is $|z|$ beyond 1.96?" and "is the tail area beyond $|z|$ smaller than 5%?" are logically identical, because 1.96 is defined as the point with 5% of the area beyond it in two tails. If your two routes ever disagree, you have made an arithmetic slip — most often forgetting to double the p-value.

Note the near miss

$p = 0.0456$ is only just under $0.05$. At the 1% level this same data would not lead to rejection, since $0.0456 > 0.01$. The level of significance is not a detail — it is part of the conclusion, which is why you write "at the 5% level" every time.

Example 2 — $t$ test for a mean from raw data, with the p-value bracketed

A training programme claims to raise scores above the historical average of 50. Nine trainees are sampled after the programme and score: 48, 50, 52, 53, 54, 55, 56, 51, 58. Test at the 5% level whether the programme has raised the mean score, and bracket the p-value.

Given $n = 9$ raw observations · $\mu_0 = 50$ · $\alpha = 0.05$ · $\sigma$ unknown

Hint: "raised" points in one direction. And you are given data rather than $\sigma$ — so which table, and how many degrees of freedom?

  1. Hypotheses. "Has raised" points upward, so a right-tailed test: $$ H_0: \mu \le 50 \qquad H_1: \mu > 50 $$
  2. Level and tail. $\alpha = 0.05$, right-tailed, $df = n-1 = 8$.
  3. Test statistic. No $\sigma$, so $s$ must be estimated and the statistic is $t$: $$ t=\frac{\bar{x}-\mu_0}{s/\sqrt{n}}\;\sim\;t_{n-1} $$
  4. Critical value. From the $t$-table, $t_{0.05,\,8} = 1.860$. Reject $H_0$ if $t > 1.860$.
  5. Mean and deviations. $\sum x = 477$, so $\bar{x} = 477/9 = 53$.
    $x$485052535455565158Σ
    $x-\bar{x}$−5−3−10123−250
    $(x-\bar{x})^2$2591014942578
    The deviations total zero, so the mean is right.
  6. Compute. $$ s^2=\frac{78}{9-1}=\frac{78}{8}=9.75 \qquad s=\sqrt{9.75}=3.1225 $$ $$ t=\frac{53-50}{3.1225/\sqrt{9}}=\frac{3}{1.0408}=2.8823 $$
  7. Decide. $2.8823 > 1.860$, so reject $H_0$.
  8. Bracket the p-value. Along the $df = 8$ row: $t_{0.025,8} = 2.306$ and $t_{0.01,8} = 2.896$. Our $2.8823$ lies between them, so $$ 0.01 < p < 0.025 $$
Reject $H_0$ at the 5% level ($0.01 < p < 0.025$). There is sufficient evidence that the programme has raised the mean score above 50.
Why you can only bracket a $t$ p-value

The $Z$-table lists an area for every value of $z$ to two decimals, so you can read a p-value off directly. The $t$-table is arranged the other way round — it lists values for a fixed handful of areas (0.10, 0.05, 0.025, 0.01, 0.005), because there is a different curve for every $df$ and a full table would fill a book. So all you can do is find which two columns your statistic falls between. That is the expected answer; do not try to interpolate.

Notice how close this is

$t = 2.8823$ against $t_{0.01,8} = 2.896$ — a hair short. At the 1% level you would not reject. Rounding $s$ to two decimals early ($3.12$ instead of $3.1225$) gives $t = 2.8846$, which is still below $2.896$, but on a tighter question that kind of premature rounding does flip the decision. Carry full precision.

Example 3 — $Z$ test for a proportion, two-tailed, p-value method

A political party claims that 40% of voters in a constituency support it. In a random sample of 400 voters, 140 say they support the party. Using the p-value method, test the party's claim at the 5% level.

Given $n = 400$ · $x = 140$ · $p_0 = 0.40$ · $\alpha = 0.05$

Hint: the claim is an exact percentage with no direction, so how many tails? And which proportion goes inside the square root?

  1. Hypotheses. The claim is "40%", with no direction, so two-tailed: $$ H_0: p = 0.40 \qquad H_1: p \ne 0.40 $$
  2. Level and tail. $\alpha = 0.05$, two-tailed.
  3. Test statistic. A count out of $n$ means a proportion test: $$ z=\frac{\hat{p}-p_0}{\sqrt{p_0(1-p_0)/n}} $$ Validity check: $np_0 = 400(0.40) = 160 \ge 5$ and $n(1-p_0) = 240 \ge 5$, so the normal approximation holds.
  4. Compute. $$ \hat{p}=\frac{140}{400}=0.35 $$ $$ \sqrt{\frac{0.40 \times 0.60}{400}}=\sqrt{\frac{0.24}{400}}=\sqrt{0.0006}=0.0245 $$ $$ z=\frac{0.35-0.40}{0.0244949}=\frac{-0.05}{0.0244949}=-2.0412 $$
  5. p-value. Two-tailed, so double the left-tail area: $$ p = 2\times P(Z < -2.04) = 2 \times 0.0207 = 0.0414 $$
  6. Decide. $0.0414 < 0.05$, so reject $H_0$.
Reject $H_0$ at the 5% level ($p = 0.0414$). There is sufficient evidence that the true level of support differs from 40%; the sample points to it being lower.
Why $p_0$ and not $\hat{p}$ under the root

The whole test is a thought experiment: "suppose the party is right and $p$ really is $0.40$ — how often would a sample of 400 land as far from $0.40$ as ours did?" Inside that thought experiment the true proportion is $0.40$, so the standard error must be built from $0.40$. Using $\hat{p}=0.35$ there would be quietly assuming the thing you are trying to test.

Compare this with exam Q5

Q5 was the same test with one difference — "at least 90%" gave it a direction, making it one-tailed, so its p-value was not doubled. Here "40%" has no direction, so this one is. That single word is the whole difference between the two questions, and it is worth a mark.

Example 4 — $\chi^2$ test for a variance, right-tailed

A bottling machine is considered acceptable as long as the variance of fill volumes does not exceed 4 ml². A quality inspector takes a random sample of 16 bottles and finds a sample variance of 7.2 ml². Test at the 5% level whether the machine's variance exceeds the acceptable limit, and bracket the p-value.

Given $n = 16$ · $s^2 = 7.2$ · $\sigma_0^2 = 4$ · $\alpha = 0.05$

Hint: "does not exceed" sets the direction. With only one tail, how many critical values do you need from the $\chi^2$ table?

  1. Hypotheses. The acceptable state is "does not exceed 4", and we are looking for evidence that it does: $$ H_0: \sigma^2 \le 4 \qquad H_1: \sigma^2 > 4 $$
  2. Level and tail. $\alpha = 0.05$, right-tailed, $df = n - 1 = 15$.
  3. Test statistic. $$ \chi^2=\frac{(n-1)s^2}{\sigma_0^2}\;\sim\;\chi^2_{n-1} $$
  4. Critical value. Right-tailed, so only one value is needed. From the $\chi^2$ table with $df = 15$: $\chi^2_{0.05,\,15} = 24.996$. Reject $H_0$ if $\chi^2 > 24.996$.
  5. Compute. $$ \chi^2=\frac{(16-1)(7.2)}{4}=\frac{108}{4}=27.0000 $$
  6. Decide. $27.0000 > 24.996$, so reject $H_0$.
  7. Bracket the p-value. Along the $df = 15$ row, $\chi^2_{0.05} = 24.996$ and $\chi^2_{0.025} = 27.488$. Our $27.0000$ lies between them, so $$ 0.025 < p < 0.05 $$
Reject $H_0$ at the 5% level ($0.025 < p < 0.05$). There is sufficient evidence that the machine's fill variance exceeds 4 ml², so the machine needs attention.
Why only one critical value here, but two in exam Q6

The number of critical values equals the number of tails, never anything else. Q6 asked "is the variance equal to 20" — suspicious of both too-large and too-small, hence two tails and two lookups. This question asks only "does it exceed 4" — a variance that is unusually small is not a problem here, so all 5% goes in the right tail and one lookup suffices.

Units

Compare variances with variances. If a question gives a standard deviation limit of 2 ml, square it to get $\sigma_0^2 = 4$ before substituting. Mixing $\sigma$ and $\sigma^2$ in this formula is a common and expensive slip.

Example 5 — Type I error, Type II error and power

A process is tested with $H_0: \mu = 100$ against $H_1: \mu > 100$, using a sample of $n = 25$ from a population with $\sigma = 15$, at $\alpha = 0.05$.

  1. Find the critical value of $\bar{x}$ above which $H_0$ is rejected.
  2. Find the probability of a Type II error if the true mean is in fact 107.
  3. State the power of the test against $\mu = 107$.
Given $\mu_0 = 100$ · $\sigma = 15$ · $n = 25$ · $\alpha = 0.05$ · true $\mu = 107$

Hint: $\beta$ is computed in the alternative world. Find the decision rule under $H_0$ first, then ask how often that rule fails when $\mu = 107$.

  1. Standard error. $$ \sigma_{\bar{x}}=\frac{\sigma}{\sqrt{n}}=\frac{15}{\sqrt{25}}=\frac{15}{5}=3 $$
  2. The decision rule, built under $H_0$. Right-tailed at 5% uses $z_{0.05} = 1.645$: $$ \bar{x}_{\text{crit}}=\mu_0+z_{0.05}\,\sigma_{\bar{x}}=100+1.645(3)=104.935 $$ So the rule is: reject $H_0$ if $\bar{x} > 104.935$. By construction the probability of doing this when $H_0$ is true — the Type I error — is exactly $\alpha = 0.05$.
  3. Type II error. $\beta$ is the probability of failing to reject when $H_1$ is true. Keep the same rule, but now compute under $\mu = 107$: $$ \beta=P(\bar{x} \le 104.935 \mid \mu = 107) $$ $$ z=\frac{104.935-107}{3}=\frac{-2.065}{3}=-0.6883 \approx -0.69 $$ $$ \beta = P(Z \le -0.69) = 0.2451 $$
  4. Power. $$ \text{Power}=1-\beta=1-0.2451=0.7549 $$
$\bar{x}_{\text{crit}} = 104.935$ · $\beta = 0.2451$ · Power $= 0.7549$. The test correctly detects a true mean of 107 about 75% of the time.
The one idea that makes $\beta$ click

There are two bell curves, not one. The curve centred at 100 is the null world; the curve centred at 107 is the real world. You draw the cut-off at 104.935 using the null curve, because that is all you have when you design the test. Then $\beta$ is the area of the alternative curve that falls on the wrong side of that same line — the samples that really came from 107 but were not extreme enough to convince you. The cut-off is drawn once and used twice; that is why the same 104.935 appears in both calculations.

What moves $\beta$

Raise $n$ and both curves narrow, so they overlap less and $\beta$ falls — this is the only way to reduce $\alpha$ and $\beta$ together. Raise $\alpha$ and the cut-off slides left, so $\beta$ falls but you make more false rejections. And the further the true mean is from $\mu_0$, the smaller $\beta$: at $\mu = 115$ this same test would have $\beta$ near zero. Effects that are big are easy to detect.

Example 6 — pick the test (a five-part drill)

For each scenario, state $H_0$ and $H_1$, name the test statistic, give the degrees of freedom where relevant, and state the tail. Do not compute anything.

  1. A firm claims its bulbs last 1200 hours on average. Records give $\sigma = 90$. A sample of 36 bulbs averages 1170 hours. Test the claim at 5%.
  2. Twelve batteries are tested; the sample mean life is 41 hours with $s = 3$ hours. Is the mean life more than 40 hours?
  3. Of 500 voters surveyed, 260 support a bill. Is support more than half?
  4. A filling machine is meant to have a standard deviation of no more than 2 ml. A sample of 20 bottles gives $s = 2.8$ ml.
  5. Eight weights are given as raw data. Test whether the population mean weight is 50 kg.

Hint: for each one ask only two things — which parameter, and is $\sigma$ given?

$H_0$ / $H_1$StatisticdfTail
1$\mu = 1200$ / $\mu \ne 1200$$Z$ for a mean, $\sigma$ known—Two
2$\mu \le 40$ / $\mu > 40$$t$ for a mean, $\sigma$ unknown11Right
3$p \le 0.50$ / $p > 0.50$$Z$ for a proportion—Right
4$\sigma^2 \le 4$ / $\sigma^2 > 4$$\chi^2$ for a variance19Right
5$\mu = 50$ / $\mu \ne 50$$t$ for a mean, $\sigma$ unknown7Two
  1. Why 1 is $Z$ and 2 is $t$. Scenario 1 hands you $\sigma = 90$ from population records. Scenario 2 hands you $s = 3$ from the sample itself. Given $\sigma$ $\rightarrow$ $Z$; estimated $s$ $\rightarrow$ $t$ with $df = n - 1 = 11$.
  2. Why 3 is a proportion. "260 of 500" is a count, and "more than half" fixes $p_0 = 0.50$. Right-tailed because "more than".
  3. Why 4 squares the 2. The limit is given as a standard deviation of 2 ml, but the $\chi^2$ statistic works in variances, so $\sigma_0^2 = 2^2 = 4$. $df = 20 - 1 = 19$.
  4. Why 5 is two-tailed. "Whether the population mean is 50" suggests no direction — a mean of 45 would be just as much a contradiction as a mean of 55. Raw data with no $\sigma$ means $t$, with $df = 8 - 1 = 7$.
The parameter and the presence of $\sigma$ choose the statistic; the wording of the claim chooses the tail. Nothing else is involved.
Why this drill is worth doing twice

In an exam, choosing the wrong statistic loses every mark after step 2, however good the arithmetic. Choosing the right one takes about eight seconds. This is the single highest-value habit in the whole topic — practise it until it is automatic, then the computation is the easy part.

3.2 · Correlation and regression — examples 7 to 13

Example 7 — Karl Pearson's coefficient of correlation from raw data

The table gives the hours studied ($x$) and the marks obtained ($y$) by five students. Compute the coefficient of correlation between them.

Hours $x$24568
Marks $y$376910
Given $n = 5$ pairs of raw measurements

Hint: build all five columns before substituting anything. Do not compute the means first — the $n\sum xy$ form does not need them.

  1. Build the Σ table. Fill it row by row, then total each column.
    $x$$y$$xy$$x^2$$y^2$
    23649
    47281649
    56302536
    69543681
    8108064100
    2535198145275
  2. Compute the three building blocks. $$ S_{xy}=n\sum xy-\sum x\sum y=5(198)-(25)(35)=990-875=115 $$ $$ S_{xx}=n\sum x^2-\Big(\sum x\Big)^2=5(145)-625=725-625=100 $$ $$ S_{yy}=n\sum y^2-\Big(\sum y\Big)^2=5(275)-1225=1375-1225=150 $$
  3. Substitute. $$ r=\frac{S_{xy}}{\sqrt{S_{xx}S_{yy}}}=\frac{115}{\sqrt{100\times150}}=\frac{115}{\sqrt{15000}}=\frac{115}{122.4745}=0.9390 $$
  4. Interpret. $r = 0.9390$ is close to $+1$: a very strong positive linear relationship. Students who studied longer scored higher, almost without exception.
$r = 0.9390$ — a very strong positive correlation between hours studied and marks obtained.
Why this version of the formula

There is a version using $\sum(x-\bar{x})(y-\bar{y})$, and it gives an identical answer. But it forces you to compute two means first and then subtract inside every row — which means decimals, rounding, and many chances to slip. The $n\sum xy$ form uses only whole-number column totals, so the whole calculation stays exact until the final division. In an exam, always prefer it.

Sanity check before you write the answer down

$r$ must lie in $[-1, 1]$, and its sign must match the sign of $S_{xy}$. If you get $1.4$, or a negative $r$ from an obviously rising scatter, the error is almost always in $S_{xx}$ or $S_{yy}$ — typically $\sum x^2$ confused with $(\sum x)^2$. Those are different: here $\sum x^2 = 145$ but $(\sum x)^2 = 625$.

Example 8 — both regression lines, and a prediction

Using the same data as Example 7 (hours studied $x$, marks $y$), find both lines of regression, verify the relationship between them and $r$, and estimate the marks of a student who studies for 7 hours.

Given from Example 7: $n = 5$ · $S_{xy} = 115$ · $S_{xx} = 100$ · $S_{yy} = 150$ · $\sum x = 25$ · $\sum y = 35$

Hint: the Σ table is already built — do not rebuild it. Which line predicts marks from hours?

  1. Means. $$ \bar{x}=\frac{25}{5}=5 \qquad \bar{y}=\frac{35}{5}=7 $$
  2. Both regression coefficients, straight from the blocks. $$ b_{yx}=\frac{S_{xy}}{S_{xx}}=\frac{115}{100}=1.15 \qquad b_{xy}=\frac{S_{xy}}{S_{yy}}=\frac{115}{150}=0.7667 $$
  3. Line of $Y$ on $X$ — for predicting marks from hours: $$ y-\bar{y}=b_{yx}(x-\bar{x}) \;\Rightarrow\; y-7=1.15(x-5) $$ $$ y=1.15x+1.25 $$
  4. Line of $X$ on $Y$ — for predicting hours from marks: $$ x-\bar{x}=b_{xy}(y-\bar{y}) \;\Rightarrow\; x-5=0.7667(y-7) $$ $$ x=0.7667y-0.3667 $$
  5. Verify against $r$. $r$ is the geometric mean of the two coefficients: $$ r=\sqrt{b_{yx}\,b_{xy}}=\sqrt{1.15\times0.7667}=\sqrt{0.8817}=0.9390 $$ which matches Example 7 exactly. Both coefficients are positive, so $r$ takes the positive root.
  6. Predict. Marks are unknown, so use $Y$ on $X$: $$ \hat{y}=1.15(7)+1.25=8.05+1.25=9.30 $$
$Y$ on $X$: $y = 1.15x + 1.25$ · $X$ on $Y$: $x = 0.7667y - 0.3667$ · a student studying 7 hours is estimated to score 9.30 marks.
Why two different lines for one set of points

They answer different questions, so they minimise different errors. $Y$ on $X$ makes the vertical gaps small — it is built to be wrong by as little as possible about $y$. $X$ on $Y$ makes the horizontal gaps small. Only when every point sits exactly on one line ($r = \pm1$) do the two coincide. The weaker the correlation, the wider they open, like a pair of scissors hinged at $(\bar{x},\bar{y})$.

The check that costs ten seconds

Substitute $x = \bar{x}$ into your $Y$ on $X$ line: you must get exactly $\bar{y}$. Here $1.15(5)+1.25 = 7$ ✓. Every regression line passes through the point of means, so if it does not, your intercept is wrong.

Do not extrapolate

The data covers 2 to 8 hours. Predicting the marks of someone who studies 20 hours uses the line far outside the evidence that built it, and the answer is not defensible. If an exam asks for such a prediction, give it but add the caveat — that sentence is often the mark.

Example 9 — Spearman's rank correlation, no ties

Eight candidates were scored by two interviewers. Find the rank correlation coefficient between the two sets of scores and comment.

Interviewer A4860726256408850
Interviewer B6278986570389254
Given $n = 8$ pairs · check for repeats before starting

Hint: scan both rows for repeated values first — that decides whether you need the correction term.

  1. Check for ties. A: 48, 60, 72, 62, 56, 40, 88, 50 — all distinct. B: 62, 78, 98, 65, 70, 38, 92, 54 — all distinct. No ties, so the plain formula applies.
  2. Rank both columns, largest first. State the direction once and apply it to both.
    AB$R_A$$R_B$$d$$d^2$
    48627611
    60784311
    72982111
    626535−24
    56705411
    40388800
    889212−11
    505467−11
    Σ3636010
  3. Run both checks. Each rank column totals $\tfrac{8 \times 9}{2} = 36$ ✓, and $\sum d = 0$ ✓. Safe to substitute.
  4. Substitute. $$ \rho=1-\frac{6\sum d^2}{n(n^2-1)}=1-\frac{6(10)}{8(64-1)}=1-\frac{60}{504}=1-0.1190=0.8810 $$
$\rho = 0.8810$ — a strong positive rank correlation. The two interviewers largely agree on the order of merit of the candidates.
What rank correlation measures that Pearson's $r$ does not

Pearson's $r$ asks whether the points lie near a straight line. Spearman's $\rho$ asks only whether the two orderings agree — whether the person ranked third by A tends to be ranked around third by B. So $\rho$ survives any relationship that consistently rises, straight or curved, and it is unbothered by one wild outlier, because an extreme value is still just "rank 1". That is exactly why it is the right tool for judges, interviewers and preferences.

The direction trap

Had you ranked A with largest-first and B with smallest-first, every $d$ would change and you would have computed $\rho = -0.8810$ — a confident statement that the interviewers disagree. Write "rank 1 = highest score" at the top of your working and apply it to both columns.

Example 10 — Spearman's rank correlation with tied ranks

Find the rank correlation coefficient for the following data, which contains repeated values.

$X$4550506270385566
$Y$6065707070506275
Given $n = 8$ · $X$ has one tie of two values · $Y$ has one tie of three values

Hint: rank as if there were no ties, then average the positions each tie group occupies. The correction term is $\frac{m(m^2-1)}{12}$, added once per group, in both columns.

  1. Identify the tie groups. In $X$, the value 50 appears twice — a group of $m = 2$. In $Y$, the value 70 appears three times — a group of $m = 3$.
  2. Rank $X$ (largest first), averaging tied positions. Sorted: 70, 66, 62, 55, 50, 50, 45, 38. The two 50s occupy positions 5 and 6, so both take $\tfrac{5+6}{2} = 5.5$, and the next value (45) resumes at position 7, not 6.
  3. Rank $Y$ the same way. Sorted: 75, 70, 70, 70, 65, 62, 60, 50. The three 70s occupy positions 2, 3 and 4, so each takes $\tfrac{2+3+4}{3} = 3$, and the next value (65) resumes at position 5.
    $X$$Y$$R_X$$R_Y$$d$$d^2$
    45607700
    50655.550.50.25
    50705.532.56.25
    62703300
    707013−24
    38508800
    556246−24
    66752111
    Σ3636015.5
    Both rank columns still total 36 and $\sum d = 0$ ✓ — averaging preserves the total, which is precisely why it is the correct way to handle ties.
  4. Compute the correction, once per tie group. $$ \text{from } X \text{ (}m=2\text{):}\quad \frac{2(2^2-1)}{12}=\frac{6}{12}=0.5 $$ $$ \text{from } Y \text{ (}m=3\text{):}\quad \frac{3(3^2-1)}{12}=\frac{24}{12}=2 $$ $$ \text{Total correction}=0.5+2=2.5 $$
  5. Substitute into the corrected formula. $$ \rho=1-\frac{6\left[\sum d^2+\sum\frac{m(m^2-1)}{12}\right]}{n(n^2-1)}=1-\frac{6[15.5+2.5]}{8(64-1)} $$ $$ \rho=1-\frac{6(18)}{504}=1-\frac{108}{504}=1-0.2143=0.7857 $$
$\rho = 0.7857$ — a fairly strong positive rank correlation.
How much the correction matters

Leaving it out gives $\rho = 1 - \frac{6(15.5)}{504} = 0.8155$ — noticeably higher, and wrong. The plain formula assumes each rank from 1 to $n$ is used exactly once, which ties violate: nobody here holds rank 5, 6, 2 or 4. The correction adds back exactly the spread the ties removed. Without it you always overstate the agreement.

Memorise three numbers, not the formula

$\frac{m(m^2-1)}{12}$ for the group sizes you will actually meet: a pair contributes 0.5, a triple contributes 2, a group of four contributes 5. Count your tie groups, add those numbers, done.

Example 11 — two regression lines given, no data

For a bivariate distribution, the two lines of regression are $9X - 10Y + 26 = 0$ and $5X - 2Y = 14$, and $\operatorname{Var}(X) = 4$. Find (a) the mean values of $X$ and $Y$, (b) the correlation coefficient, (c) the standard deviation of $Y$, and (d) the estimated value of $Y$ when $X = 10$.

Given two regression lines · $\operatorname{Var}(X) = 4$, so $\sigma_x = 2$

Hint: you are not told which line is which. There is a test for that, and it must appear in your answer.

  1. (a) The means — solve simultaneously. Both regression lines pass through $(\bar{x},\bar{y})$, so that point satisfies both. $$ 9x-10y=-26 \quad\cdots(1) \qquad\qquad 5x-2y=14 \quad\cdots(2) $$ Multiply (2) by 5: $\;25x-10y=70\;\cdots(3)$. Subtract (1) from (3): $$ (25x-10y)-(9x-10y)=70-(-26) \;\Rightarrow\; 16x=96 \;\Rightarrow\; x=6 $$ Substitute into (2): $\;5(6)-2y=14 \Rightarrow 30-2y=14 \Rightarrow y=8$. $$ \bar{x}=6, \qquad \bar{y}=8 $$
  2. (b) Assume an assignment and extract the coefficients. Take the first line as $Y$ on $X$ and make $y$ the subject: $$ 10y=9x+26 \;\Rightarrow\; y=0.9x+2.6 \;\Rightarrow\; b_{yx}=0.9 $$ Take the second as $X$ on $Y$ and make $x$ the subject: $$ 5x=2y+14 \;\Rightarrow\; x=0.4y+2.8 \;\Rightarrow\; b_{xy}=0.4 $$
  3. Test the assumption. Since $b_{yx}b_{xy}=r^2$ and $r^2 \le 1$, the product must not exceed 1: $$ 0.9\times0.4=0.36 \le 1 \quad\checkmark $$ The assumption is correct. (The other assignment gives $b_{xy}=1.1111$ and $b_{yx}=2.5$, product $2.7778 > 1$ — impossible.)
  4. Take the root. Both coefficients are positive, so: $$ r=+\sqrt{0.36}=0.6000 $$
  5. (c) The standard deviation of $Y$. $$ b_{yx}=r\frac{\sigma_y}{\sigma_x} \;\Rightarrow\; 0.9=0.6\times\frac{\sigma_y}{2} \;\Rightarrow\; \sigma_y=\frac{0.9\times2}{0.6}=3 $$ Cross-check with the other coefficient: $b_{xy}=r\frac{\sigma_x}{\sigma_y}=0.6\times\frac{2}{3}=0.4$ ✓.
  6. (d) Estimate $Y$ at $X = 10$. $Y$ is unknown, so use $Y$ on $X$: $$ \hat{y}=0.9(10)+2.6=9+2.6=11.6 $$
$\bar{x}=6$, $\bar{y}=8$ · $r = 0.6000$ · $\sigma_y = 3$ · at $X=10$, estimated $Y = 11.6$
Why the product test works

Multiply the two coefficients: $b_{yx}b_{xy} = \left(r\frac{\sigma_y}{\sigma_x}\right)\left(r\frac{\sigma_x}{\sigma_y}\right) = r^2$, since the standard deviations cancel. And $r$ lives in $[-1,1]$, so $r^2$ cannot exceed 1. If your assignment produces a product above 1 it is claiming $|r| > 1$, which is impossible — so the assignment, not the arithmetic, is wrong. Swap the two lines and the product becomes its reciprocal, which is then below 1. The test can never be ambiguous.

Make the right variable the subject

To read $b_{yx}$ you must have $y$ alone on the left. To read $b_{xy}$ you must have $x$ alone on the left. Reading $b_{xy}$ off a line written as $y = \ldots$ by taking the reciprocal in your head is where this question goes wrong. Write the rearrangement out.

Example 12 — everything from summary totals, plus $R^2$

For ten pairs of observations the following totals were recorded: $\sum x = 50$, $\sum y = 60$, $\sum xy = 350$, $\sum x^2 = 300$, $\sum y^2 = 450$. Find the correlation coefficient, the line of regression of $Y$ on $X$, the coefficient of determination with its interpretation, and the estimated value of $y$ when $x = 8$.

Given $n = 10$ · $\sum x = 50$ · $\sum y = 60$ · $\sum xy = 350$ · $\sum x^2 = 300$ · $\sum y^2 = 450$

Hint: the Σ table has been done for you. Go straight to $S_{xy}$, $S_{xx}$, $S_{yy}$.

  1. The three building blocks. $$ S_{xy}=10(350)-(50)(60)=3500-3000=500 $$ $$ S_{xx}=10(300)-(50)^2=3000-2500=500 $$ $$ S_{yy}=10(450)-(60)^2=4500-3600=900 $$
  2. Correlation coefficient. $$ r=\frac{500}{\sqrt{500\times900}}=\frac{500}{\sqrt{450000}}=\frac{500}{670.8204}=0.7454 $$
  3. Means, then the regression coefficient. $$ \bar{x}=\frac{50}{10}=5 \qquad \bar{y}=\frac{60}{10}=6 \qquad b_{yx}=\frac{S_{xy}}{S_{xx}}=\frac{500}{500}=1.0000 $$
  4. Line of $Y$ on $X$. $$ y-6=1.0000(x-5) \;\Rightarrow\; y=x+1 $$ Check: at $x=\bar{x}=5$, $y=6=\bar{y}$ ✓.
  5. Coefficient of determination. $$ R^2=r^2=(0.7454)^2=0.5556 $$ So 55.56% of the variation in $y$ is explained by its linear relationship with $x$; the remaining 44.44% is unexplained by this model.
  6. Predict at $x = 8$. $$ \hat{y}=8+1=9 $$
$r = 0.7454$ · $Y$ on $X$: $y = x + 1$ · $R^2 = 0.5556$ (55.56% of the variation in $y$ explained) · at $x = 8$, $\hat{y} = 9$
Why $R^2$ feels smaller than $r$ suggests

$r = 0.7454$ sounds impressive, but squaring it gives $0.5556$ — barely more than half the variation accounted for. Squaring a number below 1 always shrinks it, and that is the honest measure: $R^2$ is the share of the ups and downs in $y$ that the line actually reproduces. It is why $r = 0.7$ is a much weaker result than it looks, and why examiners like asking for $R^2$ right after $r$.

Two free checks on this answer

First, $b_{xy} = S_{xy}/S_{yy} = 500/900 = 0.5556$, and $b_{yx} \times b_{xy} = 1.0000 \times 0.5556 = 0.5556 = r^2$ ✓. Second, a regression coefficient of exactly 1 with $r$ well below 1 is perfectly normal — the slope and the strength are different things. A slope of 1 with scattered points, and a slope of 1 with points on a perfect line, are both $b_{yx} = 1$.

Example 13 — is the correlation significant? (the two topics joined)

A sample of 20 pairs of observations gives a correlation coefficient of $r = 0.68$. Test at the 5% level whether there is a significant correlation between the two variables in the population.

Given $n = 20$ · $r = 0.68$ · $\alpha = 0.05$

Hint: this is a hypothesis test, so use the six-step machine. The population parameter here is $\rho$, and the statistic is a $t$ with $n - 2$ degrees of freedom.

  1. Hypotheses. The null position is "no relationship at all": $$ H_0: \rho = 0 \qquad H_1: \rho \ne 0 $$
  2. Level and tail. $\alpha = 0.05$, two-tailed (the question says "significant", not "positive"), $df = n - 2 = 18$.
  3. Test statistic. $$ t=\frac{r\sqrt{n-2}}{\sqrt{1-r^2}}\;\sim\;t_{n-2} $$
  4. Critical value. From the $t$-table, $t_{0.025,\,18} = 2.101$. Reject $H_0$ if $|t| > 2.101$.
  5. Compute. $$ 1-r^2=1-(0.68)^2=1-0.4624=0.5376 \qquad \sqrt{0.5376}=0.7332 $$ $$ t=\frac{0.68\sqrt{18}}{0.7332}=\frac{0.68\times4.2426}{0.7332}=\frac{2.8850}{0.7332}=3.9347 $$
  6. Decide. $3.9347 > 2.101$, so reject $H_0$. Bracketing the p-value: $t_{0.005,18} = 2.878$, and $3.9347$ exceeds even that, so the two-tailed $p < 0.01$.
Reject $H_0$ at the 5% level ($t = 3.9347 > 2.101$, $p < 0.01$). There is a significant linear correlation between the two variables in the population.
Why $n-2$ degrees of freedom, not $n-1$

Degrees of freedom count how many independent pieces of information remain after you have estimated things from the data. Fitting a line costs you two — a slope and an intercept — so $n - 2$ are left. Testing a single mean costs only one (the mean itself), which is why that test uses $n - 1$. Same principle, different number of estimates.

"Significant" does not mean "strong"

Significance depends heavily on $n$. The same $r = 0.68$ from only 5 pairs gives $t = 1.6063$ on $df = 3$, which is nowhere near the critical $3.182$ — not significant at all. And with $n = 1000$, an $r$ of just $0.07$ becomes significant while explaining under half a percent of the variation. So always report $r$ (or $R^2$) alongside the test: one tells you whether the relationship is real, the other tells you whether it matters.

How to use these thirteen

  • First pass: read each question, and write only the six-step skeleton or the Σ table — not the arithmetic. That is the skill that transfers.
  • Second pass: do them fully, timed. Seven marks is about ten minutes on a 50-mark, 2.5-hour paper.
  • Third pass: cover the questions and reconstruct them from the answers — if you can say why example 4 needed one critical value and exam Q6 needed two, you understand the topic rather than the examples.
  • Then sit the mock papers, which put these alongside the other five question types under exam conditions.
Appendix

Cards and tables

The one-page formula card for these two topics, then the three statistical tables every question above reads from.

A1 · One-page formula card

If you copy one page into the front of your revision notes, copy this one. Everything in Parts 1 to 3 is here.

Hypothesis testing

TestingConditionsStatisticDistribution
Mean $\mu$$\sigma$ known$z=\dfrac{\bar{x}-\mu_0}{\sigma/\sqrt{n}}$$Z$
Mean $\mu$$\sigma$ unknown$t=\dfrac{\bar{x}-\mu_0}{s/\sqrt{n}}$$t_{n-1}$
Proportion $p$$np_0 \ge 5$, $n(1-p_0) \ge 5$$z=\dfrac{\hat{p}-p_0}{\sqrt{p_0(1-p_0)/n}}$$Z$
Variance $\sigma^2$normal population$\chi^2=\dfrac{(n-1)s^2}{\sigma_0^2}$$\chi^2_{n-1}$
Correlation $\rho$testing $\rho = 0$$t=\dfrac{r\sqrt{n-2}}{\sqrt{1-r^2}}$$t_{n-2}$
QuantityFormulaNote
Sample variance$s^2=\dfrac{\sum(x-\bar{x})^2}{n-1}$always $n-1$ in a test
Type I error$\alpha = P(\text{reject } H_0 \mid H_0 \text{ true})$you choose it
Type II error$\beta = P(\text{do not reject } H_0 \mid H_1 \text{ true})$computed in the $H_1$ world
Power$1-\beta$rises with $n$
Critical $\bar{x}$, right tail$\mu_0+z_\alpha\,\sigma/\sqrt{n}$built under $H_0$
p-value, one-tailedarea beyond the statisticin the tail $H_1$ points at
p-value, two-tailed$2\times$ that areareject when $p \le \alpha$

Correlation and regression

QuantityFormulaNote
Building blocks$S_{xy}=n\sum xy-\sum x\sum y$ · $S_{xx}=n\sum x^2-(\sum x)^2$ · $S_{yy}=n\sum y^2-(\sum y)^2$compute once
Pearson's $r$$r=\dfrac{S_{xy}}{\sqrt{S_{xx}S_{yy}}}$always in $[-1,1]$
Regression $Y$ on $X$$b_{yx}=\dfrac{S_{xy}}{S_{xx}}=r\dfrac{\sigma_y}{\sigma_x}$ · $y-\bar{y}=b_{yx}(x-\bar{x})$predicts $y$
Regression $X$ on $Y$$b_{xy}=\dfrac{S_{xy}}{S_{yy}}=r\dfrac{\sigma_x}{\sigma_y}$ · $x-\bar{x}=b_{xy}(y-\bar{y})$predicts $x$
$r$ from both lines$r=\pm\sqrt{b_{yx}\,b_{xy}}$sign = sign of the coefficients
Which line is which$b_{yx}\,b_{xy}=r^2 \le 1$if the product $>1$, swap
Point of meansboth lines pass through $(\bar{x},\bar{y})$solve them to find the means
Coefficient of determination$R^2=r^2$share of variation in $y$ explained
Spearman, no ties$\rho=1-\dfrac{6\sum d^2}{n(n^2-1)}$$\sum d$ must be 0
Spearman, with ties$\rho=1-\dfrac{6\left[\sum d^2+\sum\frac{m(m^2-1)}{12}\right]}{n(n^2-1)}$pair 0.5 · triple 2 · four 5
Critical values worth knowing without the table

$z_{0.05}=1.645$ · $z_{0.025}=1.96$ · $z_{0.01}=2.326$ · $z_{0.005}=2.576$. These four cover every $Z$ test you will meet at 10%, 5%, 2% and 1%, one- or two-tailed, and knowing them saves a lookup under time pressure.

A2 · Standard normal — area to the LEFT of z

Read the row for the first decimal of $z$ and the column for the second. The body of the table is $\Phi(z) = P(Z \le z)$. For an area to the right, subtract from 1.

A3 · Student's t — upper-tail critical values

The heading $t_{0.05}$ means the area to the right of that value is 0.05. For a two-tailed test at 5%, use the $t_{0.025}$ column.

A4 · Chi-square — critical values

The heading $\chi^2_{0.050}$ means the area to the right of that value is 0.050. For a two-tailed test at 5% you need both the $\chi^2_{0.975}$ and $\chi^2_{0.025}$ columns — the distribution is not symmetric, so the two must be looked up separately.

Where to go next

  • The textbook carries the underlying theory for these topics in chapters 4 and 5, with interactive figures for the rejection regions, the two error types and a drag-the-points regression sandbox.
  • The mock tests put these question types back among the other five, under a 2.5-hour clock, with full solutions and self-scoring.