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

The battery lifetimes are normally distributed with mean 500 h and standard deviation 40 h. What fraction lies between 452 and 542 h? Give P as a decimal.

μ = 500σ = 40x1 = 452x2 = 542
P =
2.Normal distributionHard
μ = 250x = ?95%

The bag weights are normally distributed with mean 250 g and standard deviation 5 g. Find the value x below which 95% of them lie (the 95th percentile).

μ = 250σ = 5P = 95%
x = g
3.Confidence intervalsMedium
n = 10, s = 3LUx̄ = 92E = ?99%

A sample of 10 items has mean 92 and standard deviation s = 3. The population is roughly normal. Find the margin of error E of a 99% confidence interval for the mean.

n = 10x̄ = 92s = 399%t(9) = 3.25
E =
4.Confidence intervalsHard
n = 10Lσ = ?s = 3.795%

The diameters of 10 machined shafts have a sample standard deviation of 3.7 µm. Assuming the diameters are normally distributed, find the upper limit σ of the 95% confidence interval for the population standard deviation. With df = 9, 2.5% of the χ² distribution lies below 2.7 and 2.5% lies above 19.023.

n = 10s = 3.7 µmχ² = 2.7, 19.023
σ = µm
5.Hypothesis tests & confidence intervalsMedium
−1.94p = ?

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

μ₀ = 100σ = 20n = 100x̄ = 96.12H₁: μ < μ₀
p =
6.Hypothesis tests & confidence intervalsHard
z −1.64501.645

A sample of 25 measurements has mean 98.8. The population standard deviation is 15. Find the upper limit U of the 90% confidence interval for the mean.

x̄ = 98.8σ = 15n = 2590%
U =
7.Linear regression & correlationMedium
xy122219317416515xy241520

The table gives 5 paired observations of x = car age in years and y = price in k€. Their sums are given. Find Pearson's correlation coefficient r from these sums.

n = 5Σx = 15Σy = 89Σx² = 55Σy² = 1615Σxy = 250
r =
8.Linear regression & correlationHard
xy2314366408481055xy510304050x = 7

The table gives 5 paired observations of x = advertising spend in k€ and y = sales in k€. Use the least-squares line ŷ = a + b·x. Predict ŷ for x = 7.

n = 5x = 7
ŷ =
9.Chi-square testsMedium
busbikecarTotalstudents35252080staff45152080Total804040160

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
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 checks whether counts in 9 categories follow a Poisson distribution whose mean is estimated from the same data. Using the table, find the critical value χ²crit at significance level α = 0.01.

α = 0.01
χ²crit =

3Solutions

1.Normal distribution

Answer: P = 0.7381

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₁ = (452 − 500)/40 = −1.2
z₂ = (542 − 500)/40 = 1.05

Area between

P = Φ(1.05) − Φ(−1.2) = 0.8531 − 0.1151 = 0.7381

Answer

P = 0.7381
2.Normal distribution

Answer: x = 258.2 g

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.95 → z = 1.645

Back to x

x = 250 + 1.645·5 = 258.22 g

Answer

x = 258.22 g
3.Confidence intervals

Answer: E = 3.083

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 = 9, t = 3.25

Margin of error

E = 3.25·3/√10 = 3.083

Answer

E = 3.083
4.Confidence intervals

Answer: σ = 6.755 µm

Interval for a variance: (n − 1)s²/σ² has a χ² distribution with n − 1 degrees of freedom. The 95% interval for σ² runs from (n − 1)s² divided by the upper χ² value (2.5% above it) to (n − 1)s² divided by the lower χ² value (2.5% below it); the interval for σ is the square root of both limits. It is not symmetric around s.

Sum of squares

(n − 1)s² = 9·3.7² = 123.2

Limits for σ²

123.2/19.023 = 6.477
123.2/2.7 = 45.63

Limit for σ

σ = √45.63 = 6.755 µm

Answer

σ = 6.755 µm

95% interval for σ: [2.545, 6.755] µm.

5.Hypothesis tests & confidence intervals

Answer: p = 0.02619

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 = 20/√100 = 2
z = (96.12 − 100)/2 = −1.94

Tail area

Φ(1.94) = 0.9738
1 − Φ(1.94) = 0.0262

p-value

p = 0.02619

Answer

p = 0.02619

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

6.Hypothesis tests & confidence intervals

Answer: U = 103.7

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

Margin of error

E = 1.645·15/√25 = 4.935

Interval limit

U = 98.8 + 4.935 = 103.7

Answer

U = 103.7
7.Linear regression & correlation

Answer: r = −0.9687

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 = 250 − 15·89/5 = −17
Sxx = 55 − 15²/5 = 10
Syy = 1615 − 89²/5 = 30.8

Correlation coefficient

r = −17/√(10·30.8) = −0.9687

Answer

r = −0.9687
8.Linear regression & correlation

Answer: ŷ = 45

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
ȳ = 210/5 = 42

Sums of squares and products

Sxx = Σ(x − x̄)² = 40
Sxy = Σ(x − x̄)(y − ȳ) = 120

Regression line

b = 120/40 = 3
a = 42 − 3·6 = 24
ŷ = 24 + 3·x

Prediction

ŷ = 24 + 3·7 = 45

Answer

ŷ = 45
9.Chi-square tests

Answer: χ² = 3.75

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: 80·80/160 = 40, 80·40/160 = 20, 80·40/160 = 20
staff: 80·80/160 = 40, 80·40/160 = 20, 80·40/160 = 20

Chi-square statistic

χ² = (35 − 40)²/40 + (25 − 20)²/20 + (20 − 20)²/20 + (45 − 40)²/40 + (15 − 20)²/20 + (20 − 20)²/20
χ² = 3.75

Answer

χ² = 3.75

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

10.Chi-square tests

Answer: χ²crit = 18.48

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 = 9 − 1 − 1 = 7

Table

χ²crit(df = 7, α = 0.01) = 18.475

Answer

χ²crit = 18.475

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

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