density function calculator

Formula: f(x) = (1 / (σ√(2π))) · e-((x-μ)² / (2σ²))

What is a Density Function?

A density function (more precisely, a probability density function or PDF) describes how probability is distributed across possible values of a continuous random variable. Instead of giving the probability at one exact point, a density function tells you the relative likelihood around that point.

This density function calculator helps you compute f(x) quickly for common continuous distributions. It is useful for statistics homework, data science workflows, engineering models, quality control, and risk analysis.

How to Use This Density Function Calculator

  • Select a distribution: Normal, Exponential, or Uniform.
  • Enter the target value x.
  • Provide the required distribution parameters.
  • Click Calculate Density to compute f(x).

The result shown is the value of the density function at x, not the probability that X equals exactly x. For continuous variables, exact-point probabilities are zero; probabilities come from areas under the curve.

Supported Distributions

1) Normal Distribution

The normal distribution is the familiar bell curve. It is controlled by:

  • μ (mu) = mean (center)
  • σ (sigma) = standard deviation (spread), with σ > 0

Formula:
f(x) = 1 / (σ√(2π)) · exp(-((x-μ)² / (2σ²)))

2) Exponential Distribution

The exponential distribution models waiting times between random independent events, such as arrivals in a queue. It uses:

  • λ (lambda) = rate parameter, with λ > 0

Formula:
f(x) = λe-λx for x ≥ 0, and 0 for x < 0.

3) Uniform Distribution

A uniform distribution gives equal density across an interval [a, b]. It uses:

  • a = lower bound
  • b = upper bound (must satisfy b > a)

Formula:
f(x) = 1 / (b-a) for a ≤ x ≤ b, and 0 otherwise.

Why This Matters in Practice

Learning to evaluate a density function is foundational for statistical modeling. Once you can compute PDFs, you can move on to likelihood estimation, Bayesian inference, confidence intervals, simulation, and machine learning probability models.

In practical terms, a density function calculator saves time and helps avoid arithmetic mistakes, especially when testing many x values or parameter settings.

Common Input Mistakes to Avoid

  • Using a non-positive σ in the normal distribution.
  • Using a non-positive λ in the exponential distribution.
  • Setting b ≤ a in the uniform distribution.
  • Interpreting f(x) directly as a probability at a single point.

Quick Example

Suppose X follows a normal distribution with μ = 50 and σ = 10. If you evaluate at x = 60, this calculator returns the corresponding PDF value at 60. If you change x while keeping μ and σ fixed, you can compare how likely nearby values are relative to one another.

Final Thoughts

A good density function calculator should be simple, fast, and accurate. Use this tool to explore how changing parameters reshapes each distribution, and to build stronger intuition for continuous probability.

🔗 Related Calculators