Compute probability density, cumulative distribution, quantiles, and visualize density curves for Normal, Student's t, Chi-Square, Exponential, Uniform, and Beta distributions. Ideal for students, data scientists, and researchers exploring statistical distributions.
A probability density function (PDF) — often denoted fX(x) — describes the relative likelihood for a continuous random variable X to take on a given value x. Unlike discrete probability mass functions, the PDF does not give probabilities directly; rather, the probability that X falls within a particular interval [a, b] is the integral of the PDF over that interval:
P(a ≤ X ≤ b) = ∫ab fX(x) dx
with the normalization condition ∫−∞∞ fX(x) dx = 1.
The PDF is a cornerstone of probability theory and statistics. It underpins everything from hypothesis testing and confidence intervals to Bayesian inference and machine learning. By visualizing the PDF, you gain immediate insight into the shape, spread, and central tendency of a distribution.
Key properties of any valid PDF include: non‑negativity (f(x) ≥ 0 for all x), total area = 1, and the ability to compute moments (mean, variance, etc.) via integrals. The CDF, defined as F(x) = P(X ≤ x), is the cumulative integral of the PDF and is a monotone non‑decreasing function ranging from 0 to 1.
| Distribution | Parameters | Support | PDF (formula) | Variance | Common Use |
|---|---|---|---|---|---|
| Normal | μ ∈ ℝ, σ > 0 | ℝ | (1/σ√(2π)) · exp(−(x−μ)²/(2σ²)) | σ² | Natural phenomena, measurement errors, test scores |
| Student's t | ν > 0 (d.f.) | ℝ | Γ((ν+1)/2)/(√(νπ) Γ(ν/2)) · (1+x²/ν)−(ν+1)/2 | ν/(ν−2) (ν>2) | Small‑sample inference, robust statistics |
| Chi‑Square | k > 0 (d.f.) | [0, ∞) | xk/2−1 · e−x/2 / (2k/2 Γ(k/2)) | 2k | Variance estimation, goodness‑of‑fit tests |
| Exponential | λ > 0 (rate) | [0, ∞) | λ · e−λx | 1/λ² | Waiting times, reliability, survival analysis |
| Uniform | a < b (min, max) | [a, b] | 1 / (b − a) | (b−a)²/12 | Random number generation, prior distributions |
| Beta | α > 0, β > 0 | [0, 1] | xα−1 (1−x)β−1 / B(α, β) | αβ / ((α+β)²(α+β+1)) | Bayesian priors, proportions, PERT analysis |
For a given distribution, the PDF is computed directly from its closed‑form expression (see table above). The cumulative distribution function (CDF) — the probability that X ≤ x — is obtained by numerical integration of the PDF using an adaptive Simpson's rule, ensuring high accuracy across the entire support. For the normal distribution, we use the complementary error function (erfc) for a fast, exact CDF; for the others, numerical quadrature is applied with a fine grid and error control.
Interval probabilities are computed as CDF(b) − CDF(a) when bounds are provided. Quantiles (inverse CDF) are not shown in this version but may be added in future updates. The mean, variance, skewness, and excess kurtosis are calculated using the known analytical moments for each distribution, derived from the moment‑generating function or from standard statistical tables.
Numerical accuracy: Our adaptive Simpson routine uses a relative error tolerance of 1×10−8 and a maximum recursion depth of 12, ensuring that the CDF is accurate to at least 6 decimal places for the vast majority of parameter choices. For distributions with singularities at the support boundary (e.g., Beta with α<1 or β<1), the integrator automatically refines the grid near the boundary to maintain accuracy. All results are rounded to 6 decimal places in the display, which is sufficient for most educational and professional applications.
An electronics manufacturer measures the resistance of a batch of resistors. The resistance values follow a normal distribution with μ = 100 Ω and σ = 2 Ω. Using our PDF calculator, the quality engineer can determine the probability that a randomly selected resistor has resistance between 98 Ω and 102 Ω — i.e., within ±2 Ω of the target. By entering μ=100, σ=2, a=98, b=102, the tool computes P(98 ≤ X ≤ 102) ≈ 0.6827 (the 68‑95‑99.7 rule). This helps the engineer set acceptance criteria and monitor process capability (Cp, Cpk).
In reliability engineering, the time to failure of a component is often modelled by an exponential distribution. Suppose a mechanical part has a failure rate λ = 0.02 failures per hour (MTBF = 50 hours). The engineer wants to know the probability that the part survives beyond 60 hours. Using the exponential distribution with λ = 0.02 and x = 60, the tool computes P(X > 60) = 1 − CDF(60) ≈ e−0.02·60 ≈ 0.3012. This information drives maintenance scheduling and warranty decisions.
A data scientist models the conversion rate of an A/B test using a Beta(α, β) prior. After observing 30 conversions out of 100 visitors, the posterior distribution is Beta(30+α, 70+β). The PDF calculator helps visualise the posterior density and compute credible intervals — for instance, the probability that the true conversion rate lies between 0.25 and 0.35. This supports decision‑making in marketing and product development.
A risk manager assumes that daily returns of a portfolio follow a normal distribution with μ = 0.05% and σ = 1.2%. To compute the 5% daily Value‑at‑Risk (VaR), the manager needs the 5th percentile of the distribution. While our tool does not directly compute quantiles, the CDF can be used iteratively to find the value x such that F(x) = 0.05. By adjusting x and reading the CDF, one can approximate the VaR. For example, with μ=0.05, σ=1.2, the 5th percentile is approximately μ − 1.645σ = 0.05 − 1.974 ≈ −1.924%, meaning there is a 5% chance of a daily loss exceeding 1.924%. This quick calculation aids in setting risk limits.