unfried.
Streak:0 days XP:0

Formula sheet

Statistics

111 entries in 12 units. Free to use and share.

Jump to a unit (12 units)

Unit 1 Describing data

Population, sample, parameter and statistic

The population is everything the question is about, and the sample is the part measured. A parameter (μ⁠, σ⁠, p⁠) describes the population; a statistic (xˉ⁠, s⁠) is computed from the sample and estimates the parameter. A sample chosen by a chance device has no built-in lean; convenience and voluntary-response samples are biased at any size.

Taught in Samples, populations and bias

Mean

Definition. Also called average, sample mean.

xˉ
sample mean, in the data's unit
xi
the data values
n
number of values

Careful: One far value pulls the mean. For skewed data or outliers, report the median too.

Taught in Center: mean and median

Median

Sort the values. With n odd, the median is the middle value; with n even, it is the mean of the two middle values. It resists outliers because it depends only on the order of the values.

Taught in Center: mean and median

Combined mean of groups

Also called weighted mean.

xˉ
mean of the combined group
xˉ1,xˉ2
the two groups' means
n1,n2
the two groups' sizes

Applies: Combining any groups whose sizes and means you know.

Careful: Averaging the two means works only when the groups are the same size.

Taught in Center: mean and median

Quartiles and interquartile range

Definition. Also called IQR, five-number summary.

Q1
first quartile, the median of the lower half
Q3
third quartile, the median of the upper half

Careful: When n is odd, leave the median out of both halves. Software may use another method and give slightly different quartiles.

Taught in Spread: quartiles, IQR and box plots

Reading a box plot

The box runs from Q1 to Q3 with a line at the median, and the whiskers reach the smallest and largest values (or the last values inside the outlier fences, with outliers drawn as dots). Each whisker and each half of the box holds about a quarter of the data; a long piece means that quarter is spread out, not that it holds more values. A box plot cannot show gaps or two peaks.

Taught in Spread: quartiles, IQR and box plots

Sample standard deviation and variance

Also called SD, s.

s
sample standard deviation, in the data's unit
xi
the data values
xˉ
sample mean
n
number of values

Applies: The variance is s2⁠, in squared units. s reads as a typical distance of a value from the mean.

Careful: Divide by n−1⁠, not n⁠. The population SD σ divides by N⁠.

Taught in Standard deviation

Outlier fences (1.5 × IQR rule)

Q1,Q3
first and third quartiles
IQR
interquartile range, Q3−Q1

Applies: Values beyond a fence are flagged as outliers.

Careful: The rule flags values; it does not say they are mistakes. Delete a value only with a recorded cause.

Taught in Outliers and z-scores

z-score

Also called standardized value.

z
number of SDs from the mean (no unit)
x
the value
xˉ
mean of the data
s
standard deviation of the data

Applies: Comparing values on different scales, such as scores on two different exams.

Careful: A z-score is a distance in SDs, not a percent or a probability.

Taught in Outliers and z-scores

Linear transformation of data

Also called changing units.

k
multiplier (1.8 for °C to °F)
c
added constant (32 for °C to °F)
xˉ
mean
s
standard deviation

Applies: Any unit change of the form kx+c⁠. The median follows the mean's rule; the IQR follows the SD's.

Careful: Adding a constant never changes the SD or IQR. z-scores are unchanged.

Taught in Changing units

The mean minimizes squared distances

xi
the data values
c
any candidate center
xˉ
sample mean
n
number of values

Applies: Any list of numbers. The sum is smallest at c=xˉ⁠; the sum of absolute distances is smallest at the median.

Taught in Which center is closest?

Unit 2 Probability

Relative frequency and the law of large numbers

The relative frequency of an event is the number of trials in which it happened divided by the number of trials. Over many independent trials it settles near the event's probability. The count of hits does not settle near its expected value; only the share does, because later trials dilute early runs.

Taught in Probability as long-run frequency

General addition rule

Also called union, P(A or B).

P(A or B)
probability of A, B or both
P(A and B)
probability that both happen

Applies: Any two events. For mutually exclusive events the last term is 0.

Careful: Adding P(A)+P(B) alone counts the outcomes in both events twice.

Taught in Unions, complements and the addition rule

Conditional probability

Definition. Also called P(A given B).

P(A∣B)
probability of A given that B happened
P(A and B)
probability that both happen
P(B)
probability of B, more than 0

Careful: P(A∣B) and P(B∣A) have different denominators and usually differ. In a table, restrict to the condition's row or column.

Taught in Conditional probability from a table

Independent events

P(A∣B)
probability of A given B
P(A)
probability of A

Applies: Equivalent to P(A and B)=P(A) P(B)⁠. Check it from data by comparing the conditional share with the overall share.

Careful: Independent is not mutually exclusive. Exclusive events with positive probabilities are always dependent.

Taught in Independence, trees and the multiplication rule

Multiplication rule

Also called tree diagram, P(A and B).

