Introductory statistics

Statistics Formula Sheet

Choose a calculation by the job: describe a data set, model a random outcome, estimate a parameter or check a claim. Keep the assumptions near the formula when you work.

On this page

Find a formula

Open a formula for its definition and a worked example.

Summarize center and spread

  • Arithmetic mean of a samplex̄ = (∑xᵢ)/n

    What it does

    The sample mean divides the total of all observations by their count. Every observation contributes equally.

    Worked example

    Find the mean of 3, 5, 8, 12.

    1. Add the observations: 3 + 5 + 8 + 12 = 28.
    2. Divide by 4 to obtain x̄ = 7.
    Link to this example
  • Population variance and standard deviationσ² = (∑(xᵢ − μ)²)/N; σ = √(σ²)Use the population mean μ and population size N.

    What it does

    Population variance averages squared deviations from the population mean. Its square root restores the original units.

    Worked example

    Treat 1, 3, 5 as an entire population. Find variance and standard deviation.

    1. The population mean is 3 and the squared deviations are 4, 0, 4.
    2. Divide by 3 to get σ² = 8/3. Then σ = √(8/3).
    Link to this example
  • Sample variance and standard deviations² = (∑(xᵢ − x̄)²)/(n − 1); s = √(s²)Use a sample of size n > 1.

    What it does

    Sample variance estimates population variance by dividing squared deviations from the sample mean by n − 1. Sample standard deviation is its square root.

    Worked example

    Treat 2, 4, 6 as a sample. Find s² and s.

    1. The sample mean is 4, and squared deviations total 8.
    2. Divide by n − 1 = 2 to get s² = 4 and s = 2.
    Link to this example
  • Spread of the middle halfIQR = Q₃ − Q₁

    What it does

    The interquartile range is the difference between the upper and lower quartiles. It measures the spread of the central half of the data.

    Worked example

    A data set has Q₁ = 12, median = 19, and Q₃ = 27. Find the IQR.

    1. Use the two quartiles as endpoints of the middle half.
    2. Compute 27 − 12 = 15.
    Link to this example
  • Standardize a valuez = (x − μ)/σFor σ > 0, z counts signed standard deviations from the mean.

    What it does

    A z-score gives the signed distance from the mean in standard deviations. A positive standard deviation is required.

    Worked example

    A score of 64 comes from a distribution with mean 70 and standard deviation 4. Find z.

    1. Subtract the mean: 64 − 70 = −6.
    2. Divide by 4 to get z = −1.5. The score is 1.5 standard deviations below the mean.
    Link to this example

Work with combined and conditional events

  • Complement and inclusive unionP(Aᶜ) = 1 − P(A); P(A ∪ B) = P(A) + P(B) − P(A ∩ B)

    What it does

    Complementary events partition the outcomes. The inclusive union adds the event probabilities and subtracts the overlap once.

    Worked example

    If P(A) = 0.4, P(B) = 0.5, and P(A ∩ B) = 0.2, find P(Aᶜ) and P(A ∪ B).

    1. The complement has probability 1 − 0.4 = 0.6.
    2. The union has probability 0.4 + 0.5 − 0.2 = 0.7.
    Link to this example
  • Condition on a known eventP(A | B) = P(A ∩ B)/P(B); P(A ∩ B) = P(A)P(B | A)Each conditioning event must have positive probability.

    What it does

    Conditioning restricts attention to an event of positive probability. The multiplication rule recovers a joint probability from a marginal and a conditional probability.

    Worked example

    Of 40 students, 20 take art, 10 take music, and 5 take both. Find P(art | music) and P(both).

    1. Among the 10 music students, 5 take art, so the conditional probability is 1/2.
    2. Multiply by P(music) = 10/40 to recover P(both) = 1/8.
    Link to this example
  • Reverse the direction of a conditionP(A | B) = P(B | A)P(A)/P(B)This form assumes P(A) > 0 and P(B) > 0.

    What it does

    Bayes’ theorem updates a prior event probability when an observation occurs by multiplying by the observation likelihood and dividing by its overall probability.

    Worked example

    Line A makes 60% of bulbs with 2% defective. Line B makes 40% with 5% defective. A bulb is defective. Find P(A | defective).

    1. Overall defect probability is 0.6(0.02) + 0.4(0.05) = 0.032.
    2. The fraction from A among defective bulbs is 0.012/0.032 = 3/8.
    Link to this example
See Probability Formulas

Count selections with or without order

  • Ordered and unordered choicesP(n,r) = n!/(n − r)!; C(n,r) = P(n,r)/r!Choose r distinct objects from n with 0 ≤ r ≤ n.

    What it does

    A permutation counts ordered selections of distinct objects. A combination ignores order by dividing by the number of arrangements of the chosen objects.

    Worked example

    From five people, count two-person teams and ordered president–vice-president assignments.

    1. For two distinct roles there are 5 · 4 = 20 assignments.
    2. Each team appears in two orders, giving 20/2 = 10 teams.
    Link to this example

