Gaussian Function — Definition, Formula & Examples
A Gaussian function is a smooth, symmetric, bell-shaped curve defined by the exponential of a negative quadratic expression. It forms the basis of the normal distribution in statistics and appears throughout science and engineering.
A Gaussian function is a function of the form , where controls the peak height, is the center (mean), and is the standard deviation governing the width. When , the function integrates to 1 over and serves as the probability density function of the normal distribution .
Key Formula
Where:
- = The input variable (observed value)
- = The mean — the center of the bell curve
- = The standard deviation — controls the width of the curve
- = The exponential function, base $e \approx 2.71828$
How It Works
The Gaussian function describes how data clusters around a central value. The parameter shifts the bell curve left or right along the -axis, while controls the spread: a smaller produces a taller, narrower peak, and a larger produces a shorter, wider one. To use it as a probability density, you set the leading coefficient to so the total area under the curve equals 1. You can then compute the probability that a random variable falls in an interval by integrating the Gaussian over that interval, typically using -scores and a standard normal table.
Worked Example
Problem: Evaluate the standard normal Gaussian function (μ = 0, σ = 1) at x = 0 and x = 2.
Write the formula for σ = 1, μ = 0: The standard normal density simplifies because σ = 1 and μ = 0.
Evaluate at x = 0: Substitute x = 0. The exponent becomes 0, so e⁰ = 1.
Evaluate at x = 2: Substitute x = 2. The exponent is −4/2 = −2.
Interpret: The density at x = 0 is about 7.4 times larger than at x = 2, reflecting how the bell curve is tallest at the mean and drops off rapidly.
Answer: f(0) ≈ 0.3989 and f(2) ≈ 0.0540.
Another Example
Problem: A machine fills bottles with a mean of μ = 500 mL and standard deviation σ = 10 mL. What is the value of the Gaussian density at x = 515 mL?
Compute the z-score: Find how many standard deviations 515 is from the mean.
Compute the exponent: Plug the z-score into the exponent of the Gaussian.
Evaluate the full expression: Use the normalized Gaussian with σ = 10.
Answer: The Gaussian density at 515 mL is approximately 0.0130 per mL.
Visualization
Why It Matters
The Gaussian function is central to any introductory statistics or probability course — the normal distribution built from it models everything from exam scores to measurement errors. In signal processing and physics, Gaussian functions describe laser beam profiles, heat diffusion, and filter kernels. Machine-learning algorithms rely on Gaussian assumptions in techniques like Gaussian naive Bayes, Gaussian mixture models, and Gaussian process regression.
Common Mistakes
Mistake: Confusing the density value f(x) with a probability.
Correction: The value of the Gaussian at a single point is a density, not a probability. To find the probability of an interval, you must integrate the function over that interval. A single-point density can exceed 1 for narrow distributions.
Mistake: Forgetting to square σ in the denominator of the exponent.
Correction: The exponent is . Writing instead of changes the shape of the curve entirely. Always check that both the numerator and denominator carry squared terms.