P(A and B)
probability that both happen
P(A)
probability of A
P(B∣A)
probability of B given A

Applies: Any two events; multiply along each path of a tree and add the paths that make up an event. For independent events P(B∣A)=P(B)⁠.

Careful: Drawing without replacement changes the second branch's probabilities, so P(B∣A)≠P(B)⁠.

Taught in Independence, trees and the multiplication rule

Chance that a positive test is right

Also called Bayes' rule, positive predictive value, sensitivity, specificity.

P(has it∣+)
probability of the condition given a positive result
true positives
base rate × sensitivity, as a count per 1,000 people
false positives
(1 − base rate) × false-positive rate, per 1,000 people

Applies: Sensitivity is P(+∣has it)⁠; specificity is P(−∣doesn’t)⁠, which is 1 minus the false-positive rate.

Careful: The sensitivity is not the chance a positive is right. With a rare condition, most positives are false.

Taught in Bayes and diagnostic tests

Reliability in series and in parallel

Also called redundancy.

Rseries
reliability of a chain in which every component is needed
Rparallel
reliability of a pair in which one component is enough
Ri
reliability of component i, the probability it works
k
number of components in series

Applies: Series means every component is needed; parallel means one is enough. Treat a parallel block as one component inside a series chain.

Careful: Both rules assume components fail independently. A shared cause (one power supply, heat, wear) makes failures happen together, and the true reliability is lower.

Taught in Reliability of systems

Unit 3 Discrete random variables

Expected value of a discrete random variable

Definition. Also called mean of a random variable, E(X), mu_X.

E(X)
expected value, in the unit of X
x
a value X can take
P(X=x)
the probability of that value

Careful: The expected value is a long-run average, not the most likely value, and it need not be a value X can take.

Taught in Random variables and expected value

Variance and SD of a discrete random variable

Also called sigma_X, SD(X), Var(X).

Var(X)
variance of X⁠, in squared units
x
a value X can take
μ
the expected value E(X)
P(X=x)
the probability of that value

Applies: SD(X)=Var(X) is a typical distance of X from its mean, in X's unit.

Careful: Weight each squared distance by its probability; do not divide by n−1⁠, which is for data.

Taught in Spread of a random variable, and sums

Linear transformation of a random variable

E
expected value
a
multiplier
b
added constant
X
the random variable

Applies: Changing units, or a price that scales every value and adds a fixed fee.

Careful: Adding a constant b moves the mean and never changes the SD.

Taught in Spread of a random variable, and sums

Variance of a sum or difference (independent variables)

Also called variances add.

X,Y
independent random variables

Applies: X and Y are independent. Means add whether or not they are, E(X±Y)=E(X)±E(Y)⁠.

Careful: SDs do not add, and the variance of a difference is a sum, not a difference. Take the square root at the end.

Taught in Spread of a random variable, and sums

Binomial probability

Also called binomial distribution, B(n, p).

P(X=k)
the probability of exactly k successes
X
the number of successes
n
the fixed number of trials
k
number of successes, 0 to n
p
probability of success on each trial
(nk)
the number of ways to place k successes among n trials, n!k!(n−k)!

Applies: A fixed number of independent trials, each with two outcomes and the same chance of success.

Careful: Draws without replacement from a small lot (use the hypergeometric) and waits until a first success (use the geometric) are not binomial.

Taught in The binomial setting

Binomial mean and SD

μ
mean number of successes
σ
SD of the number of successes
n
number of trials
p
probability of success on each trial

Applies: X∼B(n,p)⁠.

Careful: "At least k" includes k itself: P(X≥k)=1−P(X≤k−1)⁠, and "at least one" is 1−P(X=0)⁠.

Taught in Binomial mean, SD and cumulative probabilities

Poisson probability

Also called Poisson distribution, Pois(lambda).

P(X=k)
the probability of exactly k events
X
the number of events in the interval
λ
rate, the mean number of events in the interval
k
number of events, 0,1,2,…

Applies: Independent events at a steady rate in a fixed time or space. The mean and the variance both equal λ⁠, so SD=λ⁠.

Careful: A count with a cap, or whose variance is far from its mean, is not Poisson. Scale λ to the interval (3 per hour is 6 per 2 hours).

Taught in The Poisson distribution

Geometric distribution

Also called waiting time, first success.

P(X=k)
the probability that the first success is trial k
X
the trial number of the first success
k
the trial on which the first success happens, 1,2,…
p
probability of success on each trial
E(X)
the mean number of trials, counting the success

Applies: Independent trials with the same p⁠, run until the first success. P(X≤k)=1−(1−p)k⁠.

Careful: Past failures don't shorten the wait; the expected further wait is 1/p from any point.

Taught in Waiting for the first success: the geometric distribution

Hypergeometric probability

Also called sampling without replacement, acceptance sampling.

P(X=k)
the probability of exactly k bad items in the sample
X
the number of bad items in the sample
N
number of items in the lot
K
number of bad items in the lot
n
sample size
k
number of bad items in the sample

