Ma · Mathematics

What Function Makes a Narrow, Bell-Shaped Peak?

Published By the 9to5Science editorial team

At a glance

  1. 1. Choose the peak

    Set the center a to the x-value where the curve should reach its maximum.

  2. 2. Set the width

    Use a small positive σ for a narrow peak and a larger σ for a broader one.

  3. 3. Set height and baseline

    Choose A for the peak's height above the baseline C.

  4. 4. Check the shape

    Compare the function with your data; use different left and right widths if the peak is asymmetric.

If by “peaks quickly” you mean a narrow, symmetric peak, a Gaussian function is a convenient starting point. Its center sets where the maximum occurs, and its width parameter controls how quickly the curve falls away on either side.

A bell curve is only one possible model: real data may have a sloping baseline, unequal sides, or a peak that does not look Gaussian. The sections below show how to adjust the basic model and when to consider an alternative.

The Gaussian peak

Use

f(x)=C+Aexp⁡(−(x−a)22σ2),f(x)=C+A\exp\left(-\frac{(x-a)^2}{2\sigma^2}\right),

where aa is the peak’s horizontal location, A>0A>0 is its height above the baseline, CC is the baseline, and σ>0\sigma>0 controls its width. The maximum occurs at x=ax=a, where f(a)=C+Af(a)=C+A.

The parameter σ\sigma is a scale, not the full width of the peak. At one width from the center,

f(a±σ)=C+Ae−1/2≈C+0.607A.f(a\pm\sigma)=C+A e^{-1/2}\approx C+0.607A.

So reducing σ\sigma makes the peak narrower; at corresponding scaled positions, such as one σ\sigma from the center, the sides are steeper in absolute xx-units. The curve is smooth, and its slope at the exact maximum is zero; “peaks quickly” usually means it is narrow, not that the slope at the maximum is large.

Choose the width from a desired half-height

A useful measure is the full width at half maximum (FWHM): the distance between the two points where the curve is halfway from the baseline to its maximum. Setting f(x)=C+A/2f(x)=C+A/2 gives

FWHM=2σ2ln⁡2≈2.355σ.\text{FWHM}=2\sigma\sqrt{2\ln 2}\approx 2.355\sigma.

If you know the desired FWHM, solve this relation for σ\sigma:

σ=FWHM22ln⁡2.\sigma=\frac{\text{FWHM}}{2\sqrt{2\ln 2}}.

This is often easier than guessing σ\sigma from a graph. The half-height is measured relative to CC, not relative to zero, when the curve has a nonzero baseline.

Worked example

Suppose a peak should be centered at x=2x=2, reach a maximum of 44, and sit on a baseline of 11. Its height above baseline is A=3A=3. If you want a relatively narrow peak with σ=0.4\sigma=0.4, use

f(x)=1+3exp⁡(−(x−2)22(0.4)2).f(x)=1+3\exp\left(-\frac{(x-2)^2}{2(0.4)^2}\right).

At the center, f(2)=4f(2)=4. One width from the center, at x=1.6x=1.6 or x=2.4x=2.4,

f(x)=1+3e−1/2≈2.82.f(x)=1+3e^{-1/2}\approx 2.82.

The half-height above baseline is 1+3/2=2.51+3/2=2.5. The full width at that level is approximately

2.355(0.4)=0.942.2.355(0.4)=0.942.

For a sharper peak with the same center and height, reduce σ\sigma; for a broader peak, increase it. Changing AA adjusts the height without changing the width, while changing CC shifts the whole curve vertically.

If one side is steeper

A symmetric Gaussian has the same shape on both sides of its center. To make the curve rise sharply and then trail off more gradually, give the two sides different widths:

f(x)=C+A{exp⁡(−(x−a)22σL2),x<a,exp⁡(−(x−a)22σR2),x≥a.f(x)=C+A\begin{cases} \exp\left(-\dfrac{(x-a)^2}{2\sigma_L^2}\right),&x<a,\\ \exp\left(-\dfrac{(x-a)^2}{2\sigma_R^2}\right),&x\ge a. \end{cases}

Choose a smaller σL\sigma_L for a narrower left side and a larger σR\sigma_R for a broader right side. The two pieces meet at the same peak, and their first derivatives are both zero there. However, their second derivatives need not match, so the curve may not have a perfectly smooth change in curvature at the center. If that matters, use a smooth asymmetric model, such as a skew-normal curve, or fit a model chosen for the process that generated the data.

Common mistakes

  • Using σ\sigma as the full width. The Gaussian FWHM is about 2.355σ2.355\sigma, not σ\sigma.
  • Forgetting the baseline. If the curve sits above zero, measure the peak height and half-height relative to CC.
  • Making the peak arbitrarily narrow. A narrow curve may match a few points but miss the data between them. Fit the width to measurements or a stated requirement.
  • Assuming every bell-like curve is Gaussian. A Gaussian is a useful symmetric model, not a universal law. Skewed, flat-topped, or heavy-tailed data may need another function.

If you only need a graph with a quick, symmetric peak, start with the Gaussian and tune aa, AA, CC, and σ\sigma. If the left and right sides behave differently, use an asymmetric model rather than trying to fix the mismatch by changing the height or center.

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.