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 to the right of z = 0.8078

Drag z so that the shaded area under the standard normal curve, to the right of z, is 0.8078. Find z to two decimals.

A = 0.8078
z =
2.Normal distributionHard
10 cm0X − Y?

The heights X of men and Y of women in a group are independent and normal: X has mean 180 cm and standard deviation 10 cm, Y has mean 170 cm and standard deviation 12 cm. Find the probability P that X is greater than Y. Round z to two decimals.

μX = 180 cm, σX = 10 cmμY = 170 cm, σY = 12 cm
P =
3.Confidence intervalsMedium
x̄E₁ = 11.499%, n = 25x̄E₂ = ?90%, n = 50

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

99%n₁ = 25E₁ = 11.490%n₂ = 50
E₂ =
4.Confidence intervalsHard
n = 30Lσ = ?s = 5.995%

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

n = 30s = 5.9 µmχ² = 16.047, 45.722
σ = µm
5.Hypothesis tests & confidence intervalsMedium
−2.1792.179t = ?df = 12

Two teaching methods are compared. Group 1: 6 students, mean score 119, standard deviation 4. Group 2: 8 students, mean score 116.2, standard deviation 3. Assume equal population variances and use the pooled two-sample t test. Find the test statistic t for H₀: μ₁ = μ₂, taking the difference as x̄₁ − x̄₂ (group 1 minus group 2).

n₁ = 6x̄₁ = 119s₁ = 4n₂ = 8x̄₂ = 116.2s₂ = 3
t =
6.Hypothesis tests & confidence intervalsHard
σ = 8, n = ?x̄ − Ex̄ + Ex̄E = 0.590%

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

σ = 8E = 0.590%
n =
7.Linear regression & correlationMedium
xy294176278351043xy5102040

The table gives 5 paired observations of x = load in kN and y = extension in mm. Find the coefficient of determination r² of the least-squares line.

n = 5
r² =
8.Linear regression & correlationHard
xy128222321417517xy242025x = 4.5

The table gives 5 paired observations of x = car age in years and y = price in k€. Use the least-squares line ŷ = a + b·x. A new observation (4.5, 15) is made. Find its residual e = y − ŷ.

n = 5(4.5, 15)
e =
9.Chi-square testsMedium
no defectminormajorTotalday shift12312164night shift13333177Total256452141

The contingency table shows observed counts. For a chi-square test of independence, find the expected count E for the cell “night shift, major”.

row total = 77column total = 52N = 141
E =
10.Chi-square testsHard
yesnoTotalplant A142640plant B2773100plant C194160Total60140200dfα = 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 = 2003 × 2α = 0.01
χ² =

3Solutions

1.Normal distribution

Answer: z = −0.87

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.8078 = 0.1922

Read the z-table backwards

Find 0.1922 inside the table and read off z.

z = −0.87

Answer

z = −0.87
2.Normal distribution

Answer: P = 0.7389

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

μ = 180 − 170 = 10 cm, σ = 15.62 cm

Standardise

z = (0 − 10)/15.62 = −0.64

Probability

P = 1 − Φ(−0.64) = 0.7389

Answer

P = 0.7389
3.Confidence intervals

Answer: E₂ = 5.148

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.645/2.576)·√(25/50) = 0.4515

New margin

E₂ = 11.4·0.4515 = 5.148

Answer

E₂ = 5.148
4.Confidence intervals

Answer: σ = 7.931 µ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² = 29·5.9² = 1009

Limits for σ²

1009/45.722 = 22.08
1009/16.047 = 62.91

Limit for σ

σ = √62.91 = 7.931 µm

Answer

σ = 7.931 µm

95% interval for σ: [4.699, 7.931] µm.

5.Hypothesis tests & confidence intervals

Answer: t = 1.502

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

Pooled variance

sp² = (5·4² + 7·3²)/12 = 11.92
sp = 3.452

Standard error

SE = 3.452·√(1/6 + 1/8) = 1.864

Test statistic

t = (119 − 116.2)/1.864 = 1.502

Answer

t = 1.502

With df = 12, the two-sided 5% critical value is 2.179; |t| is smaller, so H₀ is not rejected.

6.Hypothesis tests & confidence intervals

Answer: n = 693

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 = (1.645·8/0.5)² = 692.7

Round up

n = 693

Answer

n = 693
7.Linear regression & correlation

Answer: r² = 0.9984

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
ȳ = 131/5 = 26.2

Sums of squares and products

Sxx = Σ(x − x̄)² = 40
Sxy = Σ(x − x̄)(y − ȳ) = 172
Syy = Σ(y − ȳ)² = 740.8

Coefficient of determination

r² = 172²/(40·740.8) = 0.9984

Answer

r² = 0.9984

About 99.84% of the variation in y is explained by the line.

8.Linear regression & correlation

Answer: e = −1.95

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̄ = 15/5 = 3
ȳ = 105/5 = 21

Sums of squares and products

Sxx = Σ(x − x̄)² = 10
Sxy = Σ(x − x̄)(y − ȳ) = −27

Regression line

b = −27/10 = −2.7
a = 21 − (−2.7)·3 = 29.1
ŷ = 29.1 − 2.7·x

Predicted value

ŷ = 29.1 + (−2.7)·4.5 = 16.95

Residual

e = 15 − 16.95 = −1.95

Answer

e = −1.95

The point lies below the line.

9.Chi-square tests

Answer: E = 28.4

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 count

E = 77·52/141 = 28.4

Answer

E = 28.4
10.Chi-square tests

Answer: χ² = 0.9841

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: 12, 28
plant B: 30, 70
plant C: 18, 42

Chi-square statistic

χ² = (14 − 12)²/12 + (26 − 28)²/28 + (27 − 30)²/30 + (73 − 70)²/70 + (19 − 18)²/18 + (41 − 42)²/42
χ² = 0.9841

Decision

df = 2, χ²crit = 9.210
0.9841 < 9.210

Answer

χ² = 0.9841

χ² is below the critical value, so H₀ is not rejected: there is no significant evidence of a relationship.

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