Applies: A sample drawn without replacement from a lot whose size is known.

Careful: When the sample is under about a tenth of the lot, the binomial with p=K/N is close enough.

Taught in Sampling without replacement: acceptance sampling

Binomial mean from indicators

Ii
indicator of trial i⁠, 1 for a success and 0 otherwise
X
number of successes
E
expected value
n
number of trials
p
probability of success, E(Ii)

Applies: Any count written as a sum of indicators, independent or not. With independent trials, Var(X)=np(1−p)⁠.

Careful: The variance step needs independence; draws without replacement vary less than np(1−p)⁠.

Taught in Why the binomial mean is np

Counting uncertainty

Also called square-root rule, Poisson counting error.

N
a count of random, independent events
δN
its uncertainty, one SD

Applies: Counts of independent events such as radioactive decays. The relative uncertainty is 1/N⁠.

Careful: It applies to counts, not to rates or to measured lengths; for a rate, divide N by the counting time.

Taught in Lab: Counting background radiation

Unit 4 Continuous distributions and the normal

Probability density

Also called density curve, pdf.

A curve f(x)≥0 with total area 1. The chance that X lands in a range is the area under f over that range. A single value has probability 0, so P(X≤a)=P(X<a)⁠. The height f(a) is not a probability and can exceed 1.

Taught in Density curves: probability is area

Uniform distribution

Also called flat density.

f(x)
density height
a,b
the smallest and largest possible values

Applies: Every value between a and b is equally likely. A range's chance is its width times 1/(b−a)⁠.

Careful: Outside [a,b] the density is 0.

Taught in Density curves: probability is area

Exponential distribution

Also called exponential tail, survival function, waiting time.

P
probability
T
waiting time or lifetime
t
a time, at least 0
λ
rate (events or failures per unit time); the mean is 1/λ

Applies: Events happen at a steady rate with no memory (Poisson arrivals, random failures with no wear). The density is λe−λt and the median is ln⁡2/λ⁠.

Careful: Parts that wear out fail sooner as they age; the exponential does not fit them.

Taught in Waiting times: the exponential distribution

Memoryless property

P
probability
T
an exponential waiting time or lifetime
s
time already survived
t
further time

Applies: T is exponential. A survivor is as good as new.

Careful: It fails for anything that wears or ages; use another model for those.

Taught in Waiting times: the exponential distribution

Standardizing a normal value

Also called z-score for a normal model, standard normal.

z
value of the standard normal N(0,1)
x
a value of X
μ
mean of X
σ
SD of X

Applies: X∼N(μ,σ)⁠; then P(X<x)=Φ(z)⁠, the z table's area to the left.

Careful: A z-score is a distance in SDs, not a probability. Area to the right is 1−Φ(z)⁠; between two values, Φ(z2)−Φ(z1)⁠.

Taught in Standardizing: areas under the normal curve

Normal percentile

Also called inverse normal, cutoff value.

x
the percentile, in the variable's units
z
the standard normal value with the wanted area to its left
μ
mean
σ
SD

Applies: Find the value with a given share below it. For "the top 5%", use area 0.95 to the left.

Careful: Only for normal data. Check the shape first.

Taught in Percentiles: from an area back to a value

Reading a normal quantile plot

Also called normal probability plot, QQ plot.

Plot the i-th smallest of n values against the z with area (i−0.5)/n to its left. Close to a straight line means close to normal. Bending up at the right end means right skew; bending down at the left end, left skew; steeper than the line at both ends, heavy tails.

Taught in Is it normal? Normal quantile plots

Normal approximation to the binomial

Also called continuity correction.

P
probability
X
binomial count of successes
k
a whole number
n
number of trials
p
chance of success on each trial
Φ
standard normal area to the left

Applies: Both np≥10 and n(1−p)≥10⁠. For P(X≥k)⁠, take the area right of k−0.5⁠.

Careful: With fewer than 10 expected successes or failures, the bars are skewed; use the binomial formula.

Taught in The normal approximation to the binomial

Mean of a continuous random variable

Also called expected value of a density.

E(X)
mean of X
f(x)
density of X

Applies: Integrate over every possible value. Uniform on [a,b] gives (a+b)/2⁠; exponential gives 1/λ⁠.

Careful: The mean is not the peak of the density, and not its total area.

Taught in Means of densities by integration

Failure rates in series

Also called series system, MTTF.

λi
failure rate of part i⁠, one over its mean time to failure
λsystem
failure rate of the system
k
number of parts
MTTF
mean time to failure

Applies: Independent parts with exponential lifetimes; the system fails when any one part fails.

Careful: The MTTFs do not add or average. Wear-out and early failures break the constant rate.

Taught in Lifetimes and failure rates

Unit 5 Sampling distributions and the CLT

Sampling distribution

The distribution of a statistic's values over all possible random samples of the same size. It is a third picture, next to the population and one sample's data. It centers on the parameter for a random sample and narrows as the sample size grows.

