Real-time PDF and CDF of nine distributions including Normal, Poisson and Binomial. Watch the shape change with the parameter sliders and see theory meet experiment with Monte Carlo sampling.
Distribution Settings
Presets
Interval probability P(a ≤ X ≤ b)
a =b =
Results
Mean (μ)
—
Variance (σ²)
—
Skewness
—
Excess kurtosis
—
P(a≤X≤b)
—
PDF (probability density) and CDF (cumulative distribution)
Exponential (left) and Beta (right) distributions: used in confidence intervals and Bayesian statistics
What Is the Probability Distribution Simulator?
🙋
Even looking at the graphs, I can't quite tell the difference between the PDF and the CDF. How are they used differently?
🎓
Roughly speaking, the PDF is the "density of probability" and the CDF is the "accumulated probability". For example, if a product's lifetime follows an exponential distribution, the PDF gives the "probability density of failing at exactly 100 hours" and the CDF gives the "probability of failing within 100 hours". Choose "Exponential" in the select box above: the PDF (left axis) and CDF (right axis) are drawn on the same chart, and you can see at a glance that the CDF is steepest where the PDF is highest.
🙋
Wait, probability density isn't a probability? And why does the histogram line up with the PDF line when I press the "Generate N=2000 samples" button?
🎓
Good catch. The PDF value itself is not a probability but a "density"; it is the area of a histogram bar that is a probability. When Monte Carlo sampling generates N=2000 random numbers, the shape of their histogram approaches the theoretical PDF. That is the law of large numbers made visible. Move the mean μ slider of the normal distribution and then sample again, and you will see the whole histogram shift.
🙋
The shapes differ so much between distributions. The skewness and excess kurtosis in the results also differ for each distribution. What phenomena do they describe?
🎓
In practice, when you examine the distribution of stock returns in financial risk analysis, it is usually "heavier-tailed" than a normal distribution (positive kurtosis). That means crashes and surges happen more often than the theory predicts. Choose "Student's t" in the simulator and reduce the degrees of freedom ν. At ν=5 the excess kurtosis is 6, and for ν of 4 or less the kurtosis is not defined, so "undefined" is shown. Both tails rise above the normal distribution: a distribution in which high-risk events occur more readily.
Physical Model and Key Equations
The probability density function (PDF), the core of a probability distribution, expresses the relative likelihood that a continuous random variable $X$ lies near a value $x$. It is not a probability itself; probabilities are obtained by integrating it.
$$ f_X(x) = \frac{d}{dx}F_X(x) $$
Here $f_X(x)$ is the probability density function and $F_X(x)$ is the cumulative distribution function (CDF) described below. $f_X(x) \ge 0$, and its integral over the whole range is 1: $\int_{-\infty}^{\infty}f_X(x) dx = 1$.
The cumulative distribution function (CDF) directly gives the probability that the random variable $X$ takes a value no greater than $x$. It is the fundamental function of every probability distribution.
$F_X(x)$ is monotonically non-decreasing in $x$ and ranges from $0$ to $1$. This is why the CDF curve in this tool always rises to the right and converges from 0 to 1.
Frequently Asked Questions
This tool updates automatically. Changing a slider or numeric field immediately updates the graphs and the results (mean, variance, skewness, excess kurtosis and interval probability). The one thing that does not update is the Monte Carlo histogram, which is redrawn only when you press the "Generate N=2000 samples" button. The interval probability is computed only when a < b.
It is statistical scatter from the random numbers. The sample size is fixed at N=2000, and each press of the button regenerates fresh random numbers, so the histogram looks slightly different every time. The relative scatter is of order 1/√N (about 2% for N=2000) and is largest in the tail bins, which hold few counts. Press the button several times and watch the histogram fluctuate around the theoretical PDF.
In the PDF (probability density function), the height of the curve shows how relatively likely that value is. In the CDF (cumulative distribution function), the value of the curve is the probability of being at or below that value. For example, a point where the CDF is 0.8 means there is an 80% probability of being at or below that value.
Because of the central limit theorem. As n grows, the binomial distribution becomes a symmetric bell shape and can be approximated by a normal distribution with mean np and variance np(1-p). Move the n slider from 5 to 50 to watch it happen.
Real-World Applications
Quality control and reliability engineering: Product lifetimes and failure intervals are modelled with exponential or gamma distributions (the Weibull distribution is also widely used in practice). The CDF gives the "probability of failure within the warranty period", which drives warranty policy.
Financial engineering and risk management: Stock-return distributions have "heavy tails" that a normal distribution cannot explain, so Student's t and generalised hyperbolic distributions are used. VaR (value at risk) is derived from the tail of the CDF.
Actuarial science: The number of rare but catastrophic events (earthquakes, tsunamis) is modelled with a Poisson distribution, and the loss per event with log-normal or Pareto distributions, to set insurance premiums.
Machine learning and Bayesian statistics: As priors for unknown parameters, the Beta distribution is used for probabilities (range [0,1]) and the Gamma distribution for positive quantities. Markov chain Monte Carlo (MCMC) is an advanced form of the Monte Carlo sampling you experience here.
Common Misconceptions and Points to Note
First, grasp that "the height of the PDF is not the probability itself". For example, the PDF of a normal distribution with mean 0 and standard deviation 0.5 has a high value of about 0.8 at x=0. That means "0 is the most likely value", not "the probability that X=0 is 0.8": in a continuous distribution the probability of any single point is 0. To get a probability you have to specify an interval and consider the area under the PDF. Choose "Normal" in the tool, set σ to 0.5 and enter a=0, b=0.5 for the interval probability: P(0≤X≤0.5)≈0.341 is shown. That value is the probability that the random variable falls in the interval, i.e. the area under the PDF.
Second, do not mix up scales when setting distribution parameters. The binomial trials n and success probability p, and the Poisson mean count λ, must be given units that match the real data. For instance, when modelling "on average 3 customers arriving per hour" with a Poisson distribution, if the time window you analyse is 30 minutes you must set λ=1.5. Change λ from 3 to 1.5 in the tool and the peak of the distribution shifts left. This kind of setting error badly distorts predictions, so beware.
Finally, a practical pitfall: a larger "N" in Monte Carlo sampling is not automatically better. N=10000 certainly gives a histogram closer to the theoretical PDF than N=2000, but weigh the trade-off between computing cost and accuracy. Especially when you want to evaluate rare "tail risks", advanced techniques such as importance sampling are needed rather than simply increasing N. Choose "Student's t" in the tool, set the degrees of freedom to 3 and press the "Generate N=2000 samples" button repeatedly: the shape of both tails of the histogram varies greatly from run to run. That is part of why simulating rare events is hard.
Choose a distribution in the select box (nine types: Normal, Poisson, Binomial, Exponential, Chi-squared, Beta, Gamma, Uniform and Student's t). Sliders and numeric fields for that distribution's parameters appear below (e.g. for the Normal distribution μ=−5 to 5, σ=0.1 to 5)
Moving a parameter immediately updates the PDF (left axis) and CDF (right axis) chart and the mean, variance, skewness and excess kurtosis. The interval probability P(a ≤ X ≤ b) is computed when you enter the bounds in the a and b fields (for a < b)
Press "Generate N=2000 samples" to draw 2000 random numbers from the distribution and plot their histogram over the theoretical PDF. The presets (Standard normal, Poisson λ=5, B(10,0.5)) restore common settings
Worked Example
Choose the Poisson distribution with λ=5 (the "Poisson λ=5" preset): mean 5, variance 5, skewness 0.447 and excess kurtosis 0.200 are shown. For a help desk receiving 5 enquiries per hour on average, the probability that an hour brings 3 to 7 enquiries is read by entering a=3, b=7: P(3≤X≤7)=0.7420. To treat a product weight with the Normal distribution (mean 500 g, standard deviation 2 g), standardise with z=(x−500)/2. Weights of 496 g or less correspond to z≤−2, so with μ=0, σ=1 enter a=−6, b=−2 to get P≈0.0227, a defect rate of about 2.3% (exactly 2.28%). Weights of 490 g or less are z≤−5, about 3×10⁻⁷, a negligible fraction.
Practical Notes
The binomial trials n run from 1 to 50 in this tool. For larger n, if np and n(1−p) are both large enough, use the Normal approximation with mean np and variance np(1−p) (see the FAQ). When p is close to 0 or 1 the approximation is poor, so consider the Poisson approximation (λ=np) as well
The Poisson and binomial distributions are discrete, so the chart shows a bar at each integer. The interval probability P(a ≤ X ≤ b) is the sum of the probabilities of the integers from a to b inclusive, so take care with the bounds (for "fewer than 3" use b=2). The histogram uses 30 equal bins, so for discrete distributions the bar heights can look uneven
The Normal μ ranges from −5 to 5 and σ from 0.1 to 5, so standardise real dimensions or weights with z=(x−μ)/σ before entering them. For process capability, convert the specification limits to z and read the out-of-specification probability from the interval probability (about 0.27% lies outside ±3σ)