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
−3−2−10123zshaded area between −z and z = 0.4647

Drag z so that the shaded area between −z and z under the standard normal curve is 0.4647. Find z to two decimals.

A = 0.4647
z =
2.Normal distributionHard
μ = 500x = ?75%

The battery lifetimes are normally distributed with mean 500 h and standard deviation 40 h. Find the value x below which 75% of them lie (the 75th percentile).

μ = 500σ = 40P = 75%
x = h
3.Confidence intervalsMedium
n = 15, s = 14LUx̄ = 13.5E = ?99%

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

n = 15x̄ = 13.5s = 1499%t(14) = 2.977
E =
4.Confidence intervalsHard
n = 15σ = ?Us = 1095%

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

n = 15s = 10 µmχ² = 5.629, 26.119
σ = µm
5.Hypothesis tests & confidence intervalsMedium
1.66p = ?

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

μ₀ = 120σ = 4n = 64x̄ = 120.83H₁: μ > μ₀
p =
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 100; the standard deviation is known to be 10. In reality the mean is 198.8. Find the probability of a Type II error β in percent.

μ₀ = 200μ = 198.8σ = 10n = 100α = 0.05
β = %
7.Linear regression & correlationMedium
xy1553575687719811191xy5106080

The table gives 6 paired observations of x = hours studied and y = exam score. Their sums are given. Find Pearson's correlation coefficient r from these sums.

n = 6Σx = 36Σy = 423Σx² = 286Σy² = 30781Σxy = 2793
r =
8.Linear regression & correlationHard
xy16681996221102513128146xy2025100150x = 17.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. Predict ŷ for x = 17.5.

n = 5x = 17.5
ŷ =
9.Chi-square testsMedium
no defectminormajorTotalday shift20202060night shift702525120Total904545180

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 = 1802 × 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 6 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: z = 0.62

From an area back to z: Φ(z) is the area to the left of z. For a left-tail area A, find z with Φ(z) = A in the table. A right-tail area A means Φ(z) = 1 − A. A central area A between −z and z leaves (1 − A)/2 in each tail, so Φ(z) = (1 + A)/2. For a value x, use x = μ + zσ.

Area to the left of z

Φ(z) = (1 + 0.4647)/2 = 0.7324

Read the z-table backwards

Find 0.7324 inside the table and read off z.

z = 0.62

Answer

z = 0.62
2.Normal distribution

Answer: x = 527 h

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.75 → z = 0.6745

Back to x

x = 500 + 0.6745·40 = 526.98 h

Answer

x = 526.98 h
3.Confidence intervals

Answer: E = 10.76

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 = 14, t = 2.977

Margin of error

E = 2.977·14/√15 = 10.76

Answer

E = 10.76
4.Confidence intervals

Answer: σ = 7.321 µ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² = 14·10² = 1400

Limits for σ²

1400/26.119 = 53.6
1400/5.629 = 248.7

Limit for σ

σ = √53.6 = 7.321 µm

Answer

σ = 7.321 µm

95% interval for σ: [7.321, 15.77] µm.

5.Hypothesis tests & confidence intervals

Answer: p = 0.04846

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 = 4/√64 = 0.5
z = (120.83 − 120)/0.5 = 1.66

Tail area

Φ(1.66) = 0.9515
1 − Φ(1.66) = 0.0485

p-value

p = 0.04846

Answer

p = 0.04846

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

6.Hypothesis tests & confidence intervals

Answer: β = 67.18 %

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 = 10/√100 = 1
x̄c = 200 − 1.645·1 = 198.4

z under the true mean

z = (198.4 − 198.8)/1 = −0.445

Type II error

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

Answer

β = 67.18%
7.Linear regression & correlation

Answer: r = 0.9839

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 = 2793 − 36·423/6 = 255
Sxx = 286 − 36²/6 = 70
Syy = 30781 − 423²/6 = 959.5

Correlation coefficient

r = 255/√(70·959.5) = 0.9839

Answer

r = 0.9839
8.Linear regression & correlation

Answer: ŷ = 81.55

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̄ = 110/5 = 22
ȳ = 551/5 = 110.2

Sums of squares and products

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

Regression line

b = 573/90 = 6.367
a = 110.2 − 6.367·22 = −29.87
ŷ = −29.87 + 6.367·x

Prediction

ŷ = −29.87 + 6.367·17.5 = 81.55

Answer

ŷ = 81.55
9.Chi-square tests

Answer: χ² = 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 α.

Expected counts

day shift: 60·90/180 = 30, 60·45/180 = 15, 60·45/180 = 15
night shift: 120·90/180 = 60, 120·45/180 = 30, 120·45/180 = 30

Chi-square statistic

χ² = (20 − 30)²/30 + (20 − 15)²/15 + (20 − 15)²/15 + (70 − 60)²/60 + (25 − 30)²/30 + (25 − 30)²/30
χ² = 10

Answer

χ² = 10

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

10.Chi-square tests

Answer: χ²crit = 15.09

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 = 6 − 1 = 5

Table

χ²crit(df = 5, α = 0.01) = 15.086

Answer

χ²crit = 15.086

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

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