Taught in Statistics vary from sample to sample

Standard error of a sample proportion

Also called SE of p-hat, mean of p-hat.

SE
standard error of p^⁠, the SD of its sampling distribution
p
population proportion
n
sample size

Applies: The sample proportion p^ has mean p and this SD over random samples of size n⁠. Quadrupling n halves the SE.

Careful: Doubling n does not halve the SE; it divides it by 2⁠.

Taught in The sampling distribution of a proportion

Normal model for a sample proportion

z
standard score of the sample proportion
p^
sample proportion
p
population proportion
n
sample size

Applies: Use it when np≥10 and n(1−p)≥10⁠, for a random sample.

Careful: With fewer expected successes or failures, the distribution of p^ is lumpy and skewed. Use the binomial distribution for the count instead.

Taught in The sampling distribution of a proportion

Standard error of the mean

Also called SE of x-bar, mean of x-bar.

SE
standard error of the mean, the SD of the sampling distribution of xˉ
σ
SD of single values in the population
n
sample size

Applies: The sample mean xˉ of n independent values has mean μ and this SD.

Careful: The SD of the data stays near σ however large the sample. Only the SE shrinks with n⁠.

Taught in The sampling distribution of a mean

Central limit theorem

Also called CLT.

N
normal distribution, written N(mean,SD)
xˉ
mean of a random sample of size n
μ
population mean
σ
population SD (finite)
n
sample size

Applies: For random samples from any population with a finite SD, when n is large. A normal population gives a normal xˉ at every n⁠.

Careful: It describes the sample mean, not the data, which keep the population's shape. Strongly skewed populations need n well above 30.

Taught in The central limit theorem

z-score for a sample mean

z
standard score of the sample mean
xˉ
sample mean
μ
population mean
σ
population SD
n
sample size

Applies: The sampling distribution of xˉ is close to normal (normal data, or the CLT). Then a normal area gives the chance.

Careful: For a single value, divide by σ⁠, not by the SE.

Taught in Using the CLT

Mean and SD of a total

Also called sum of independent values, load and capacity.

SD(total)
SD of the sum of n values
σ
SD of one value
n
number of values

Applies: The n values are independent. The total's mean is nμ⁠, and the CLT makes it close to normal for large n⁠.

Careful: SDs do not add to nσ⁠; variances add. Values that rise and fall together (a team boarding at once) are not independent.

Taught in Sums and totals

Variance of the sample mean

Var(xˉ)
variance of the sample mean
σ
SD of one value
n
sample size

Applies: The values are independent, so the variance of their sum is nσ2⁠; the factor 1n comes out squared.

Careful: Readings that share a drift or an offset are not independent, and their mean varies more than σ/n says.

Taught in Why the standard error is σ/√n

Unit 6 Confidence intervals

Confidence interval for a proportion

Also called one-proportion z interval, margin of error.

p^
sample proportion
z∗
standard normal critical value, 1.96 for 95%
n
sample size

Applies: A random sample or independent trials, with at least 10 successes and 10 failures.

Careful: The margin covers random sampling error only, not bias from nonresponse, opt-in samples or measurement.

Taught in An estimate with a margin: intervals for a proportion

Confidence level

The long-run share of intervals, over repeated random samples, that capture the parameter. A computed interval contains the parameter or it doesn't; 95% describes the method that made it. A 95% interval for a mean does not contain 95% of the data.

Taught in What 95% confidence means

Degrees of freedom and t critical values

Also called t star, invt.

df90%95%99%
42.1322.7764.604
91.8332.2623.250
191.7292.0932.861
291.6992.0452.756
t∗
t critical value for confidence 1−α
α
share of intervals that miss, 0.05 for 95%
n
sample size

Applies: The interval uses s from the sample in place of σ⁠.

Careful: Using z∗=1.96 with s from a small sample makes the interval too narrow; at df = 4 the 95% t∗ is 2.776.

Taught in When σ is unknown: the t distribution

Confidence interval for a mean

Also called one-sample t interval.

xˉ
sample mean
t∗
t critical value with n−1 degrees of freedom
s
sample standard deviation
n
sample size

Applies: A random sample or independent readings, and data without strong skew or outliers when n is small (about 30 or more tolerates moderate skew).

Careful: A narrow interval is not an accurate one. A systematic error shifts every reading, and the interval with them.

Taught in A t interval for a mean

What sets the width of an interval

The margin is t∗×s/n⁠. Higher confidence makes it wider, a larger s makes it wider, and four times the data halves it. More confidence at the same n always costs width.

Taught in What sets the width

Sample size for a margin of error

n
sample size, rounded up
z∗
standard normal critical value
E
target margin of error, as a proportion
p
planning value of the proportion, 0.5 if unknown

Applies: Planning a survey for a proportion. For a mean, use n=(z∗σ/E)2 with σ from past data.

Careful: The population size does not appear. A sample must be large, not a large share of the population.

