Statistics Calculators

By · Last updated:

These statistics calculators cover the descriptive statistics and probability that sit underneath machine learning: where a value falls in a data set, how spread out the data is, how many ways a sample can be drawn, and what a random outcome is worth on average. Each one runs in your browser, shows the arithmetic behind the answer and gives the NumPy or SciPy call that reproduces it.

Which statistics calculator do you need?

Your questionCalculatorWhat you enter
What value has 90% of my data below it?Percentile calculatorA list of numbers and a percentile
What are Q1, the median and Q3, and which points are outliers?Quartile and IQR calculatorA list of numbers
How many ways can I choose r items from n?Combination (nCr) calculatorn and r
What is the chance of k successes when I sample without replacement?Hypergeometric distribution calculatorPopulation, successes, sample size, k
What is the long-run average of a random outcome?Expected value calculatorOutcomes and their probabilities

Describing a data set: percentiles and quartiles

A percentile tells you the value below which a given share of the data falls. Quartiles are the three percentiles that split sorted data into four equal parts: Q1 is the 25th percentile, the median is the 50th and Q3 is the 75th. The distance between Q1 and Q3, the interquartile range, measures spread without being pulled around by extreme values the way the standard deviation is.

Different tools can return different percentiles for the same data, because there is more than one accepted way to interpolate between two neighbouring values. The percentile calculator and the quartile calculator both show the method they use and let you switch, so you can match a textbook answer or a NumPy result.

Counting and probability: combinations, sampling and expectation

Many probability questions reduce to counting. The number of ways to choose r items from n when order does not matter is the binomial coefficient, which the combination calculator computes exactly, even for large inputs. That same coefficient is the building block of the hypergeometric distribution, which gives the probability of drawing a certain number of successes from a finite population without putting anything back.

Once you have a distribution, its expected value is the probability-weighted average of its outcomes. The expected value calculator takes any discrete distribution you type in and returns the mean, variance and standard deviation, with the table of products that produces them.

Where these ideas appear in machine learning

  • Percentiles are how latency and error budgets are reported (p95, p99) and how outliers are clipped before training.
  • The interquartile range is the scale used by robust feature scaling, which subtracts the median and divides by the IQR.
  • Combinations count feature subsets and the pairwise models in one-vs-one multiclass classification.
  • The hypergeometric distribution underlies Fisher’s exact test and enrichment tests on feature sets.
  • Expected value is what a loss function estimates: training minimises the average loss over the data as a stand-in for the expected loss.

Once a model is trained, you can score it with the confusion matrix calculator, or fit a trend to your data with the regression calculators.

Frequently asked questions

Do these calculators send my data anywhere?

No. The calculations are done by JavaScript in your browser, so the numbers you paste are not uploaded.

Will the results match NumPy, SciPy or a spreadsheet?

Each calculator states the method it uses and shows the equivalent Python call. Where more than one convention exists, as with percentiles and quartiles, you can choose the method and compare.

Why is there no standard deviation or z-score calculator here?

The statistics section is new and is being extended. The expected value calculator already reports the variance and standard deviation of a discrete distribution.