Branch of mathematics

Statistics and probability

Mean, median and deviation, counting and classical probability — the mathematics of data and chance.

Topics in this branch

Branch formulas

Branch: Statistics and probability

Mean, median and mode

  • Arithmetic mean

    xˉ=x1+x2++xnn\bar{x} = \frac{x_1 + x_2 + \dots + x_n}{n}

    the sum of all the data divided by how many there are

  • Total from the mean

    x1+x2++xn=nxˉx_1 + x_2 + \dots + x_n = n \cdot \bar{x}

    this is how a missing value is recovered when the mean is known

  • Median — an odd sample

    Me=x(n+12)(n odd)\mathrm{Me} = x_{\left(\frac{n+1}{2}\right)} \quad (n \ \text{odd})

    once sorted, it is exactly the middle number

  • Median — an even sample

    Me=x(n2)+x(n2+1)2(n even)\mathrm{Me} = \frac{x_{\left(\frac{n}{2}\right)} + x_{\left(\frac{n}{2}+1\right)}}{2} \quad (n \ \text{even})

    the mean of the two middle values

  • Mode

    Mo=the value with the highest frequency\mathrm{Mo} = \text{the value with the highest frequency}

    the number that occurs most often — there may be none at all

  • Weighted mean

    xˉw=w1x1+w2x2++wkxkw1+w2++wk\bar{x}_w = \frac{w_1 x_1 + w_2 x_2 + \dots + w_k x_k}{w_1 + w_2 + \dots + w_k}

    every value counts as many times as its weight says

Variance and deviation

  • Range

    R=xmaxxminR = x_{\max} - x_{\min}

    the simplest measure of spread — it looks only at the two extremes

  • Deviation from the mean

    di=xixˉ,d1+d2++dn=0d_i = x_i - \bar{x}, \qquad d_1 + d_2 + \dots + d_n = 0

    the deviations always sum to zero, which is why they cannot be averaged as they are

  • Variance

    σ2=(x1xˉ)2+(x2xˉ)2++(xnxˉ)2n\sigma^2 = \frac{(x_1 - \bar{x})^2 + (x_2 - \bar{x})^2 + \dots + (x_n - \bar{x})^2}{n}

    the mean of the squared deviations from the mean

  • Standard deviation

    σ=σ2\sigma = \sqrt{\sigma^2}

    the square root of the variance — back in the units of the data

  • Shortcut formula

    σ2=x12+x22++xn2nxˉ2\sigma^2 = \frac{x_1^2 + x_2^2 + \dots + x_n^2}{n} - \bar{x}^2

    the mean of the squares minus the square of the mean — quicker to compute

  • Sample variance

    s2=(x1xˉ)2++(xnxˉ)2n1s^2 = \frac{(x_1 - \bar{x})^2 + \dots + (x_n - \bar{x})^2}{n-1}

    divisor n − 1, when the data is a sample drawn from a larger population

Combinatorics

  • Rule of product

    N=k1k2kmN = k_1 \cdot k_2 \cdot \ldots \cdot k_m

    a choice made in several independent steps — multiply the counts

  • Factorial

    n!=123n,0!=1n! = 1 \cdot 2 \cdot 3 \cdot \ldots \cdot n, \qquad 0! = 1

    the product of the first n naturals; 0! equals 1 by definition

  • Permutations

    Pn=n!P_n = n!

    the number of orderings of all n items

  • Arrangements without repetition

    n!(nk)!=n(n1)(nk+1)\frac{n!}{(n-k)!} = n(n-1)\ldots(n-k+1)

    choose k out of n, order matters, nothing repeats

  • Arrangements with repetition

    nkn^k

    k times over, we choose from the same n options

  • Combinations

    (nk)=n!k!(nk)!\binom{n}{k} = \frac{n!}{k! \, (n-k)!}

    choose k out of n, order does NOT matter

  • Symmetry of combinations

    (nk)=(nnk)\binom{n}{k} = \binom{n}{n-k}

    choosing k items is the same as discarding the other n − k

Classical probability

  • Classical probability

    P(A)=AΩP(A) = \frac{|A|}{|\Omega|}

    favourable outcomes over the number of all possible ones

  • Range of a probability

    0P(A)10 \leq P(A) \leq 1

    never below 0 and never above 1

  • Impossible and certain events

    P()=0,P(Ω)=1P(\varnothing) = 0, \qquad P(\Omega) = 1

    edge cases of the definition, not results of a computation

  • Complementary event

    P(A)=1P(A)P(A') = 1 - P(A)

    counting "not A" is often easier than counting A

  • As a percentage

    P(A)100%P(A) \cdot 100\%

    the same probability expressed in percent

  • Independent events

    P(AB)=P(A)P(B)P(A \cap B) = P(A) \cdot P(B)

    multiply the probabilities — only when one does not affect the other

Related articles