Taught in Choosing a sample size

Prediction interval for one new value

xˉ
sample mean
t∗
t critical value with n−1 degrees of freedom
s
sample standard deviation
n
sample size

Applies: The question is about one new value, such as whether the next part meets a spec. The data must be nearly normal at any n⁠.

Careful: The confidence interval for the mean is far narrower and says nothing about single values.

Taught in One more part: prediction intervals

Unit 7 Hypothesis tests

p-value

The probability, computed assuming H0 is true, of a test statistic at least as extreme as the one observed. Two-sided tests count both tails.

Applies: Every test in this unit reports one, to 3 decimal places or as "less than 0.001".

Careful: It is not the probability that H0 is true, and 1−p is not the probability that Ha is true.

Taught in The p-value

Decision rule at significance level α

Also called statistically significant, reject H0.

Choose α before the data. If p≤α⁠, reject H0⁠; if p>α⁠, do not reject H0⁠.

Applies: α is usually 0.05; it is the chance of rejecting H0 when H0 is true (a Type I error).

Careful: Never write "accept H0". Not rejecting means the data are consistent with H0⁠, not that it is true.

Taught in Significance level and decisions

One-proportion z test

Also called z test for a proportion.

z
test statistic
p^
sample proportion
p0
proportion stated by H0
n
sample size

Applies: A random sample of independent trials with np0≥10 and n(1−p0)≥10⁠.

Careful: The SE uses p0⁠, not p^⁠. When np0<10⁠, use the exact binomial instead.

Taught in Testing a proportion

One-sample t test

Also called t test for a mean, t Stat.

t
test statistic
xˉ
sample mean
μ0
mean stated by H0
s
sample standard deviation
n
sample size
df
degrees of freedom

Applies: A random sample of independent values from near-normal data, or with n large.

Careful: Compare t with the t distribution with n−1 degrees of freedom, not the standard normal. A two-sided p-value doubles the one-tail area.

Taught in Testing a mean

Two-sided tests and confidence intervals

A two-sided test at level α rejects H0 ⁣:μ=μ0 exactly when μ0 lies outside the 100(1−α)% t interval for μ⁠.

Applies: Both use the same sample, SE and t∗ (a one-sample t test and t interval).

Careful: Choose a one-sided alternative only from the question, before seeing the data; picking the side afterward doubles the real false-alarm rate.

Taught in One side or two, and intervals as tests

Type I error, Type II error and power

TermMeaningChance
Type I errorreject a true H0α
Type II errorkeep a false H01 − power
Powerreject H0 when a stated alternative is truegrows with n and effect size

Taught in Errors and power

Chance of at least one false positive

Also called multiple comparisons, familywise error.

P
probability, with every null true
p
p-value of one test
α
significance level of each test
k
number of independent tests

Applies: k independent tests, every null hypothesis true.

Careful: The chance is not α⁠; it grows with k (0.642 for 20 tests at 0.05). Statistical significance says nothing about the size of an effect.

Taught in Significant is not the same as important

Unit 8 Comparing two groups

Paired t statistic

Also called paired t test, matched pairs t.

t
test statistic, a pure number
dˉ
mean of the differences
sd
SD of the differences
n
number of pairs

Applies: Each value in one set is matched with one in the other (same subject, same part, twins, before and after). Use df =n−1⁠; the interval is dˉ±t∗sd/n⁠.

Careful: The number of pairs is n⁠, not the total number of readings, and the two sets must not be analyzed as independent groups.

Taught in Paired data: test the differences

Standard error of a difference of two independent means

Also called two-sample t test, Welch t test.

SE
standard error of xˉ1−xˉ2
s1
SD of sample 1
s2
SD of sample 2
n1
size of sample 1
n2
size of sample 2

Applies: The two samples are independent. Then t=(xˉ1−xˉ2)/SE⁠, and the interval is xˉ1−xˉ2±t∗ SE⁠.

Careful: Variances add, not SDs. Report the df used, Welch's from software or the smaller n−1⁠, since the p-value depends on it.

Taught in Two independent samples

Welch degrees of freedom

df
degrees of freedom of the two-sample t
s1
SD of sample 1
s2
SD of sample 2
n1
size of sample 1
n2
size of sample 2

Applies: Two-sample t procedures for independent groups, as software computes them. The result lies between the smaller n−1 and n1+n2−2⁠.

Careful: The by-hand shortcut, the smaller n−1⁠, gives larger p-values; say which df you used.

Taught in Two independent samples

Overlapping confidence intervals

Two 95% intervals that do not overlap mean a significant difference at 0.05. Overlapping intervals can still come with a significant difference, because the difference has the smaller standard error SE12+SE22⁠. Judge a comparison by the interval for the difference.

Taught in Do overlapping intervals mean no difference?

Two-proportion z test

Also called pooled proportion.

z
test statistic, a pure number
p^1
sample proportion in group 1
p^2
sample proportion in group 2
p^
pooled proportion, (x1+x2)/(n1+n2)
n1
size of group 1
n2
size of group 2

