Statistics 2: Statistical Inference: cram pack

Formula sheets, the key method steps for every topic and 10 practice problems, with full solutions at the back.

New problemsBack to the course

In the print window, choose “Save as PDF” to keep a copy on your device.

1Formulas and methods

Normal distribution

z-score
z = (x − μ)/σ
Below x
P(X < x) = Φ(z)
Above x
P(X > x) = 1 − Φ(z)
Between
Φ(z2) − Φ(z1)
Percentile
x = μ + z·σ

Method

  1. Convert the value to a z-score: z = (x − μ)/σ.
  2. Look up Φ(z), the area to the left of z.
  3. For the area to the right use 1 − Φ(z); for an interval subtract the two left areas.
  4. For a percentile, work backwards: find z for the area, then x = μ + z·σ.

Confidence intervals

σ known
x̄ ± z·σ/√n
σ unknown
x̄ ± t·s/√n, df = n − 1
Critical z
90%: 1.645, 95%: 1.96, 99%: 2.576
Sample size
n = (z·σ/E)², rounded up

Method

  1. Decide between z (population σ known) and t (only the sample s, with n − 1 degrees of freedom).
  2. Find the critical value for the confidence level.
  3. Margin of error: E = critical value × standard deviation/√n.
  4. Interval: x̄ ± E.

Hypothesis tests & confidence intervals

z-test for a mean
z = (x̄ − μ0)/(σ/√n)
t-test for a mean
t = (x̄ − μ0)/(s/√n), df = n − 1
Two-sided at 5%
reject H0 if |z| > 1.96
Confidence interval
x̄ ± z·σ/√n

Method

  1. State H₀ and H₁ and decide whether the test is one- or two-sided.
  2. Calculate the test statistic: (x̄ − μ₀)/(σ/√n), or with s and t.
  3. Compare with the critical value, or find the p-value.
  4. Reject H₀ if the statistic is beyond the critical value (p below α), and state the conclusion in words.

Linear regression & correlation

Sums of squares
Sxx = Σ(x − x̄)² = Σx² − (Σx)²/n, Sxy = Σxy − ΣxΣy/n
Slope
b = Sxy/Sxx
Intercept
a = ȳ − b·x̄
Correlation
r = Sxy/√(SxxSyy)
Residual
e = y − ŷ

Chi-square tests

Test statistic
χ² = Σ(O − E)²/E
Goodness of fit
E = n·p, df = k − 1 − (estimated parameters)
Independence
E = row total × column total / grand total, df = (r − 1)(c − 1)
Critical values (α = 0.05)
df 1: 3.841, 2: 5.991, 3: 7.815, 4: 9.488
Decision
reject H0 if χ² > χ²crit

2Practice problems

1.Normal distributionMedium
5077.5P = ?

The exam scores are normally distributed with mean 65 points and standard deviation 10 points. What fraction lies between 50 and 77.5 points? Give P as a decimal.

μ = 65σ = 10x1 = 50x2 = 77.5
P =
2.Normal distributionHard
4 s0X − Y?

Runner A's lap time X and runner B's lap time Y are independent and normal: X has mean 52 s and standard deviation 4 s, Y has mean 48 s and standard deviation 3 s. Find the probability P that X is greater than Y. Round z to two decimals.

μX = 52 s, σX = 4 sμY = 48 s, σY = 3 s
P =
3.Confidence intervalsMedium
n = 13, s = 20L = ?Ux̄ = 29E99%

A sample of 13 items has mean 29 and standard deviation s = 20. The population is roughly normal. Find the lower limit of the 99% confidence interval for the mean.

n = 13x̄ = 29s = 2099%t(12) = 3.055
lower limit =
4.Confidence intervalsHard
p = 0.5, n = ?p̂ − Ep̂ + Ep̂E = 0.0299%

Nothing is known in advance about the proportion of defective products. How many products n must be inspected so that a 99% confidence interval for the proportion has a margin of error of at most 0.02?

p = 0.5E = 0.0299%
n =
5.Hypothesis tests & confidence intervalsMedium
t −2.06402.064

A sample of 25 students has a mean score of 506.3 and a sample standard deviation of 15. Find the test statistic t for H₀: μ = 500.

μ₀ = 500x̄ = 506.3s = 15n = 25
t =
6.Hypothesis tests & confidence intervalsHard
−1.961.96z = ?

In a trial, 35 of 100 patients on treatment A recover, and 45 of 100 patients on treatment B. Using the pooled proportion, find the test statistic z for H₀: p₁ = p₂.