Model binomial and normal outcomes

  • Probability of exactly k successesP(X = k) = C(n,k)pᵏ(1 − p)n−kUse n independent trials with common success probability p and 0 ≤ k ≤ n. At p = 0 or 1, the outcome is certain.

    What it does

    The binomial probability counts the placements of k successes among n independent trials and multiplies by the probability of one such placement.

    Worked example

    A fair coin is tossed four times. Find the probability of exactly two heads.

    1. There are C(4,2) = 6 choices of head positions.
    2. Each pattern has probability (1/2)⁴, giving 6/16 = 3/8.
    Link to this example
  • Center and spread of a binomial countμ = np; σ = √(np(1 − p))

    What it does

    A binomial count has mean np and variance np(1 − p), because independent trial outcomes contribute their means and variances additively.

    Worked example

    Find the mean and standard deviation for 20 independent trials with p = 0.25.

    1. The mean is 20(0.25) = 5.
    2. The variance is 20(0.25)(0.75) = 3.75, so the standard deviation is √3.75.
    Link to this example
  • Normal distribution coverageWithin 1σ: about 68%; within 2σ: about 95%; within 3σ: about 99.7%Measure each interval symmetrically about μ.

    What it does

    For a normal distribution, approximately 68%, 95%, and 99.7% of observations lie within one, two, and three standard deviations of the mean.

    Worked example

    A normally distributed measurement has μ = 50 and σ = 3. What proportion lies between 44 and 56?

    1. The endpoints are 50 − 2(3) and 50 + 2(3).
    2. The empirical rule gives about 95%.
    Link to this example

Estimate a population parameter

  • Mean interval when σ is knownx̄ ± E; E = z*σ/√nUse a random independent sample and an approximately normal sampling distribution. The starred z is the positive normal critical value.

    What it does

    With known population standard deviation and an approximately normal sampling distribution, a z interval adds and subtracts the critical value times the standard error.

    Worked example

    A random independent sample has n = 64 and x̄ = 40. Assume σ = 8. Use z* = 1.96 for a 95% interval.

    1. The standard error is 8/√64 = 1, so the margin is 1.96.
    2. The interval is (38.04, 41.96).
    Link to this example
  • Mean interval when σ is estimatedx̄ ± t*s/√nUse the one-sample t critical value with n − 1 degrees of freedom. Check independence and whether the sample shape and size support a t interval.

    What it does

    A one-sample t interval substitutes the sample standard deviation and uses a t critical value with n − 1 degrees of freedom. Check independence and sampling-distribution conditions.

    Worked example

    A random sample of 25 observations from an approximately normal population has x̄ = 18 and s = 5. Use t* = 2.064.

    1. The standard error is 5/√25 = 1, so the margin is 2.064.
    2. The resulting 95% interval is (15.936, 20.064).
    Link to this example
  • Large-sample proportion intervalp̂ ± z*√(p̂(1 − p̂)/n)This normal approximation uses independent observations with sufficiently many observed successes and failures.

    What it does

    The large-sample normal interval for a proportion uses p̂ to estimate its standard error. Check independence and that both outcome counts are sufficiently large.

    Worked example

    In 100 independent observations there are 40 successes. Use z* = 1.96 for a 95% interval.

    1. Compute p̂ = 0.4 and standard error √(0.4 · 0.6/100) ≈ 0.0490.
    2. The margin is about 0.096, so the interval is about (0.304, 0.496).
    Link to this example
See AP Statistics Formula Sheet

Fit and interpret a least-squares line

  • Predict y from xŷ = a + bx; b = r(sy/sx); a = ȳ − bx̄Here r is Pearson correlation and the two sample standard deviations are positive.

    What it does

    The least-squares line with intercept has slope equal to correlation times the ratio of sample standard deviations. It passes through the pair of sample means.

    Worked example

    Given r = 0.75, sx = 2, sy = 4, x̄ = 5, and ȳ = 12, predict y at x = 7.

    1. The slope is 0.75(4/2) = 1.5 and the intercept is 12 − 1.5(5) = 4.5.
    2. Then ŷ(7) = 4.5 + 1.5(7) = 15.
    Link to this example
  • Correlation from standardized pairsr = (∑[(xᵢ − x̄)/sx][(yᵢ − ȳ)/sy])/(n − 1)

    What it does

    Pearson correlation averages products of paired sample-standardized values with divisor n − 1. Both variables need positive sample spread.

    Worked example

    Find r for paired observations (1, 4), (2, 2), and (3, 0).

    1. The standardized x values are −1, 0, 1 and the standardized y values are 1, 0, −1.
    2. Their paired products sum to −2. Divide by n − 1 = 2 to get r = −1.
    Link to this example
  • Fraction of variation explainedR² = r²This equality is for simple least-squares regression with an intercept.

    What it does

    For one-predictor least squares with an intercept, the fraction of response variation explained by the line equals the square of Pearson correlation.

    Worked example

    A least-squares line with intercept has r = −0.8. Find and interpret R².

    1. Square the correlation: (−0.8)² = 0.64.
    2. The line explains 64% of the sample response variation around its mean.
    Link to this example

Preview the printable

Download the compact sheet for a quick review, or print the complete formula list from this page.

Practice these skills

Related references

Sources and review

Math Sheet prepares original print materials. See how we check formulas and printouts.

Browse all formula sheets →