Applies: Testing H0 ⁣:p1=p2 with independent random samples or random assignment, and at least 10 successes and 10 failures in each group.

Careful: The confidence interval for p1−p2 does not pool; it uses p^1(1−p^1)/n1+p^2(1−p^2)/n2⁠.

Taught in Two proportions

Relative risk

Also called risk ratio, relative risk reduction, absolute risk difference.

RR
relative risk, a pure number
p^treatment
event rate in the treated group
p^control
event rate in the control group

Applies: The relative cut is 1−RR⁠; the absolute difference is p^control−p^treatment⁠, and the number needed to treat is 1 over that difference.

Careful: A relative cut is not a drop in percentage points. Aspirin's 42% relative cut is 0.91 points, from 2.17% to 1.26%.

Taught in Two proportions

Choosing a two-group procedure

DataOne groupTwo groups
Measurementone-sample tpaired t if matched, else two-sample t
Yes/noone-proportion ztwo-proportion z

Taught in Which procedure?

Random assignment and random sampling

Random assignment of subjects to groups supports a causal conclusion about the treatment. Random sampling from a population supports generalizing to that population. An observational comparison, where subjects choose their group, shows association only.

Taught in Randomized comparisons and what they prove

Bias of one instrument against another

Read the same parts with both instruments and run a paired t test and interval on the differences. The mean difference estimates one instrument's bias relative to the other. A shared error cancels in the differences; only references of known size reveal it.

Taught in Comparing two gauges

Unit 9 Chi-square tests

Expected count in a goodness-of-fit test

E
expected count for category i
n
total number of observations
pi
the model's probability for category i

Applies: The model gives each category a probability, fixed or estimated.

Careful: Expected counts are averages and are often fractions; do not round them to whole numbers.

Taught in Observed against expected: the chi-square statistic

Chi-square statistic

Also called chi-squared, Pearson chi-square, χ².

χ2
the chi-square statistic, a pure number
O
observed count in a category or cell
E
expected count in that category or cell

Applies: Goodness of fit, independence and homogeneity tests, summing over every category or cell.

Careful: Use counts, never percentages or proportions; the same percentages from more data give a larger χ².

Taught in Observed against expected: the chi-square statistic

Chi-square critical values

The χ² value with that much area to its right. Reject H0 at level α when χ² is above the α column for its df. The p-value is always the right-tail area.

df0.050.01
13.8416.635
25.9919.210
37.81511.345
49.48813.277
511.07015.086
612.59216.812

Taught in The chi-square distribution and p-values

Degrees of freedom for goodness of fit

Also called df, chi-square df.

df
degrees of freedom of the χ² test
k
number of categories, after combining small ones
m
number of parameters estimated from the data

Applies: A goodness-of-fit test; m=0 when the model's probabilities are fixed in advance, m=1 for a Poisson λ taken from the data.

Careful: The sample size never enters df.

Taught in Fitting a model with an estimated parameter

Expected count in a two-way table

E
expected count in a cell
R
the cell's row total
C
the cell's column total
N
grand total

Applies: Tests of independence and of homogeneity; it is the count predicted if the row and column variables are unrelated.

Careful: The expected counts keep the table's row and column totals; check that each row of them adds up.

Taught in Two-way tables: testing independence

Degrees of freedom for a two-way table

df
degrees of freedom of the χ² test
r
number of rows
c
number of columns

Applies: Tests of independence and homogeneity.

Careful: It is not cells minus one; the row and the column totals are both fixed.

Taught in Two-way tables: testing independence

Expected-count condition

Also called large counts condition.

The χ² curve gives trustworthy p-values when every expected count is at least 5 (a few between 1 and 5 are tolerated in larger tables). The condition is on expected counts, not observed ones; an observed 0 is fine. When it fails, combine categories or collect more data.

Taught in Conditions, homogeneity, and what χ² cannot say

Test of independence or test of homogeneity

One random sample with two categorical variables recorded is a test of independence (H0 the variables are independent). A separate sample from each group with one variable recorded is a test of homogeneity (H0 the groups have the same distribution). The expected counts, χ² and df are computed the same way. Neither shows cause.

Taught in Conditions, homogeneity, and what χ² cannot say

A 2 × 2 chi-square is the square of z

χ2
χ² statistic of a 2 × 2 table, df 1
z
pooled two-proportion z statistic for the same counts

Applies: Any 2 × 2 table; the χ² p-value equals the two-sided z p-value.

Careful: χ² loses the sign of z, so it cannot give a one-sided p-value.

Taught in Why a 2 × 2 chi-square equals z²

Unit 10 Correlation and regression

Correlation coefficient

Definition. Also called r, Pearson correlation.

r
correlation, a pure number from −1 to 1
n
number of points
zx
z-score of a point's x⁠, (x−xˉ)/sx
zy
z-score of a point's y⁠, (y−yˉ)/sy

