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=3274.571    s2.138s^2 = \frac{32}{7} \approx 4.571 \;\Rightarrow\; s \approx 2.138
Answer
σ=2(population),s2.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
160.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!(nr)!\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

Sample or population standard deviation?

Population when your numbers are the whole group, dividing by n. Sample when they are a subset used to estimate a larger group, dividing by n − 1. The examples above show both for the same data.

When is the median better than the mean?

Whenever the data is skewed or has outliers. House prices and incomes are reported as medians because a few very large values would drag the mean away from the typical case.

Does it do hypothesis tests and confidence intervals?

Yes: z and t tests, confidence intervals, chi-squared, correlation and regression, with the formula and the decision rule shown. Give the numbers and what the test is about.

Can I paste a whole data set?

Yes. Paste the numbers separated by commas, spaces or new lines, up to 2,000 characters, and say what you want from them.