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
60 kg62.7 kgT = X₁ + … + X₅?

The masses of boxes are independent and normal with mean 12 kg and standard deviation 0.8 kg. Find the probability P that the total mass of 5 of them exceeds 62.7 kg. Round z to two decimals.

μ = 12 kgσ = 0.8 kgn = 5> 62.7 kg
P =
2.Normal distributionHard
μ = 65x = ?5%

The exam scores are normally distributed with mean 65 points and standard deviation 10 points. Find the value x below which 5% of them lie (the 5th percentile).

μ = 65σ = 10P = 5%
x = points
3.Confidence intervalsMedium
n = 7, s = 7.5LU = ?x̄ = 82.5E95%

A sample of 7 items has mean 82.5 and standard deviation s = 7.5. The population is roughly normal. Find the upper limit of the 95% confidence interval for the mean.

n = 7x̄ = 82.5s = 7.595%t(6) = 2.447
upper limit =
4.Confidence intervalsHard
σ = 40, n = ?x̄ − Ex̄ + Ex̄E = 1.599%

The population standard deviation is 40. How large a sample n do you need so that a 99% confidence interval for the mean has a margin of error of at most 1.5?

σ = 40E = 1.599%
n =
5.Hypothesis tests & confidence intervalsMedium
t −2.06402.064

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

μ₀ = 500x̄ = 501.4s = 4n = 25
t =
6.Hypothesis tests & confidence intervalsHard
μ₀x̄c

A one-sided z test of H₀: μ = 200 against H₁: μ < 200 is done at α = 0.05 with a sample of 25; the standard deviation is known to be 12.5. In reality the mean is 197. Find the power 1 − β of the test in percent.

μ₀ = 200μ = 197σ = 12.5n = 25α = 0.05
1 − β = %
7.Linear regression & correlationMedium
xy22496118141017xy51051015

The table gives 5 paired observations of x = load in kN and y = extension in mm. Find Pearson's correlation coefficient r.

n = 5
r =
8.Linear regression & correlationHard
xy244460675893109912109xy51050100x = 11

The table gives 6 paired observations of x = hours studied and y = exam score. Use the least-squares line ŷ = a + b·x. A new observation (11, 104) is made. Find its residual e = y − ŷ.

n = 6(11, 104)
e =
9.Chi-square testsMedium
busbikecarTotalstudents11232660staff7252860Total184854120

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 = 1202 × 3
χ² =
10.Chi-square testsHard
yesnoTotalplant A79180plant B463480plant C51960Total17644220dfα = 0.05α = 0.0113.8416.63525.9919.21037.81511.34549.48813.277511.07015.086612.59216.812714.06718.475815.50720.090916.91921.6661018.30723.209

The table shows observed counts. Test at α = 0.01 whether the two variables are independent (no continuity correction). Compute the test statistic χ², then compare it with the critical value from the table.

N = 2203 × 2α = 0.01
χ² =

3Solutions

1.Normal distribution

Answer: P = 0.06552

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 total

μT = 60 kg, σT = 0.8·√5 = 1.789 kg

Standardise

z = (62.7 − 60)/1.789 = 1.51

Probability

P = 1 − Φ(1.51) = 0.06552

Answer

P = 0.06552
2.Normal distribution

Answer: x = 48.55 points

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 for the percentile

Φ(z) = 0.05 → z = −1.645

Back to x

x = 65 + −1.645·10 = 48.55 points

Answer

x = 48.55 points
3.Confidence intervals

Answer: upper limit = 89.44

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 = 6, t = 2.447

Margin of error

E = 2.447·7.5/√7 = 6.937

Interval

82.5 ± 6.937 → [75.56, 89.44]

Answer

upper limit = 89.44
4.Confidence intervals

Answer: n = 4719

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.

Solve for n

n = (2.576·40/1.5)² = 4719

Round up

A sample size is a whole number, and rounding down would make the margin too large.

n = 4719

Answer

n = 4719
5.Hypothesis tests & confidence intervals

Answer: t = 1.75

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 = 4/√25 = 4/5 = 0.8

Test statistic

t = (501.4 − 500)/0.8 = 1.75

Answer

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

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

6.Hypothesis tests & confidence intervals

Answer: 1 − β = 32.82 %

Power of a test: power = 1 − β is the probability of rejecting H₀ when it is false. Find the cutoff x̄c from μ₀ and z_α, then compute the probability of landing beyond x̄c using the true mean: z = (x̄c − μ)/(σ/√n).

Critical sample mean

SE = 12.5/√25 = 2.5
x̄c = 200 − 1.645·2.5 = 195.9

z under the true mean

z = (195.9 − 197)/2.5 = −0.445

Power

power = P(Z < −0.445) = 32.82%
1 − β = 32.82%

Answer

1 − β = 32.82%
7.Linear regression & correlation

Answer: r = 0.9737

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̄ = 30/5 = 6
ȳ = 53/5 = 10.6

Sums of squares and products

Sxx = Σ(x − x̄)² = 40
Sxy = Σ(x − x̄)(y − ȳ) = 70
Syy = Σ(y − ȳ)² = 129.2

Correlation coefficient

r = 70/√(40·129.2) = 0.9737

Answer

r = 0.9737
8.Linear regression & correlation

Answer: e = −2.286

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
ȳ = 480/6 = 80

Sums of squares and products

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

Regression line

b = 460/70 = 6.571
a = 80 − 6.571·7 = 34
ŷ = 34 + 6.571·x

Predicted value

ŷ = 34 + 6.571·11 = 106.3

Residual

e = 104 − 106.3 = −2.286

Answer

e = −2.286

The point lies below the line.

9.Chi-square tests

Answer: χ² = 1.046

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

students: 60·18/120 = 9, 60·48/120 = 24, 60·54/120 = 27
staff: 60·18/120 = 9, 60·48/120 = 24, 60·54/120 = 27

Chi-square statistic

χ² = (11 − 9)²/9 + (23 − 24)²/24 + (26 − 27)²/27 + (7 − 9)²/9 + (25 − 24)²/24 + (28 − 27)²/27
χ² = 1.046

Answer

χ² = 1.046

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

10.Chi-square tests

Answer: χ² = 43.83

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

plant A: 64, 16
plant B: 64, 16
plant C: 48, 12

Chi-square statistic

χ² = (79 − 64)²/64 + (1 − 16)²/16 + (46 − 64)²/64 + (34 − 16)²/16 + (51 − 48)²/48 + (9 − 12)²/12
χ² = 43.83

Decision

df = 2, χ²crit = 9.210
43.83 > 9.210

Answer

χ² = 43.83

χ² is above the critical value, so H₀ is rejected: the variables appear to be related.

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