SolveMathAI

Statistics calculator

Descriptive statistics, probability and counting, with the formula written out.

Enter to solve · Shift+Enter for a new line

  • Free
  • No account
  • Every step shown
  • Arithmetic to calculus

Descriptive statistics squeeze a list of numbers into one or two that describe it. The arithmetic is easy; the two things that actually cost marks are choosing between a sample and a population, and deciding whether the mean or the median is the honest summary of a skewed list.

The formulas you actually need

Sort the data first. Half of these become obvious once the list is in order.

  1. Mean

    Add everything, divide by how many. Sensitive to outliers: one huge value drags it.

  2. Median

    The middle value of the sorted list, or the average of the middle two when the count is even. Outliers barely move it, which is why incomes are quoted as medians.

  3. Mode

    The most frequent value. A list can have several modes, or none at all.

  4. Variance and standard deviation

    Average the squared distances from the mean, then square-root it. Divide by n for a whole population, by n − 1 for a sample. That single choice changes the answer.

  5. Probability

    Favourable outcomes over total outcomes, when outcomes are equally likely. List the sample space when it is small enough; two dice have 36 outcomes, not 11.

  6. Counting

    Order matters means permutations, nPr. Order does not matter means combinations, nCr = n! / (r!(n − r)!).

Worked examples

Each one is solved the way the solver solves it: the rule first, then the line.

Find the mean, median and mode of 4, 8, 15, 16, 23, 42

4, 8, 15, 16, 23, 424,\ 8,\ 15,\ 16,\ 23,\ 42
  1. Mean: add and divide by 6
    xˉ=4+8+15+16+23+426=1086=18\bar{x} = \frac{4 + 8 + 15 + 16 + 23 + 42}{6} = \frac{108}{6} = 18
  2. Median: even count, so average the middle two
    15+162=15.5\frac{15 + 16}{2} = 15.5
  3. Mode: no value repeats
    no mode\text{no mode}
Answer
xˉ=18,median=15.5,no mode\bar{x} = 18,\quad \text{median} = 15.5,\quad \text{no mode}

The mean sits above the median because 42 pulls it up. That gap is what "skewed right" means.

Find the standard deviation of 2, 4, 4, 4, 5, 5, 7, 9

2, 4, 4, 4, 5, 5, 7, 92,\ 4,\ 4,\ 4,\ 5,\ 5,\ 7,\ 9
  1. Mean first
    xˉ=408=5\bar{x} = \frac{40}{8} = 5
  2. Squared deviations
    9, 1, 1, 1, 0, 0, 4, 16  ⇒  ∑=329,\ 1,\ 1,\ 1,\ 0,\ 0,\ 4,\ 16 \;\Rightarrow\; \sum = 32
  3. Population variance divides by n
    σ2=328=4  ⇒  σ=2\sigma^2 = \frac{32}{8} = 4 \;\Rightarrow\; \sigma = 2
  4. Sample variance divides by n − 1
    s2=327≈4.571  ⇒  s≈2.138s^2 = \frac{32}{7} \approx 4.571 \;\Rightarrow\; s \approx 2.138
Answer
σ=2(population),s≈2.14(sample)\sigma = 2 \quad \text{(population)}, \qquad s \approx 2.14 \quad \text{(sample)}

What is the probability that two dice sum to 7?

P(sum=7)P(\text{sum} = 7)
  1. Count the sample space
    6×6=36 equally likely outcomes6 \times 6 = 36 \ \text{equally likely outcomes}
  2. List the favourable ones
    (1,6),(2,5),(3,4),(4,3),(5,2),(6,1)  ⇒  6(1,6),(2,5),(3,4),(4,3),(5,2),(6,1) \;\Rightarrow\; 6
  3. Divide
    P=636=16P = \frac{6}{36} = \frac{1}{6}
Answer
16≈0.167\dfrac{1}{6} \approx 0.167

Seven is the most likely total precisely because it has the most ways of happening.

How many ways are there to choose 3 items from 10?

(103)\binom{10}{3}
  1. Order does not matter, so combinations
    (nr)=n!r! (n−r)!\binom{n}{r} = \frac{n!}{r!\,(n - r)!}
  2. Substitute
    (103)=10!3! 7!\binom{10}{3} = \frac{10!}{3!\,7!}
  3. Cancel and multiply
    10×9×83×2×1=7206\frac{10 \times 9 \times 8}{3 \times 2 \times 1} = \frac{720}{6}
Answer
120120

Where marks get lost

Dividing by n when the data is a sample

A sample standard deviation divides by n − 1. With small data sets the two answers differ noticeably, and the question usually tells you which one it wants.

Finding the median without sorting

The median is the middle of the ordered list. Taking the middle of the list as written is a different number entirely.

Counting outcomes instead of ways

Two dice have 36 outcomes, not 11 totals. Each total needs its own count of the ways it can happen.

Questions

How do I find the mean?

Add every value and divide by how many there are. For 4, 8, 8, 15, 21 the total is 56 and there are 5 values, so the mean is 11.2. The mean does not have to be one of the values.

What is the median?

The middle value once the numbers are in order. For 4, 8, 8, 15, 21 it is 8. With an even count, take the mean of the middle two. The median ignores outliers, which the mean cannot.

How do I calculate standard deviation?

Find the mean, subtract it from each value and square the result, average those squares, then take the square root. Divide by n for a whole population and by n − 1 for a sample.

What is the difference between mean, median and mode?

The mean is the average, the median is the middle, and the mode is the most frequent value. A skewed data set pulls the mean away from the median, which is why house prices are usually quoted as medians.

How do I find probability?

Divide the number of favourable outcomes by the total number of equally likely outcomes. Drawing a red ball from 3 red and 5 blue is 3/8. Probabilities always fall between 0 and 1.

What is a z-score?

How many standard deviations a value sits from the mean: z = (x − mean) / standard deviation. A z of 2 means the value is two standard deviations above average.

When do I divide by n − 1?

When the data is a sample standing in for a larger population. Dividing by n − 1 corrects the tendency of a sample to understate the true spread; use n only when you have the whole population.

Does it show the working?

Yes. Every step is written out, including the squared deviations, so you can check any single number rather than trusting the total.