Machine Learning Engineeringexplorer

Probability distribution explorer

A probability distribution says how likely each value of a random quantity is. This tool plots six that come up constantly: the normal for measurement noise, the binomial for counting successes, the Poisson for counting events, the exponential for waiting times, the uniform for “anywhere in a range” and the beta for a probability you are unsure of.

Curve
Between a and b

A normal with μ = 0 and σ = 1 puts 68.27% of its probability between −1 and 1.

P(−1 ≤ X ≤ 1)68.27%As a fraction: 0.6827
00.20.4−4−2024xDensityab
Shaded band and bars: a ≤ x ≤ b

Distribution and interval

Find P(a ≤ X ≤ b)

If a is above b, the tool swaps them.

Shape of the distribution

Mean0The balance point.
Variance1Standard deviation 1
Mode0Where the curve peaks.
The ends carry no probability

For a continuous variable P(X = a) is 0, so “less than” and “at most” give the same answer. The result is the area under the density from a to b, which equals F(b) − F(a) on the cumulative curve.

What it shows

For a smooth curve (a density), the probability that the value lands between a and b is the area under the curve between them. For counts, each bar is already a probability, so you add the bars in the interval.

The cumulative curve, F(x) = P(X ≤ x), turns that into a subtraction: P(a ≤ X ≤ b) = F(b) − F(a). Set the parameters and the interval, and switch between the two views.

How to read it

  • Continuous families draw a smooth density (PDF). Binomial and Poisson draw bars, one per whole number (PMF).
  • The shaded band marks a to b. On bars, those inside the interval get a solid outline. The large number is P(a ≤ X ≤ b).
  • On the cumulative curve (CDF), the guide lines read off F(a) and F(b). The probability is F(b) − F(a).
  • Mean is the balance point, variance the average squared distance from it, and the mode is where the curve peaks. The uniform has no single mode, and some beta shapes peak at an edge.
  • A density can be taller than 1. The area is limited to 1, not the height.

Questions

What is the difference between a PDF and a PMF?

A probability mass function gives the probability of each exact value of a counting variable, so the heights add up to 1. A probability density function belongs to a continuous variable. Its height is not a probability; the area under it between two values is.

Why is the probability of one exact value 0 for a continuous variable?

An exact value covers an interval of zero width, so it has zero area under the density. That is why “less than” and “at most” give the same answer for the normal, exponential, uniform and beta, and why the discrete tool counts both ends.

How are the normal’s 68%, 95% and 99.7% figures calculated?

They are the probability within 1, 2 and 3 standard deviations of the mean, found from the cumulative function. More exactly, 1.96 standard deviations holds 95%, and 3 hold 99.73%.

When does the Poisson match the binomial?

When n is large and p is small, a binomial with mean np behaves like a Poisson with λ = np. Try n = 1000 and p = 0.004 against λ = 4 and compare the shapes.

How accurate are the probabilities?

They come from series and continued-fraction forms of the error function and the incomplete gamma and beta functions. They agree with reference values from SciPy to better than 1e-7.

Learn it properly

Sources

Explore further

  • Seeing TheoryBrown University’s visual introduction to probability and statistics.

Last updated

More tools

All tools

Your first senior-level
lesson is free.

Choose a course, open a free lesson, and explore an idea you’ve wanted to understand.