x₁ = 35n₁ = 100x₂ = 45n₂ = 100
z =
7.Linear regression & correlationMedium
xy18972111724126271483016333178xy202530100150

The table gives 6 paired observations of x = temperature in °C and y = ice creams sold. Their sums are given. Find Pearson's correlation coefficient r from these sums.

n = 6Σx = 153Σy = 829Σx² = 4059Σy² = 119131Σxy = 21987
r =
8.Linear regression & correlationHard
xy2841862583310411248xy5102040x = 3

The table gives 6 paired observations of x = load in kN and y = extension in mm. Use the least-squares line ŷ = a + b·x. A new observation (3, 8) is made. Find its residual e = y − ŷ.

n = 6(3, 8)
e =
9.Chi-square testsMedium
no defectminormajorTotalday shift11121740night shift5122340Total16244080

The contingency table shows observed counts. Compute the chi-square statistic χ² for the test of independence between the row and column variables. Do not use a continuity correction.

N = 802 × 3
χ² =
10.Chi-square testsHard
dfα = 0.05α = 0.0113.8416.63525.9919.21037.81511.34549.48813.277511.07015.086612.59216.812714.06718.475815.50720.090916.91921.6661018.30723.209

A chi-square goodness-of-fit test compares observed counts in 3 categories with fully specified expected proportions (no parameters are estimated from the data). Using the table, find the critical value χ²crit at significance level α = 0.01.

α = 0.01
χ²crit =

3Solutions

1.Normal distribution

Answer: P = 0.8275

Normal distribution: convert a value x to a z-score, z = (x − μ)/σ, which counts standard deviations from the mean. A z-table (or Φ(z)) gives the area to the left of z, which is P(X < x). The area to the right is 1 − Φ(z), and the area between two values is the difference of their two areas.

z-scores

z₁ = (50 − 65)/10 = −1.5
z₂ = (77.5 − 65)/10 = 1.25

Area between

P = Φ(1.25) − Φ(−1.5) = 0.8944 − 0.06681 = 0.8275

Answer

P = 0.8275
2.Normal distribution

Answer: P = 0.7881

Sums and differences of normal variables: if X and Y are independent and normal, X + Y and X − Y are normal too. Means add or subtract: E(X ± Y) = μX ± μY. Variances always add, also for a difference: Var(X ± Y) = σX² + σY², so σ = √(σX² + σY²). Standard deviations never add directly. The total of n independent items with the same distribution has mean n·μ and standard deviation σ·√n. Then standardise as usual: z = (x − mean)/σ and read Φ(z).

Distribution of the difference

μ = 52 − 48 = 4 s, σ = 5 s

Standardise

z = (0 − 4)/5 = −0.8

Probability

P = 1 − Φ(−0.8) = 0.7881

Answer

P = 0.7881
3.Confidence intervals

Answer: lower limit = 12.05

Confidence interval for a mean: x̄ ± margin of error. With a known population σ the margin is z·σ/√n; with only the sample standard deviation s, use t with n − 1 degrees of freedom: t·s/√n. Critical values: z = 1.645 (90%), 1.96 (95%), 2.576 (99%). To get a margin E or smaller, you need n ≥ (z·σ/E)², rounded up.

Critical value

df = n − 1 = 12, t = 3.055

Margin of error

E = 3.055·20/√13 = 16.95

Interval

29 ± 16.95 → [12.05, 45.95]

Answer

lower limit = 12.05
4.Confidence intervals

Answer: n = 4148

Confidence interval for a proportion: p̂ ± z·√(p̂(1 − p̂)/n), where p̂ = x/n. To reach a margin E you need n ≥ z²·p(1 − p)/E², rounded up; without a prior estimate use p = 0.5, which gives the largest n.

Solve for n

n = 2.576²·0.5·0.5/0.02² = 4147

Round up

n = 4148

Answer

n = 4148
5.Hypothesis tests & confidence intervals

Answer: t = 2.1

Testing a mean: the test statistic measures how many standard errors the sample mean lies from the value claimed in H₀: z = (x̄ − μ₀)/(σ/√n) when σ is known, t = (x̄ − μ₀)/(s/√n) when it is estimated from the sample. A confidence interval is x̄ ± (critical value)·(standard error).

Standard error

SE = 15/√25 = 15/5 = 3

Test statistic

t = (506.3 − 500)/3 = 2.1

Answer

t = 2.1
t0.025; df = 24 = 2.064