Careful: r measures straight-line fit only. A strong curve can have r near 0, and r says nothing about how steep the line is or about cause.

Taught in Correlation

Residual

Definition.

e
residual of one point, in the unit of y
y
observed value
y^
value the line predicts at that point's x

Careful: Observed minus predicted, in that order. A point above the line has a positive residual.

Taught in The least-squares line

Least-squares slope

Also called regression slope, b.

b
slope, in y units per x unit
r
correlation
sy
SD of the response
sx
SD of the explanatory variable

Applies: Predicting y from x by least squares, which minimizes the sum of squared vertical residuals.

Careful: Predicting x from y gives a different line. Put the SD of the response on top.

Taught in Slope, intercept and r²

Least-squares intercept

a
intercept, the line's height at x=0
yˉ
mean of the response
b
least-squares slope
xˉ
mean of the explanatory variable

Applies: It makes the line pass through the point of means, (xˉ,yˉ)⁠.

Careful: When x=0 lies outside the data, the intercept places the line but describes no real case.

Taught in Slope, intercept and r²

Coefficient of determination

Definition. Also called r squared, r².

r
correlation

Careful: r² is the fraction of the variation in y the line accounts for, not the share of points on the line and not a share caused by x⁠.

Taught in Slope, intercept and r²

Regression to the mean in standard units

z^y
predicted y⁠, in SDs from its mean
r
correlation
zx
the given x⁠, in SDs from its mean

Applies: Any least-squares line written in standard units. With ∣r∣<1 the prediction is nearer the mean than zx⁠.

Careful: Regression to the mean needs no cause. Compare with a randomized control group before crediting a treatment.

Taught in Regression to the mean and extrapolation

t test for the slope

t
test statistic for H0 ⁣:β=0
b
sample slope
SEb
standard error of the slope, from the output table
n
number of points

Applies: The relationship is linear, the scatter is about equal at every x⁠, the residuals are independent and roughly normal.

Careful: df is n−2⁠, not n−1⁠. A tiny p-value says β≠0⁠, not that the slope is large.

Taught in Inference for the slope

Confidence interval for the slope

b
sample slope
t∗
t critical value with n−2 df
SEb
standard error of the slope

Applies: The same conditions as the slope test. Cars, 95%, t∗=2.011 for df 48, gives 3.10 to 4.77 ft per mph.

Careful: The interval is about the population slope β⁠, the average trend, not about individual points.

Taught in Inference for the slope

Least-squares slope through the origin

m
slope of y^=mx
xi
the x values
yi
the y values

Applies: Fitting a line forced through (0,0)⁠, from setting S′(m)=0 for S(m)=∑(yi−mxi)2⁠.

Careful: It is not ∑yi/∑xi or the average of yi/xi⁠.

Taught in Why least squares gives these formulas

Unit 11 One-way ANOVA

Chance of at least one false alarm

Also called familywise error rate, multiple comparisons.

P
probability of at least one false alarm among the m tests
α
significance level of each test
m
number of tests; k(k−1)/2 for every pair of k groups

Applies: All m nulls are true and the tests are independent. Three groups tested in pairs at 0.05 give 0.143.

Careful: Pairwise tests that share a group are not fully independent, so treat this as a guide. Adding mα overstates it and can pass 1.

Taught in Why not three t tests?

Mean squares

Also called MSB, MSW, mean square between, mean square within.

MSB
mean square between groups
MSW
mean square within groups, the pooled variance
SSB
between-groups sum of squares
SSW
within-groups sum of squares
k
number of groups
N
number of values in all

Applies: Each is a variance. With equal group sizes, MSW is the average of the group variances.

Careful: Average the variances, not the SDs, and divide by the df, not by the number of groups or values.

Taught in Between-group and within-group variation

F statistic

Also called ANOVA F, F ratio.

F
F statistic, a pure number
MSB
mean square between groups
MSW
mean square within groups

Applies: Near 1 when all population means are equal; well above 1 when the group means differ more than the within-group scatter explains.

Careful: A large F does not say which means differ, or that all of them do. Use follow-up comparisons.

Taught in Between-group and within-group variation

ANOVA sums of squares

Also called ANOVA table, SSB, SSW.

SSB
between-groups sum of squares, on k−1 df
SSW
within-groups sum of squares, on N−k df
ni
size of group i
xˉi
mean of group i
xˉ
grand mean of all values
si
SD of group i

Applies: Fill the table row by row, then MS = SS/df and F = MSB/MSW.

Careful: The grand mean is the mean of all values, which equals the average of the group means only when the groups have equal sizes.

Taught in The ANOVA table

ANOVA p-value

The area to the right of the observed F under the F curve with df k−1 and N−k⁠. Only the right tail counts, because unequal means make F larger. The 0.05 cutoff for df 2 and 27 is 3.354; for df 4 and 95 it is 2.467.

Taught in The ANOVA table

Bonferroni correction

