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
171.35192P = ?

The heights of adult men are normally distributed with mean 178 cm and standard deviation 7 cm. What fraction lies between 171.35 and 192 cm? Give P as a decimal.

μ = 178σ = 7x1 = 171.35x2 = 192
P =
2.Normal distributionHard
μ = 32x = ?97.5%

The delivery times are normally distributed with mean 32 min and standard deviation 6 min. Find the value x below which 97.5% of them lie (the 97.5th percentile).

μ = 32σ = 6P = 97.5%
x = min
3.Confidence intervalsMedium
x̄E₁ = 9.599%, n = 50x̄E₂ = ?95%, n = 200

A 99% confidence interval for a mean, based on 50 observations and a known σ, has a margin of error of 9.5. What is the margin of error E₂ of a 95% interval based on 200 observations?

99%n₁ = 50E₁ = 9.595%n₂ = 200
E₂ =
4.Confidence intervalsHard
μ₁ − μ₂, t(10) = 2.2280LUx̄₁ − x̄₂E = ?95%

Two fertilisers are tested. Plot group 1: 5 plots, mean yield 62.5 kg, standard deviation 8.5 kg. Plot group 2: 7 plots, mean 52.5 kg, standard deviation 3.5 kg. Assume equal variances (pooled t, df = n₁ + n₂ − 2). Find the margin of error E of the 95% confidence interval for μ₁ − μ₂.

n₁ = 5x̄₁ = 62.5s₁ = 8.5n₂ = 7x̄₂ = 52.5s₂ = 3.595%t(10) = 2.228
E = kg
5.Hypothesis tests & confidence intervalsMedium
−1.3p = ?

The mean of a population is claimed to be 120; the population standard deviation is known to be 18. A random sample of 36 observations has a mean of 116.1. Test H₀: μ = 120 against H₁: μ < 120. Find the p-value p.

μ₀ = 120σ = 18n = 36x̄ = 116.1H₁: μ < μ₀
p =
6.Hypothesis tests & confidence intervalsHard
σ = 4, n = ?x̄ − Ex̄ + Ex̄E = 2.599%

How large must a sample be so that the 99% confidence interval for a mean has a margin of error of at most 2.5? The standard deviation is 4. Find the smallest sample size n.

σ = 4E = 2.599%
n =
7.Linear regression & correlationMedium
xy139357577782997xy5406080100

The table gives 5 paired observations of x = hours studied and y = exam score. Find Pearson's correlation coefficient r.

n = 5
r =
8.Linear regression & correlationHard
xy1861217424972710430111xy2025306080100x = 22.5

The table gives 5 paired observations of x = temperature in °C and y = ice creams sold. Use the least-squares line ŷ = a + b·x. A new observation (22.5, 81) is made. Find its residual e = y − ŷ.

n = 5(22.5, 81)
e =
9.Chi-square testsMedium
busbikecarTotalstudents342937100staff6272760Total405664160

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 = 1602 × 3
χ² =
10.Chi-square testsHard

A chi-square test of independence is carried out on a contingency table with 2 rows and 11 columns (not counting the totals). How many degrees of freedom df does the test have?

2 × 11
df =

3Solutions

1.Normal distribution

Answer: P = 0.8062

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₁ = (171.35 − 178)/7 = −0.95
z₂ = (192 − 178)/7 = 2

Area between

P = Φ(2) − Φ(−0.95) = 0.9772 − 0.1711 = 0.8062

Answer

P = 0.8062
2.Normal distribution

Answer: x = 43.76 min

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.975 → z = 1.96

Back to x

x = 32 + 1.96·6 = 43.76 min

Answer

x = 43.76 min
3.Confidence intervals

Answer: E₂ = 3.614

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.

Ratio of margins

E₂/E₁ = (1.96/2.576)·√(50/200) = 0.3804

New margin

E₂ = 9.5·0.3804 = 3.614

Answer

E₂ = 3.614
4.Confidence intervals

Answer: E = 7.855 kg

Interval for a difference: estimate ± critical value × standard error. For two independent means with known σ: SE = √(σ₁²/n₁ + σ₂²/n₂) and z. With equal unknown variances: pooled s_p and t with n₁ + n₂ − 2 degrees of freedom. For paired data, work with the differences: d̄ ± t·s_d/√n.

Pooled standard deviation

sp² = (4·8.5² + 6·3.5²)/10 = 36.25
sp = 6.021

Margin of error

E = 2.228·6.021·√(1/5 + 1/7) = 7.855

Answer

E = 7.855 kg
5.Hypothesis tests & confidence intervals

Answer: p = 0.0968

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 ≤ α.

Test statistic

SE = σ/√n = 18/√36 = 3
z = (116.1 − 120)/3 = −1.3

Tail area

Φ(1.3) = 0.9032
1 − Φ(1.3) = 0.0968

p-value

p = 0.0968

Answer

p = 0.0968

p > 0.05, so H₀ is not rejected at the 5% level.

6.Hypothesis tests & confidence intervals

Answer: n = 17

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).

Solve for n

n = (2.576·4/2.5)² = 16.99

Round up

n = 17

Answer

n = 17
7.Linear regression & correlation

Answer: r = 0.9845

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̄ = 25/5 = 5
ȳ = 352/5 = 70.4

Sums of squares and products

Sxx = Σ(x − x̄)² = 40
Sxy = Σ(x − x̄)(y − ȳ) = 282
Syy = Σ(y − ȳ)² = 2051

Correlation coefficient

r = 282/√(40·2051) = 0.9845

Answer

r = 0.9845
8.Linear regression & correlation

Answer: e = −1.9

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̄ = 120/5 = 24
ȳ = 447/5 = 89.4

Sums of squares and products

Sxx = Σ(x − x̄)² = 90
Sxy = Σ(x − x̄)(y − ȳ) = 390

Regression line

b = 390/90 = 4.333
a = 89.4 − 4.333·24 = −14.6
ŷ = −14.6 + 4.333·x

Predicted value

ŷ = −14.6 + 4.333·22.5 = 82.9

Residual

e = 81 − 82.9 = −1.9

Answer

e = −1.9

The point lies below the line.

9.Chi-square tests

Answer: χ² = 11.98

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: 100·40/160 = 25, 100·56/160 = 35, 100·64/160 = 40
staff: 60·40/160 = 15, 60·56/160 = 21, 60·64/160 = 24

Chi-square statistic

χ² = (34 − 25)²/25 + (29 − 35)²/35 + (37 − 40)²/40 + (6 − 15)²/15 + (27 − 21)²/21 + (27 − 24)²/24
χ² = 11.98

Answer

χ² = 11.98

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

10.Chi-square tests

Answer: df = 10

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 = (2 − 1)·(11 − 1) = 10

Answer

df = 10

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