|t| > 2.064, so H₀ is rejected at the 5% level (two-sided).

6.Hypothesis tests & confidence intervals

Answer: z = −1.443

Hypothesis test: the test statistic = (estimate − value under H₀)/(standard error under H₀). The p-value is the probability, assuming H₀ is true, of a statistic at least as extreme as the one observed: the area in one tail for a one-sided H₁, twice the tail area for a two-sided H₁. Reject H₀ when p ≤ α.

Sample proportions

p̂₁ = 35/100 = 0.35
p̂₂ = 45/100 = 0.45
p̂ = 80/200 = 0.4

Standard error under H₀

SE = √(0.4·0.6·(1/100 + 1/100)) = 0.06928

Test statistic

z = (0.35 − 0.45)/0.06928 = −1.443

Answer

z = −1.443

|z| < 1.96, so H₀ is not rejected at the 5% level (two-sided).

7.Linear regression & correlation

Answer: r = 0.9967

Least-squares regression: with x̄ and ȳ the means, Sxx = Σ(x − x̄)², Syy = Σ(y − ȳ)² and Sxy = Σ(x − x̄)(y − ȳ), the line ŷ = a + b·x has slope b = Sxy/Sxx and intercept a = ȳ − b·x̄, so it always passes through (x̄, ȳ). Pearson's correlation coefficient r = Sxy/√(Sxx·Syy) lies between −1 and 1; r² is the fraction of the variation in y explained by the line.

Centred sums

Sxy = 21987 − 153·829/6 = 847.5
Sxx = 4059 − 153²/6 = 157.5
Syy = 119131 − 829²/6 = 4591

Correlation coefficient

r = 847.5/√(157.5·4591) = 0.9967

Answer

r = 0.9967
8.Linear regression & correlation

Answer: e = −5.005

Least-squares regression: with x̄ and ȳ the means, Sxx = Σ(x − x̄)², Syy = Σ(y − ȳ)² and Sxy = Σ(x − x̄)(y − ȳ), the line ŷ = a + b·x has slope b = Sxy/Sxx and intercept a = ȳ − b·x̄, so it always passes through (x̄, ȳ). Pearson's correlation coefficient r = Sxy/√(Sxx·Syy) lies between −1 and 1; r² is the fraction of the variation in y explained by the line.

Means

x̄ = 42/6 = 7
ȳ = 173/6 = 28.83

Sums of squares and products

Sxx = Σ(x − x̄)² = 70
Sxy = Σ(x − x̄)(y − ȳ) = 277

Regression line

b = 277/70 = 3.957
a = 28.83 − 3.957·7 = 1.133
ŷ = 1.133 + 3.957·x

Predicted value

ŷ = 1.133 + 3.957·3 = 13

Residual

e = 8 − 13 = −5.005

Answer

e = −5.005

The point lies below the line.

9.Chi-square tests

Answer: χ² = 3.15

Chi-square tests: compare observed counts O with the counts E expected under H₀ using χ² = Σ(O − E)²/E. Goodness of fit: E = n·p for each category, df = k − 1 (minus one more for each parameter estimated from the data). Independence in an r × c table: E = row total × column total / grand total, df = (r − 1)(c − 1). Reject H₀ when χ² exceeds the critical value for the chosen α.

Expected counts

day shift: 40·16/80 = 8, 40·24/80 = 12, 40·40/80 = 20
night shift: 40·16/80 = 8, 40·24/80 = 12, 40·40/80 = 20

Chi-square statistic

χ² = (11 − 8)²/8 + (12 − 12)²/12 + (17 − 20)²/20 + (5 − 8)²/8 + (12 − 12)²/12 + (23 − 20)²/20
χ² = 3.15

Answer

χ² = 3.15

df = 2. At α = 0.05 the critical value is 5.991, so H₀ (independence) is not rejected.

10.Chi-square tests

Answer: χ²crit = 9.21

Chi-square tests: compare observed counts O with the counts E expected under H₀ using χ² = Σ(O − E)²/E. Goodness of fit: E = n·p for each category, df = k − 1 (minus one more for each parameter estimated from the data). Independence in an r × c table: E = row total × column total / grand total, df = (r − 1)(c − 1). Reject H₀ when χ² exceeds the critical value for the chosen α.

Degrees of freedom

df = 3 − 1 = 2

Table

χ²crit(df = 2, α = 0.01) = 9.210

Answer

χ²crit = 9.210

Reject H₀ if the computed χ² is larger than this value.

ExamProblems · examproblems.com/courses/statistics-2-inference