Probability Density Function Calculator

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.

Leave empty to compute PDF at x only.
Quick presets:
Standard Normal
t(5) at 0
χ²(3) at 2
Exp(λ=0.5)
Beta(2,5)
U(0,1)
Privacy first: All computations are performed locally in your browser. No data is sent to any server.

Understanding Probability Density Functions

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.

Supported Distributions at a Glance

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

Why Use an Interactive PDF Calculator?

  • Visual Learning: See how changing parameters shifts and reshapes the density curve. This builds intuition about location, scale, and tail behaviour.
  • Educational Aid: Verify textbook problems, prepare for exams, or explore the properties of distributions interactively.
  • Data Science & Research: Quickly compute PDF and CDF values for model selection, goodness‑of‑fit, and simulation.
  • Quality Control: Use the exponential and normal distributions in reliability engineering and Six Sigma analyses.
  • Risk Management: Normal and t‑distributions are fundamental for calculating Value‑at‑Risk (VaR) and expected shortfall in finance.

Mathematical Derivation & Computational Approach

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 Xx — 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.

Workflow: How to Use the Tool

  1. Select a distribution from the drop‑down menu.
  2. Adjust the parameters (e.g., mean and standard deviation for the normal).
  3. Enter the x value at which to evaluate the PDF and CDF.
  4. (Optional) Provide lower and upper bounds to compute an interval probability.
  5. Click Compute & Plot to see the density curve, the evaluated point, and the shaded interval area.

Real‑World Applications

Case Study: Manufacturing Quality Control

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).

Case Study: Reliability Engineering

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.

Case Study: Bayesian Beta‑Binomial Model

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.

Case Study: Financial Risk (Value‑at‑Risk)

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.

Common Misconceptions

  • "The PDF value is the probability at x." — No. For continuous variables, P(X = x) = 0. The PDF is a density; probabilities are obtained by integration over intervals.
  • "All symmetric distributions are normal." — False. The t‑distribution and uniform distribution are also symmetric, but have very different tails and shapes.
  • "The mean and median are always the same." — Only for symmetric distributions. For skewed distributions like the exponential or chi‑square, the mean and median differ.
  • "Larger variance always means a higher peak." — No. Increasing variance spreads the distribution, lowering the peak (for unimodal densities) while broadening the tails.

Limitations and Caveats

  • Numerical precision: For extreme parameter values (e.g., ν > 1000 in t‑distribution, or α, β very large in Beta), the numerical integration may become slower, but accuracy remains within 1e‑6. Very small standard deviations (σ < 0.001) can cause underflow in the PDF for x far from the mean; the tool handles this gracefully by returning 0.
  • Support boundaries: For distributions with finite support (Uniform, Beta), the PDF at the exact boundaries may be infinite if shape parameters are less than 1. The calculator returns Infinity in such cases, which is mathematically correct but should be interpreted with care.
  • Quantiles not provided: This version does not compute inverse CDF. Users needing quantiles can use trial‑and‑error or our separate quantile calculator (planned).
  • Discrete distributions: This tool is exclusively for continuous distributions. For binomial, Poisson, etc., please refer to our discrete distribution calculators.

Interdisciplinary Relevance

  • Finance: Normal and t‑distributions model asset returns; exponential models waiting times between trades.
  • Medicine: Chi‑square tests for association; beta distributions model proportions (e.g., tumour size).
  • Environmental Science: Extreme value distributions (not shown) extend the exponential family to model floods, droughts, and temperature extremes.
  • Machine Learning: PDFs are the foundation of generative models, variational inference, and density estimation (e.g., kernel density estimation).

Rooted in statistical science – This tool implements classical probability distributions as defined by Gauss, Student (William Sealy Gosset), Pearson, and others. The numerical integration routines follow established algorithms from Numerical Recipes (Press et al.) and are verified against R and SciPy. Reviewed by the GetZenQuery tech team, last updated June 2026.

Frequently Asked Questions

The PDF (probability density function) gives the relative likelihood at a specific point; the CDF (cumulative distribution function) gives the probability that the random variable is ≤ x. The CDF is the integral of the PDF.

The PDF at a point x is independent of the bounds. The bounds only affect the interval probability P(a ≤ X ≤ b). The PDF value shown is always fX(x) for the given parameters.

The choice depends on your data's characteristics: normal for symmetric, unbounded data; t for small samples with heavier tails; exponential for positive, skewed waiting times; chi‑square for positive variances; uniform for bounded, flat densities; beta for proportions on [0,1]. Always perform goodness‑of‑fit tests (e.g., Shapiro–Wilk, Kolmogorov–Smirnov) to validate your choice.

We use adaptive Simpson integration with a relative error tolerance of 1e‑8. For most practical purposes, this yields results accurate to at least 6 decimal places. The normal CDF uses the exact erfc function. For extreme parameters, the error may increase slightly but remains below 1e‑5.

Not in the current version. However, you can invert the CDF by trial and error or use a separate quantile calculator. We plan to add quantile functionality in a future release.

We recommend Wolfram MathWorld, Penn State's STAT 414, and the classic textbook Statistical Distributions by Evans, Hastings, and Peacock.

Yes, indirectly. For a test statistic T, the p‑value is often 1 − CDF(T) (one‑sided) or 2·(1 − CDF(|T|)) (two‑sided) for symmetric distributions. You can compute CDF(T) using this tool and derive the p‑value manually. However, for complex tests, we recommend dedicated statistical software.
References: MathWorld Normal Distribution; Wikipedia: PDF; Johnson, N.L., Kotz, S., & Balakrishnan, N. (1994). Continuous Univariate Distributions, Vol. 1 & 2; Stuart, A., & Ord, K. (1994). Kendall's Advanced Theory of Statistics, Vol. 1; NIST/SEMATECH e‑Handbook of Statistical Methods.