Also called multiple comparisons, follow-up tests, post hoc tests.

padj
adjusted p-value, capped at 1
m
number of comparisons
p
unadjusted p-value of one comparison

Applies: After a significant F, compare pairs and call a pair significant when padj<α⁠, or equally when p<α/m⁠. The m comparisons together have at most an α chance of any false alarm.

Careful: Divide the cutoff, multiply the p-value; never divide the p-value.

Taught in Conditions and what F tells you

Conditions for one-way ANOVA

Independent random samples or random assignment; roughly normal values in each group, with no strong skew or outliers; and similar spreads. Rule of thumb for spreads, the largest group SD is at most twice the smallest. Beyond that, the p-value can be off.

Taught in Conditions and what F tells you

Partition of the sum of squares

SST
total sum of squares, around the grand mean, on N−1 df
SSW
within-groups sum of squares
SSB
between-groups sum of squares

Applies: Holds for any grouped data, whatever the means. The df add too, (N−1)=(N−k)+(k−1)⁠.

Careful: It is an identity about one dataset, not a rule about variances of random variables. The mean squares do not add.

Taught in SST = SSB + SSW, and F = t²

F equals t squared for two groups

F
one-way ANOVA F for two groups, df 1 and 2n−2
t
pooled two-sample t statistic

Applies: Two groups, shown here for equal sizes n⁠. The two tests give the same p-value, since the right tail of F holds both tails of t.

Careful: With three or more groups there is no single t; F pools all the group means at once.

Taught in SST = SSB + SSW, and F = t²

Unit 12 Experiments and measurement

Experiment and random assignment

In an experiment the researchers impose the treatment. Random assignment lets a chance device decide which unit gets which treatment, so lurking variables balance between groups on average and a difference can be read as caused by the treatment. Random sampling, a different step, is what lets results generalize to a population.

Taught in Observational studies and experiments

Blocking and blinding

Also called matched pairs, double-blind, placebo.

Blocking compares treatments inside groups of alike units, randomizing within each block, so differences between blocks cancel; a block of two is a matched pair. Blinding keeps whoever could be influenced from knowing who got which treatment; double-blind covers the subjects and the people measuring them.

Taught in Designing experiments: control, blocking, blinding

Random and systematic error

Also called precision, accuracy.

Random error scatters readings both ways and averages out as 1/n⁠; precision is how closely repeats agree. A systematic error shifts every reading the same way, stays in the mean and does not show in the standard error; only calibration against a standard removes it.

Taught in Random and systematic error

Standard uncertainty of a mean

Also called mean ± standard error, error bar.

δx
standard uncertainty of the mean, one standard error
s
SD of the n repeated readings
n
number of readings

Applies: Report x=xˉ±δx for repeated independent readings. Round δx to one significant figure and xˉ to the same decimal place.

Careful: The SD s is the scatter of single readings, not the uncertainty of their mean. Neither covers a systematic error.

Taught in Reporting a measurement: mean ± standard error

Adding in quadrature (sums and differences)

Also called uncertainty of a sum, uncertainty of a difference, propagation of error.

q
x+y or x−y
δq
uncertainty of q
δx
uncertainty of x
δy
uncertainty of y

Applies: The errors in x and y are independent. It holds for differences as well as sums.

Careful: Errors from one shared cause add straight, δx+δy⁠, which is also the worst case. Never subtract uncertainties.

Taught in Uncertainty in sums and differences

Relative uncertainty of a product or quotient

Also called relative uncertainty, percent uncertainty.

q
xy or x/y
δq
uncertainty of q
δx
uncertainty of x
δy
uncertainty of y

Applies: The readings x and y are independent. Exact constants such as 4π2 add nothing.

Careful: Sums and differences use absolute uncertainties, not relative ones.

Taught in Uncertainty in products, quotients and powers

Uncertainty of a power

q
xn
δq
uncertainty of q
n
power
δx
uncertainty of x

Applies: One reading is raised to a power. A square doubles the relative uncertainty, and a square root halves it.

Careful: The factors of x⋅x are one reading, not independent ones, so don't add them in quadrature.

Taught in Uncertainty in products, quotients and powers

Propagating uncertainty with a derivative

Also called linear error propagation.

δf
uncertainty of f(x)
f′(x)
derivative of f at the reading
δx
uncertainty of the reading x

Applies: δx is small enough that f looks straight across x±δx⁠. For several independent inputs, add the partial contributions in quadrature.

Careful: It fails near a maximum or minimum of f⁠, where f′(x)=0⁠, and for a wide δx⁠.

Taught in Propagating uncertainty with derivatives

Control limits for a chart of means

Also called control chart, 3-sigma limits.

μ
process mean when working normally
σ
SD of single parts from the process
n
parts in each sample

Applies: A working process puts a sample mean outside these limits with chance 0.0027, about once in 370 points.

Careful: Control limits come from the process's own variation. Specification limits come from the customer and apply to single parts.

Taught in Is the process in control? Control charts