Gaussian function: Difference between revisions

From HandWiki
 
Rjetedi (talk | contribs)
url
 
Line 1: Line 1:
{{Short description|Mathematical function}}
{{Short description|Mathematical function}}
 
{{Redirect|Gaussian curve|the band|Gaussian Curve (band)}}
''See also:'' [[Wikipedia:Gaussian Curve (band)|Gaussian curve (disambiquation)]]
 
In [[Mathematics|mathematics]], a '''Gaussian function''', often simply referred to as a '''Gaussian''', is a [[Function (mathematics)|function]] of the base form
In [[Mathematics|mathematics]], a '''Gaussian function''', often simply referred to as a '''Gaussian''', is a [[Function (mathematics)|function]] of the base form
<math display="block">f(x) = \exp (-x^2)</math>
<math display="block">f(x) = \exp (-x^2)</math>
Line 16: Line 14:


== Properties ==
== Properties ==
Gaussian functions arise by composing the [[Exponential function|exponential function]] with a [[Concave function|concave]] [[Quadratic function|quadratic function]]:<math display="block">f(x) = \exp(\alpha x^2 + \beta x + \gamma),</math>where
Gaussian functions arise by composing the [[Exponential function|exponential function]] with a [[Concave function|concave]] [[Quadratic function|quadratic function]]:
* <math>\alpha = -1/2c^2,</math>
<math display="block">f(x) = \exp\left(\alpha x^2 + \beta x + \gamma\right),</math>
* <math>\beta = b/c^2,</math>
where
* <math>\gamma = \ln a-(b^2 / 2c^2).</math>
<math display="block">\alpha = -\tfrac12 c^2, \qquad \beta = \frac{b}{c^2}, \qquad \gamma = \ln a-\frac{b^2}{2c^2}.</math>
(Note: <math>a = 1/(\sigma\sqrt{2\pi}) </math> in <math> \ln a </math>, not to be confused with <math>\alpha = -1/2c^2</math>)
(Note: <math display="inline">a = \frac{1}{\sigma\sqrt{2\pi}} </math> in <math> \ln a </math>, not to be confused with <math display="inline">\alpha = -\tfrac12 c^2</math>)


The Gaussian functions are thus those functions whose [[Logarithm|logarithm]] is a concave quadratic function.
The Gaussian functions are thus those functions whose [[Logarithm|logarithm]] is a concave quadratic function.
Line 29: Line 27:


The function may then be expressed in terms of the FWHM, represented by {{mvar|w}}:
The function may then be expressed in terms of the FWHM, represented by {{mvar|w}}:
<math display="block">f(x) = a e^{-4 (\ln 2) (x - b)^2 / w^2}.</math>
<math display="block">f(x) = a \exp\left(-\frac{4 (\ln 2) (x - b)^2 }{ w^2}\right).</math>


Alternatively, the parameter {{mvar|c}} can be interpreted by saying that the two [[Inflection point|inflection point]]s of the function occur at {{math|1=<var>x</var> = <var>b</var> ± <var>c</var>}}.
Alternatively, the parameter {{mvar|c}} can be interpreted by saying that the two [[Inflection point|inflection point]]s of the function occur at {{math|1=<var>x</var> = <var>b</var> ± <var>c</var>}}.
Line 40: Line 38:
Gaussian functions are among those functions that are elementary but lack elementary [[Antiderivative|antiderivative]]s; the [[Integral|integral]] of the Gaussian function is the [[Error function|error function]]:  
Gaussian functions are among those functions that are elementary but lack elementary [[Antiderivative|antiderivative]]s; the [[Integral|integral]] of the Gaussian function is the [[Error function|error function]]:  


<math display="block">\int e^{-x^2} \,dx = \frac{\sqrt\pi}{2} \operatorname{erf} x + C.</math>
<math display="block">\int \exp\left(-x^2\right) \,dx = \frac{\sqrt\pi}{2} \operatorname{erf} x + C.</math>


Nonetheless, their improper integrals over the whole real line can be evaluated exactly, using the [[Gaussian integral]]
Nonetheless, their improper integrals over the whole real line can be evaluated exactly, using the [[Gaussian integral]]
<math display="block">\int_{-\infty}^\infty e^{-x^2} \,dx = \sqrt{\pi},</math>
<math display="block">\int_{-\infty}^\infty \exp\left(-x^2\right) \,dx = \sqrt{\pi},</math>
and one obtains
and one obtains
<math display="block">\int_{-\infty}^\infty a e^{-(x - b)^2 / (2c^2)} \,dx = ac \cdot \sqrt{2\pi}.</math>
<math display="block">\int_{-\infty}^\infty a \exp\left(-\frac{(x - b)^2 }{ 2c^2}\right) \,dx = ac \cdot \sqrt{2\pi}.</math>


[[Image:Normal Distribution PDF.svg|thumb|360px|right|[[Normalizing constant|Normalized]] Gaussian curves with [[Expected value|expected value]] {{mvar|μ}} and [[Variance|variance]] {{math|<var>σ</var>{{sup|2}}}}. The corresponding parameters are <math display="inline">a = \tfrac{1}{\sigma\sqrt{2\pi}}</math>, {{math|1=<var>b</var> = <var>μ</var>}} and {{math|1=<var>c</var> = <var>σ</var>}}.]]
[[Image:Normal Distribution PDF.svg|thumb|360px|right|[[Normalizing constant|Normalized]] Gaussian curves with [[Expected value|expected value]] {{mvar|μ}} and [[Variance|variance]] {{math|<var>σ</var>{{sup|2}}}}. The corresponding parameters are <math display="inline">a = \tfrac{1}{\sigma\sqrt{2\pi}}</math>, {{math|1=<var>b</var> = <var>μ</var>}} and {{math|1=<var>c</var> = <var>σ</var>}}.]]


This integral is 1 if and only if <math display="inline">a = \tfrac{1}{c\sqrt{2\pi}}</math> (the [[Normalizing constant|normalizing constant]]), and in this case the Gaussian is the [[Physics:Probability density function|probability density function]] of a [[Normal distribution|normally distributed]] [[Random variable|random variable]] with [[Expected value|expected value]] {{math|1=<var>μ</var> = <var>b</var>}} and [[Variance|variance]] {{math|1=<var>σ</var>{{sup|2}} = <var>c</var>{{sup|2}}}}:
This integral is 1 if and only if <math display="inline">a = \tfrac{1}{c\sqrt{2\pi}}</math> (the [[Normalizing constant|normalizing constant]]), and in this case the Gaussian is the [[Physics:Probability density function|probability density function]] of a [[Normal distribution|normally distributed]] [[Random variable|random variable]] with [[Expected value|expected value]] {{math|1=<var>μ</var> = <var>b</var>}} and [[Variance|variance]] {{math|1=<var>σ</var>{{sup|2}} = <var>c</var>{{sup|2}}}}:
<math display="block">g(x) = \frac{1}{\sigma\sqrt{2\pi}} \exp\left(\frac{-(x - \mu)^2}{2\sigma^2} \right).</math>
<math display="block">g(x) = \frac{1}{\sigma\sqrt{2\pi}} \exp\left(-\frac{(x - \mu)^2}{2\sigma^2} \right).</math>


These Gaussians are plotted in the accompanying figure.
These Gaussians are plotted in the accompanying figure.
Line 58: Line 56:
The Fourier [[Fourier transform#Uncertainty principle|uncertainty principle]] becomes an equality if and only if (modulated) Gaussian functions are considered.<ref>{{cite journal | last1=Folland | first1=Gerald B. | last2=Sitaram | first2=Alladi | title=The uncertainty principle: A mathematical survey | journal=The Journal of Fourier Analysis and Applications | volume=3 | issue=3 | date=1997 | issn=1069-5869 | doi=10.1007/BF02649110 | pages=207–238| bibcode=1997JFAA....3..207F }}</ref>
The Fourier [[Fourier transform#Uncertainty principle|uncertainty principle]] becomes an equality if and only if (modulated) Gaussian functions are considered.<ref>{{cite journal | last1=Folland | first1=Gerald B. | last2=Sitaram | first2=Alladi | title=The uncertainty principle: A mathematical survey | journal=The Journal of Fourier Analysis and Applications | volume=3 | issue=3 | date=1997 | issn=1069-5869 | doi=10.1007/BF02649110 | pages=207–238| bibcode=1997JFAA....3..207F }}</ref>


Taking the [[Fourier transform#Angular frequency (ω)|Fourier transform (unitary, angular-frequency convention)]] of a Gaussian function with parameters {{math|1=<var>a</var> = 1}}, {{math|1=<var>b</var> = 0}} and {{math|<var>c</var>}} yields another Gaussian function, with parameters <math>c</math>, {{math|1=<var>b</var> = 0}} and <math>1/c</math>.<ref>{{cite web |last=Weisstein|first=Eric W. |title=Fourier Transform – Gaussian |url=http://mathworld.wolfram.com/FourierTransformGaussian.html |publisher=[[MathWorld]] |access-date=19 December 2013 }}</ref> So in particular the Gaussian functions with {{math|1=<var>b</var> = 0}} and <math>c = 1</math> are kept fixed by the Fourier transform (they are [[Eigenfunction|eigenfunction]]s of the Fourier transform with eigenvalue&nbsp;1).
Taking the [[Fourier transform#Angular frequency (ω)|Fourier transform (unitary, angular-frequency convention)]] of a Gaussian function with parameters {{math|1=<var>a</var> = 1}}, {{math|1=<var>b</var> = 0}} and {{math|<var>c</var>}} yields another Gaussian function, with parameters <math>c</math>, {{math|1=<var>b</var> = 0}} and {{math|{{sfrac|1|<var>c</var>}}}}.<ref>{{cite web |last=Weisstein|first=Eric W. |title=Fourier Transform – Gaussian |url=https://mathworld.wolfram.com/FourierTransformGaussian.html |publisher=[[MathWorld]] |access-date=19 December 2013 }}</ref> So in particular the Gaussian functions with {{math|1=<var>b</var> = 0}} and {{math|1=<var>c</var> = a}} are kept fixed by the Fourier transform (they are [[Eigenfunction|eigenfunction]]s of the Fourier transform with eigenvalue&nbsp;1).
<!-- The way the Fourier transform is currently defined in its article (with pi in the exponent, also the way that I prefer), the Gaussian must also have a pi in its exponent. ~~~~ -->
<!-- The way the Fourier transform is currently defined in its article (with pi in the exponent, also the way that I prefer), the Gaussian must also have a pi in its exponent. ~~~~ -->
A physical realization is that of the [[Physics:Fraunhofer diffraction#Diffraction by an aperture with a Gaussian profile|diffraction pattern]]: for example, a photographic slide whose [[Physics:Transmittance|transmittance]] has a Gaussian variation is also a Gaussian function.
A physical realization is that of the [[Physics:Fraunhofer diffraction#Diffraction by an aperture with a Gaussian profile|diffraction pattern]]: for example, a photographic slide whose [[Physics:Transmittance|transmittance]] has a Gaussian variation is also a Gaussian function.


Using that the Gaussian function is an eigenfunction of the continuous Fourier transform, one obtains the following identity from the [[Poisson summation formula]]:
<!--
<math display="block">\sum_{k\in\mathbb{Z}} \exp\left(-\pi \left(\frac{k}{c}\right)^2\right) = c \sum_{k\in\mathbb{Z}} \exp\left(-\pi (kc)^2\right).</math>
Using [[Periodic summation|periodic summation]] and [[Discretization|discretization]] you can construct vectors from the Gaussian function,
that behave similarly under the [[Discrete Fourier transform]].
Comparing the zeroth coefficient of the Discrete Fourier transform of such a vector
with the periodic summation and discretization of the Continuous Fourier transform of the Gaussian yields the interesting identity:
-->
The fact that the Gaussian function is an eigenfunction of the continuous Fourier transform allows us to derive the following interesting{{clarify|date=August 2016}} identity from the [[Poisson summation formula]]:
<math display="block">\sum_{k\in\Z} \exp\left(-\pi \cdot \left(\frac{k}{c}\right)^2\right) = c \cdot \sum_{k\in\Z} \exp\left(-\pi \cdot (kc)^2\right).</math>


==Integral of a Gaussian function==
==Integral of a Gaussian function==
The integral of an arbitrary Gaussian function is<math display="block">\int_{-\infty}^\infty a\,e^{-(x - b)^2/2c^2}\,dx = \ a \, |c| \, \sqrt{2\pi}.</math>
The integral of an arbitrary Gaussian function is
<math display="block">\int_{-\infty}^\infty a \exp\left(-\frac{(x - b)^2}{2c^2}\right)\,dx = \ a \, |c| \, \sqrt{2\pi}.</math>


An alternative form is<math display="block">\int_{-\infty}^\infty k\,e^{-f x^2 + g x + h}\,dx = \int_{-\infty}^\infty k\,e^{-f \big(x - g/(2f)\big)^2 + g^2/(4f) + h}\,dx = k\,\sqrt{\frac{\pi}{f}}\,\exp\left(\frac{g^2}{4f} + h\right),</math>
An alternative form is
where ''f'' must be strictly positive for the integral to converge.
<math display="block">\begin{align}
\int_{-\infty}^\infty k \exp\left(-f x^2 + g x + h\right)\,dx  
&= \int_{-\infty}^\infty k\exp\left(-f \left(x - \frac{g}{2f}\right)^2 + \frac{g^2}{4f} + h\right)\,dx \\
&= k\,\sqrt{\frac{\pi}{f}}\,\exp\left(\frac{g^2}{4f} + h\right),
\end{align}</math>
where {{mvar|f}} must be strictly positive for the integral to converge.


===Relation to standard Gaussian integral===
===Relation to standard Gaussian integral===


The integral
The integral
<math display="block">\int_{-\infty}^\infty ae^{-(x - b)^2/2c^2}\,dx</math>
<math display="block">\int_{-\infty}^\infty a\exp\left(-\frac{(x - b)^2}{2c^2}\right)\,dx</math>
for some [[Real number|real]] constants ''a'', ''b'' and ''c'' > 0 can be calculated by putting it into the form of a [[Gaussian integral]]. First, the constant ''a'' can simply be factored out of the integral. Next, the variable of integration is changed from ''x'' to {{math|1=<var>y</var> = <var>x</var> − ''b''}}:
for some [[Real number|real]] constants {{math|''a'', ''b'', ''c'' > 0}} can be calculated by putting it into the form of a [[Gaussian integral]]. First, the constant {{mvar|a}} can simply be factored out of the integral. Next, the variable of integration is changed from {{mvar|x}} to {{math|1=<var>y</var> = <var>x</var> − ''b''}}:
<math display="block">a\int_{-\infty}^\infty e^{-y^2/2c^2}\,dy,</math>
<math display="block">a\int_{-\infty}^\infty \exp\left(-\frac{y^2}{2c^2}\right)\,dy,</math>
and then to <math>z = y/\sqrt{2 c^2}</math>:
and then to <math display="inline">z = \frac{y}{\sqrt{2 c^2}}</math>:
<math display="block">a\sqrt{2 c^2} \int_{-\infty}^\infty e^{-z^2}\,dz.</math>
<math display="block">a\sqrt{2 c^2} \int_{-\infty}^\infty \exp\left(-z^2\right)\,dz.</math>


Then, using the [[Gaussian integral|Gaussian integral identity]]
Then, using the [[Gaussian integral|Gaussian integral identity]]
<math display="block">\int_{-\infty}^\infty e^{-z^2}\,dz = \sqrt{\pi},</math>
<math display="block">\int_{-\infty}^\infty \exp\left(-z^2\right)\,dz = \sqrt{\pi},</math>


we have
we have
<math display="block">\int_{-\infty}^\infty ae^{-(x-b)^2/2c^2}\,dx = a\sqrt{2\pi c^2}.</math>
<math display="block">\int_{-\infty}^\infty a \exp\left(-\frac{(x-b)^2}{2c^2}\right)\,dx = a\sqrt{2\pi c^2}.</math>


== Two-dimensional Gaussian function ==
== Two-dimensional Gaussian function ==
[[File:Gaussian 2d surface.png|thumb|3d plot of a Gaussian function with a two-dimensional domain]]
[[File:Gaussian 2d surface.png|thumb|upright=2|3d plot of a Gaussian function with a two-dimensional domain]]
Base form:
Base form:
<math display="block">f(x,y) = \exp(-x^2-y^2)</math>
<math display="block">f(x,y) = \exp\left(-x^2-y^2\right)</math>


In two dimensions, the power to which ''e'' is raised in the Gaussian function is any negative-definite quadratic form.  Consequently, the [[Level set|level set]]s of the Gaussian will always be ellipses.
In two dimensions, the argument of the [[Exponential function|exponential function]] in the Gaussian function is any negative-definite [[Quadratic form|quadratic form]].  Consequently, the [[Level set|level set]]s of the Gaussian will always be ellipses.


A particular example of a two-dimensional Gaussian function is
A particular example of a two-dimensional Gaussian function is
Line 103: Line 113:


In general, a two-dimensional elliptical Gaussian function is expressed as
In general, a two-dimensional elliptical Gaussian function is expressed as
<math display="block">f(x, y) = A \exp\Big(-\big(a(x - x_0)^2 + 2b(x - x_0)(y - y_0) + c(y - y_0)^2 \big)\Big),</math>
<math display="block">f(x, y) = A \exp\left(-\left(a(x - x_0)^2 + 2b(x - x_0)(y - y_0) + c(y - y_0)^2 \right)\right),</math>
where the matrix
where the matrix
<math display="block">\begin{bmatrix} a & b \\ b & c \end{bmatrix}</math>
<math display="block">\begin{bmatrix} a & b \\ b & c \end{bmatrix}</math>
is [[Positive-definite matrix|positive-definite]].
is [[Positive-definite matrix|positive-definite]].


Using this formulation, the figure on the right can be created using {{math|1=''A'' = 1}}, {{math|1=(''x''<sub>0</sub>, ''y''<sub>0</sub>) = (0, 0)}}, {{math|1=''a'' = ''c'' = 1/2}}, {{math|1=''b'' = 0}}.
Using this formulation, the figure on the right can be created using {{math|1=''A'' = 1}}, {{math|1=(''x''<sub>0</sub>, ''y''<sub>0</sub>) = (0, 0)}}, {{math|1=''a'' = ''c'' = {{sfrac|1|2}}}}, {{math|1=''b'' = 0}}.


=== Meaning of parameters for the general equation ===
=== Meaning of parameters for the general equation ===
Line 125: Line 135:


<math display="block">\begin{align}
<math display="block">\begin{align}
\theta &= \frac{1}{2}\arctan\left(\frac{2b}{a-c}\right), \quad \theta \in [-45, 45], \\
\theta &= \frac{1}{2}\arctan\left(\frac{2b}{a-c}\right), \quad \theta \in \left[-\tfrac{\pi}4, \tfrac{\pi}4 \right], \\
\sigma_X^2 &= \frac{1}{2 (a \cdot \cos^2\theta + 2 b \cdot \cos\theta\sin\theta + c \cdot \sin^2\theta)}, \\
\sigma_X^2 &= \frac{1}{2 (a \cdot \cos^2\theta + 2 b \cdot \cos\theta\sin\theta + c \cdot \sin^2\theta)}, \\
\sigma_Y^2 &= \frac{1}{2 (a \cdot \sin^2\theta - 2 b \cdot \cos\theta\sin\theta + c \cdot \cos^2\theta)}.
\sigma_Y^2 &= \frac{1}{2 (a \cdot \sin^2\theta - 2 b \cdot \cos\theta\sin\theta + c \cdot \cos^2\theta)}.
Line 133: Line 143:


{|
{|
| [[Image:Gaussian 2d 0 degrees.png|thumb|200px|<math>\theta = 0</math>]]
| [[Image:Gaussian 2d 0 degrees.png|thumb|upright=1.5|<math>\theta = 0</math>]]
| [[Image:Gaussian 2d 30 degrees.png|thumb|200px|<math>\theta = -\pi/6</math>]]
| [[Image:Gaussian 2d 30 degrees.png|thumb|upright=1.5|<math>\theta = -\frac{\pi}{6}</math>]]
| [[Image:Gaussian 2d 60 degrees.png|thumb|200px|<math>\theta = -\pi/3</math>]]
| [[Image:Gaussian 2d 60 degrees.png|thumb|upright=1.5|<math>\theta = -\frac{\pi}{3}</math>]]
|}
|}


Line 182: Line 192:
{{main|Multivariate normal distribution}}
{{main|Multivariate normal distribution}}
In an <math>n</math>-dimensional space a Gaussian function can be defined as
In an <math>n</math>-dimensional space a Gaussian function can be defined as
<math display="block">f(x) = \exp(-x^\mathsf{T} C x),</math>
<math display="block">f(x) = \exp\left(-x^\mathsf{T} C x\right),</math>
where <math>x = \begin{bmatrix} x_1 & \cdots & x_n\end{bmatrix}</math> is a column of <math>n</math> coordinates, <math>C</math> is a [[Positive-definite matrix|positive-definite]] <math>n \times n</math> matrix, and <math>{}^\mathsf{T}</math> denotes [[Transpose|matrix transposition]].
where <math>x = \begin{bmatrix} x_1 & \cdots & x_n\end{bmatrix}</math> is a column of <math>n</math> coordinates, <math>C</math> is a [[Positive-definite matrix|positive-definite]] <math>n \times n</math> matrix, and <math>{}^\mathsf{T}</math> denotes [[Transpose|matrix transposition]].


The integral of this Gaussian function over the whole <math>n</math>-dimensional space is given as
The integral of this Gaussian function over the whole <math>n</math>-dimensional space is given as
<math display="block">\int_{\R^n} \exp(-x^\mathsf{T} C x) \, dx = \sqrt{\frac{\pi^n}{\det C}}.</math>
<math display="block">\int_{\R^n} \exp\left(-x^\mathsf{T} C x\right) \, dx = \sqrt{\frac{\pi^n}{\det C}}.</math>


It can be easily calculated by diagonalizing the matrix <math>C</math> and changing the integration variables to the eigenvectors of <math>C</math>.
It can be easily calculated by diagonalizing the matrix <math>C</math> and changing the integration variables to the eigenvectors of <math>C</math>.


More generally a shifted Gaussian function is defined as
More generally a shifted Gaussian function is defined as
<math display="block">f(x) = \exp(-x^\mathsf{T} C x + s^\mathsf{T} x),</math>
<math display="block">f(x) = \exp\left(-x^\mathsf{T} C x + s^\mathsf{T} x\right),</math>
where <math>s = \begin{bmatrix} s_1 & \cdots & s_n\end{bmatrix}</math> is the shift vector and the matrix <math>C</math> can be assumed to be symmetric, <math>C^\mathsf{T} = C</math>, and positive-definite. The following integrals with this function can be calculated with the same technique:
where <math>s = \begin{bmatrix} s_1 & \cdots & s_n\end{bmatrix}</math> is the shift vector and the matrix <math>C</math> can be assumed to be symmetric, <math>C^\mathsf{T} = C</math>, and positive-definite. The following integrals with this function can be calculated with the same technique:
<math display="block">\int_{\R^n} e^{-x^\mathsf{T} C x + v^\mathsf{T}x} \, dx = \sqrt{\frac{\pi^n}{\det{C}}} \exp\left(\frac{1}{4} v^\mathsf{T} C^{-1} v\right) \equiv \mathcal{M}.</math>
<math display="block">\int_{\R^n} e^{-x^\mathsf{T} C x + v^\mathsf{T}x} \, dx = \sqrt{\frac{\pi^n}{\det{C}}} \exp\left(\tfrac{1}{4} v^\mathsf{T} C^{-1} v\right) \equiv \mathcal{M}.</math>
<math display="block">\int_{\mathbb{R}^n} e^{- x^\mathsf{T} C x + v^\mathsf{T} x} (a^\mathsf{T} x) \, dx = (a^T u) \cdot \mathcal{M}, \text{ where } u = \frac{1}{2} C^{-1} v.</math>
 
<math display="block">\int_{\mathbb{R}^n} e^{- x^\mathsf{T} C x + v^\mathsf{T} x} (x^\mathsf{T} D x) \, dx = \left( u^\mathsf{T} D u + \frac{1}{2} \operatorname{tr} (D C^{-1}) \right) \cdot \mathcal{M}.</math>
<math display="block">\int_{\mathbb{R}^n} e^{- x^\mathsf{T} C x + v^\mathsf{T} x} \left(a^\mathsf{T} x\right) \, dx = \left(a^\mathsf{T} u\right) \cdot \mathcal{M}, \text{ where } u = \tfrac{1}{2} C^{-1} v.</math>
 
<math display="block">\int_{\mathbb{R}^n} e^{- x^\mathsf{T} C x + v^\mathsf{T} x} \left(x^\mathsf{T} D x\right) \, dx = \left( u^\mathsf{T} D u + \tfrac{1}{2} \operatorname{tr} \left(D C^{-1}\right) \right) \cdot \mathcal{M}.</math>
 
<math display="block">\begin{align}
<math display="block">\begin{align}
& \int_{\mathbb{R}^n} e^{- x^\mathsf{T} C' x + s'^\mathsf{T} x} \left( -\frac{\partial}{\partial x} \Lambda \frac{\partial}{\partial x} \right) e^{-x^\mathsf{T} C x + s^\mathsf{T} x} \, dx \\
& \int_{\mathbb{R}^n} e^{- x^\mathsf{T} C' x + s'^\mathsf{T} x} \left( -\frac{\partial}{\partial x} \Lambda \frac{\partial}{\partial x} \right) e^{-x^\mathsf{T} C x + s^\mathsf{T} x} \, dx \\
& \qquad = \left( 2 \operatorname{tr}(C' \Lambda C B^{- 1}) + 4 u^\mathsf{T} C' \Lambda C u - 2 u^\mathsf{T} (C' \Lambda s + C \Lambda s') + s'^\mathsf{T} \Lambda s \right) \cdot \mathcal{M},
& \qquad = \left( 2 \operatorname{tr}\left(C' \Lambda C B^{- 1}\right) + 4 u^\mathsf{T} C' \Lambda C u - 2 u^\mathsf{T} \left(C' \Lambda s + C \Lambda s'\right) + s'^\mathsf{T} \Lambda s \right) \cdot \mathcal{M},
\end{align}</math>
\end{align}</math>
where <math display="inline">u = \frac{1}{2} B^{- 1} v,\ v = s + s',\ B = C + C'.</math>
where
<math display="block">u = \tfrac{1}{2} B^{- 1} v,\quad v = s + s',\quad B = C + C'.</math>


== Estimation of parameters ==
== Estimation of parameters ==
Line 217: Line 231:
# The width of the peak is much larger than the distance between sample locations (i.e. the detector pixels must be at least 5 times smaller than the Gaussian FWHM).
# The width of the peak is much larger than the distance between sample locations (i.e. the detector pixels must be at least 5 times smaller than the Gaussian FWHM).
When these assumptions are satisfied, the following [[Covariance matrix|covariance matrix]] '''K''' applies for the 1D profile parameters <math>a</math>, <math>b</math>, and <math>c</math> under i.i.d. Gaussian noise and under Poisson noise:<ref name="Hagen1" />
When these assumptions are satisfied, the following [[Covariance matrix|covariance matrix]] '''K''' applies for the 1D profile parameters <math>a</math>, <math>b</math>, and <math>c</math> under i.i.d. Gaussian noise and under Poisson noise:<ref name="Hagen1" />
<math display="block"> \mathbf{K}_{\text{Gauss}} = \frac{\sigma^2}{\sqrt{\pi} \delta_X Q^2} \begin{pmatrix} \frac{3}{2c} &0 &\frac{-1}{a} \\ 0 &\frac{2c}{a^2} &0 \\ \frac{-1}{a} &0 &\frac{2c}{a^2} \end{pmatrix} \ ,
<math display="block"> \mathbf{K}_{\text{Gauss}} = \frac{\sigma^2}{\sqrt{\pi} \delta_X Q^2} \begin{pmatrix} \frac{3}{2c} &0 &-\frac{1}{a} \\ 0 &\frac{2c}{a^2} &0 \\ -\frac{1}{a} &0 &\frac{2c}{a^2} \end{pmatrix} \ ,
\qquad
\qquad
\mathbf{K}_\text{Poiss} = \frac{1}{\sqrt{2 \pi}} \begin{pmatrix} \frac{3a}{2c} &0 &-\frac{1}{2} \\ 0 &\frac{c}{a} &0 \\ -\frac{1}{2} &0 &\frac{c}{2a} \end{pmatrix} \ ,</math>
\mathbf{K}_\text{Poiss} = \frac{1}{\sqrt{2 \pi}} \begin{pmatrix} \frac{3a}{2c} &0 &-\frac{1}{2} \\ 0 &\frac{c}{a} &0 \\ -\frac{1}{2} &0 &\frac{c}{2a} \end{pmatrix} \ ,</math>
Line 238: Line 252:
<math display="block">\begin{align}
<math display="block">\begin{align}
\mathbf{K}_\text{Gauss} = \frac{\sigma^2}{\pi \delta_X \delta_Y Q^2} & \begin{pmatrix}
\mathbf{K}_\text{Gauss} = \frac{\sigma^2}{\pi \delta_X \delta_Y Q^2} & \begin{pmatrix}
\frac{2}{\sigma_X \sigma_Y} &0 &0 &\frac{-1}{A \sigma_Y} &\frac{-1}{A \sigma_X} \\
\frac{2}{\sigma_X \sigma_Y} &0 &0 &-\frac{1}{A \sigma_Y} &-\frac{1}{A \sigma_X} \\
  0 &\frac{2 \sigma_X}{A^2 \sigma_Y} &0 &0 &0 \\
  0 &\frac{2 \sigma_X}{A^2 \sigma_Y} &0 &0 &0 \\
  0 &0 &\frac{2 \sigma_Y}{A^2 \sigma_X} &0 &0 \\
  0 &0 &\frac{2 \sigma_Y}{A^2 \sigma_X} &0 &0 \\
  \frac{-1}{A \sigma_y} &0 &0 &\frac{2 \sigma_X}{A^2 \sigma_y} &0 \\
  -\frac{1}{A \sigma_y} &0 &0 &\frac{2 \sigma_X}{A^2 \sigma_y} &0 \\
  \frac{-1}{A \sigma_X} &0 &0 &0 &\frac{2 \sigma_Y}{A^2 \sigma_X}
  -\frac{1}{A \sigma_X} &0 &0 &0 &\frac{2 \sigma_Y}{A^2 \sigma_X}
\end{pmatrix} \\[6pt]
\end{pmatrix} \\[6pt]
\mathbf{K}_{\operatorname{Poisson}} = \frac{1}{2 \pi} & \begin{pmatrix}
\mathbf{K}_{\operatorname{Poisson}} = \frac{1}{2 \pi} & \begin{pmatrix}
  \frac{3A}{\sigma_X \sigma_Y} &0 &0 &\frac{-1}{\sigma_Y} &\frac{-1}{\sigma_X} \\
  \frac{3A}{\sigma_X \sigma_Y} &0 &0 &-\frac{1}{\sigma_Y} &-\frac{1}{\sigma_X} \\
  0 & \frac{\sigma_X}{A \sigma_Y} &0 &0 &0 \\ 0 &0 &\frac{\sigma_Y}{A \sigma_X} &0 &0 \\
  0 & \frac{\sigma_X}{A \sigma_Y} &0 &0 &0 \\ 0 &0 &\frac{\sigma_Y}{A \sigma_X} &0 &0 \\
  \frac{-1}{\sigma_Y} &0 &0 &\frac{2 \sigma_X}{3A \sigma_Y} &\frac{1}{3A} \\
  -\frac{1}{\sigma_Y} &0 &0 &\frac{2 \sigma_X}{3A \sigma_Y} &\frac{1}{3A} \\
  \frac{-1}{\sigma_X} &0 &0 &\frac{1}{3A} &\frac{2 \sigma_Y}{3A \sigma_X}
  -\frac{1}{\sigma_X} &0 &0 &\frac{1}{3A} &\frac{2 \sigma_Y}{3A \sigma_X}
  \end{pmatrix}.
  \end{pmatrix}.
\end{align}</math>
\end{align}</math>
Line 254: Line 268:


== Discrete Gaussian ==
== Discrete Gaussian ==
[[File:Discrete Gaussian kernel.svg|thumb|The discrete Gaussian kernel (solid), compared with the sampled Gaussian kernel (dashed) for scales <math>t = 0.5,1,2,4.</math>]]
[[File:Discrete Gaussian kernel.svg|thumb|The discrete Gaussian kernel (solid), compared with the sampled Gaussian kernel (dashed) for scales <math>t = \tfrac12,1,2,4.</math>]]
One may ask for a discrete analog to the Gaussian;
One may ask for a discrete analog to the Gaussian;
this is necessary in discrete applications, particularly [[Digital signal processing|digital signal processing]]. A simple answer is to sample the continuous Gaussian, yielding the sampled Gaussian kernel. However, this discrete function does not have the discrete analogs of the properties of the continuous function, and can lead to undesired effects, as described in the article [[Scale space implementation|scale space implementation]].
this is necessary in discrete applications, particularly [[Digital signal processing|digital signal processing]]. A simple answer is to sample the continuous Gaussian, yielding the sampled Gaussian kernel. However, this discrete function does not have the discrete analogs of the properties of the continuous function, and can lead to undesired effects, as described in the article [[Scale space implementation|scale space implementation]].
Line 267: Line 281:
Gaussian functions appear in many contexts in the natural sciences, the [[Social sciences|social sciences]], [[Mathematics|mathematics]], and [[Engineering:Engineering|engineering]].  Some examples include:
Gaussian functions appear in many contexts in the natural sciences, the [[Social sciences|social sciences]], [[Mathematics|mathematics]], and [[Engineering:Engineering|engineering]].  Some examples include:
* In [[Statistics|statistics]] and [[Probability theory|probability theory]], Gaussian functions appear as the density function of the [[Normal distribution|normal distribution]], which is a limiting [[Probability distribution|probability distribution]] of complicated sums, according to the [[Central limit theorem|central limit theorem]].
* In [[Statistics|statistics]] and [[Probability theory|probability theory]], Gaussian functions appear as the density function of the [[Normal distribution|normal distribution]], which is a limiting [[Probability distribution|probability distribution]] of complicated sums, according to the [[Central limit theorem|central limit theorem]].
* Gaussian functions are the [[Green's function]] for the (homogeneous and isotropic) [[Diffusion equation|diffusion equation]] (and to the [[Heat equation|heat equation]], which is the same thing), a [[Partial differential equation|partial differential equation]] that describes the time evolution of a mass-density under [[Physics:Diffusion|diffusion]]. Specifically, if the mass-density at time ''t''=0 is given by a Dirac delta, which essentially means that the mass is initially concentrated in a single point, then the mass-distribution at time ''t'' will be given by a Gaussian function, with the parameter '''''a''''' being linearly related to 1/{{radic|''t''}} and '''''c''''' being linearly related to {{radic|''t''}}; this time-varying Gaussian is described by the [[Heat kernel|heat kernel]]. More generally, if the initial mass-density is &phi;(''x''), then the mass-density at later times is obtained by taking the [[Convolution|convolution]] of &phi; with a Gaussian function. The convolution of a function with a Gaussian is also known as a [[Weierstrass transform]].
* Gaussian functions are the [[Green's function]] for the (homogeneous and isotropic) [[Diffusion equation|diffusion equation]] (and to the [[Heat equation|heat equation]], which is the same thing), a [[Partial differential equation|partial differential equation]] that describes the time evolution of a mass-density under [[Physics:Diffusion|diffusion]]. Specifically, if the mass-density at time ''t''=0 is given by a Dirac delta, which essentially means that the mass is initially concentrated in a single point, then the mass-distribution at time ''t'' will be given by a Gaussian function, with the parameter '''''a''''' being linearly related to {{sfrac|1|{{radic|''t''}}}} and '''''c''''' being linearly related to {{radic|''t''}}; this time-varying Gaussian is described by the [[Heat kernel|heat kernel]]. More generally, if the initial mass-density is &phi;(''x''), then the mass-density at later times is obtained by taking the [[Convolution|convolution]] of &phi; with a Gaussian function. The convolution of a function with a Gaussian is also known as a [[Weierstrass transform]].
* A Gaussian function is the [[Wave function|wave function]] of the [[Physics:Ground state|ground state]] of the [[Physics:Quantum harmonic oscillator|quantum harmonic oscillator]].
* A Gaussian function is the [[Wave function|wave function]] of the [[Physics:Ground state|ground state]] of the [[Physics:Quantum harmonic oscillator|quantum harmonic oscillator]].
* The [[Chemistry:Molecular orbital|molecular orbital]]s used in [[Chemistry:Computational chemistry|computational chemistry]] can be [[Linear combination|linear combination]]s of Gaussian functions called [[Physics:Gaussian orbital|Gaussian orbital]]s (see also [[Chemistry:Basis set|basis set]]).
* The [[Chemistry:Molecular orbital|molecular orbital]]s used in [[Chemistry:Computational chemistry|computational chemistry]] can be [[Linear combination|linear combination]]s of Gaussian functions called [[Physics:Gaussian orbital|Gaussian orbital]]s (see also [[Chemistry:Basis set|basis set]]).
Line 292: Line 306:


==External links==
==External links==
* [http://mathworld.wolfram.com/GaussianFunction.html Mathworld, includes a proof for the relations between c and FWHM]
* [https://mathworld.wolfram.com/GaussianFunction.html Mathworld, includes a proof for the relations between c and FWHM]
* {{MathPages|id=home/kmath045/kmath045|title=Integrating The Bell Curve}}
* {{MathPages|id=home/kmath045/kmath045|title=Integrating The Bell Curve}}
* [https://github.com/frecker/gaussian-distribution/ Haskell, Erlang and Perl implementation of Gaussian distribution]
* [https://github.com/frecker/gaussian-distribution/ Haskell, Erlang and Perl implementation of Gaussian distribution]

Latest revision as of 10:32, 14 April 2026

Short description: Mathematical function

In mathematics, a Gaussian function, often simply referred to as a Gaussian, is a function of the base form f(x)=exp(x2) and with parametric extension f(x)=aexp((xb)22c2) for arbitrary real constants a, b and non-zero c. It is named after the mathematician Carl Friedrich Gauss. The graph of a Gaussian is a characteristic symmetric "bell curve" shape. The parameter a is the height of the curve's peak, b is the position of the center of the peak, and c (the standard deviation, sometimes called the Gaussian RMS width) controls the width of the "bell".

Gaussian functions are often used to represent the probability density function of a normally distributed random variable with expected value μ = b and variance σ2 = c2. In this case, the Gaussian is of the form[1]

g(x)=1σ2πexp(12(xμ)2σ2).

Gaussian functions are widely used in statistics to describe the normal distributions, in signal processing to define Gaussian filters, in image processing where two-dimensional Gaussians are used for Gaussian blurs, and in mathematics to solve heat equations and diffusion equations and to define the Weierstrass transform. They are also abundantly used in quantum chemistry to form basis sets.

Properties

Gaussian functions arise by composing the exponential function with a concave quadratic function: f(x)=exp(αx2+βx+γ), where α=12c2,β=bc2,γ=lnab22c2. (Note: a=1σ2π in lna, not to be confused with α=12c2)

The Gaussian functions are thus those functions whose logarithm is a concave quadratic function.

The parameter c is related to the full width at half maximum (FWHM) of the peak according to

FWHM=22ln2c2.35482c.

The function may then be expressed in terms of the FWHM, represented by w: f(x)=aexp(4(ln2)(xb)2w2).

Alternatively, the parameter c can be interpreted by saying that the two inflection points of the function occur at x = b ± c.

The full width at tenth of maximum (FWTM) for a Gaussian could be of interest and is FWTM=22ln10c4.29193c.

Gaussian functions are analytic, and their limit as x → ∞ is 0 (for the above case of b = 0).

Gaussian functions are among those functions that are elementary but lack elementary antiderivatives; the integral of the Gaussian function is the error function:

exp(x2)dx=π2erfx+C.

Nonetheless, their improper integrals over the whole real line can be evaluated exactly, using the Gaussian integral exp(x2)dx=π, and one obtains aexp((xb)22c2)dx=ac2π.

Normalized Gaussian curves with expected value μ and variance σ2. The corresponding parameters are a=1σ2π, b = μ and c = σ.

This integral is 1 if and only if a=1c2π (the normalizing constant), and in this case the Gaussian is the probability density function of a normally distributed random variable with expected value μ = b and variance σ2 = c2: g(x)=1σ2πexp((xμ)22σ2).

These Gaussians are plotted in the accompanying figure.

The product of two Gaussian functions is a Gaussian, and the convolution of two Gaussian functions is also a Gaussian, with variance being the sum of the original variances: c2=c12+c22. The product of two Gaussian probability density functions (PDFs), though, is not in general a Gaussian PDF.

The Fourier uncertainty principle becomes an equality if and only if (modulated) Gaussian functions are considered.[2]

Taking the Fourier transform (unitary, angular-frequency convention) of a Gaussian function with parameters a = 1, b = 0 and c yields another Gaussian function, with parameters c, b = 0 and 1/c.[3] So in particular the Gaussian functions with b = 0 and c = a are kept fixed by the Fourier transform (they are eigenfunctions of the Fourier transform with eigenvalue 1). A physical realization is that of the diffraction pattern: for example, a photographic slide whose transmittance has a Gaussian variation is also a Gaussian function.

The fact that the Gaussian function is an eigenfunction of the continuous Fourier transform allows us to derive the following interesting[clarification needed] identity from the Poisson summation formula: kexp(π(kc)2)=ckexp(π(kc)2).

Integral of a Gaussian function

The integral of an arbitrary Gaussian function is aexp((xb)22c2)dx= a|c|2π.

An alternative form is kexp(fx2+gx+h)dx=kexp(f(xg2f)2+g24f+h)dx=kπfexp(g24f+h), where f must be strictly positive for the integral to converge.

Relation to standard Gaussian integral

The integral aexp((xb)22c2)dx for some real constants a, b, c > 0 can be calculated by putting it into the form of a Gaussian integral. First, the constant a can simply be factored out of the integral. Next, the variable of integration is changed from x to y = xb: aexp(y22c2)dy, and then to z=y2c2: a2c2exp(z2)dz.

Then, using the Gaussian integral identity exp(z2)dz=π,

we have aexp((xb)22c2)dx=a2πc2.

Two-dimensional Gaussian function

3d plot of a Gaussian function with a two-dimensional domain

Base form: f(x,y)=exp(x2y2)

In two dimensions, the argument of the exponential function in the Gaussian function is any negative-definite quadratic form. Consequently, the level sets of the Gaussian will always be ellipses.

A particular example of a two-dimensional Gaussian function is f(x,y)=Aexp(((xx0)22σX2+(yy0)22σY2)).

Here the coefficient A is the amplitude, x0y0 is the center, and σxσy are the x and y spreads of the blob. The figure on the right was created using A = 1, x0 = 0, y0 = 0, σx = σy = 1.

The volume under the Gaussian function is given by V=f(x,y)dxdy=2πAσXσY.

In general, a two-dimensional elliptical Gaussian function is expressed as f(x,y)=Aexp((a(xx0)2+2b(xx0)(yy0)+c(yy0)2)), where the matrix [abbc] is positive-definite.

Using this formulation, the figure on the right can be created using A = 1, (x0, y0) = (0, 0), a = c = 1/2, b = 0.

Meaning of parameters for the general equation

For the general form of the equation the coefficient A is the height of the peak and (x0, y0) is the center of the blob.

If we set a=cos2θ2σX2+sin2θ2σY2,b=sinθcosθ2σX2+sinθcosθ2σY2,c=sin2θ2σX2+cos2θ2σY2,then we rotate the blob by a positive, counter-clockwise angle θ (for negative, clockwise rotation, invert the signs in the b coefficient).[4]

To get back the coefficients θ, σX and σY from a, b and c use

θ=12arctan(2bac),θ[π4,π4],σX2=12(acos2θ+2bcosθsinθ+csin2θ),σY2=12(asin2θ2bcosθsinθ+ccos2θ).

Example rotations of Gaussian blobs can be seen in the following examples:

θ=0
θ=π6
θ=π3

Using the following Octave code, one can easily see the effect of changing the parameters:

A = 1;
x0 = 0; y0 = 0;

sigma_X = 1;
sigma_Y = 2;

[X, Y] = meshgrid(-5:.1:5, -5:.1:5);

for theta = 0:pi/100:pi
    a = cos(theta)^2 / (2 * sigma_X^2) + sin(theta)^2 / (2 * sigma_Y^2);
    b = sin(2 * theta) / (4 * sigma_X^2) - sin(2 * theta) / (4 * sigma_Y^2);
    c = sin(theta)^2 / (2 * sigma_X^2) + cos(theta)^2 / (2 * sigma_Y^2);

    Z = A * exp(-(a * (X - x0).^2 + 2 * b * (X - x0) .* (Y - y0) + c * (Y - y0).^2));

    surf(X, Y, Z);
    shading interp;
    view(-36, 36)
    waitforbuttonpress
end

Such functions are often used in image processing and in computational models of visual system function—see the articles on scale space and affine shape adaptation.

Also see multivariate normal distribution.

Higher-order Gaussian or super-Gaussian function or generalized Gaussian function

A more general formulation of a Gaussian function with a flat-top and Gaussian fall-off can be taken by raising the content of the exponent to a power P: f(x)=Aexp(((xx0)22σX2)P).

This function is known as a super-Gaussian function and is often used for Gaussian beam formulation.[5] This function may also be expressed in terms of the full width at half maximum (FWHM), represented by w: f(x)=Aexp(ln2(4(xx0)2w2)P).

In a two-dimensional formulation, a Gaussian function along x and y can be combined[6] with potentially different PX and PY to form a rectangular Gaussian distribution: f(x,y)=Aexp(((xx0)22σX2)PX((yy0)22σY2)PY). or an elliptical Gaussian distribution: f(x,y)=Aexp(((xx0)22σX2+(yy0)22σY2)P)

Multi-dimensional Gaussian function

In an n-dimensional space a Gaussian function can be defined as f(x)=exp(xTCx), where x=[x1xn] is a column of n coordinates, C is a positive-definite n×n matrix, and T denotes matrix transposition.

The integral of this Gaussian function over the whole n-dimensional space is given as nexp(xTCx)dx=πndetC.

It can be easily calculated by diagonalizing the matrix C and changing the integration variables to the eigenvectors of C.

More generally a shifted Gaussian function is defined as f(x)=exp(xTCx+sTx), where s=[s1sn] is the shift vector and the matrix C can be assumed to be symmetric, CT=C, and positive-definite. The following integrals with this function can be calculated with the same technique: nexTCx+vTxdx=πndetCexp(14vTC1v).

nexTCx+vTx(aTx)dx=(aTu), where u=12C1v.

nexTCx+vTx(xTDx)dx=(uTDu+12tr(DC1)).

nexTCx+s'Tx(xΛx)exTCx+sTxdx=(2tr(CΛCB1)+4uTCΛCu2uT(CΛs+CΛs)+s'TΛs), where u=12B1v,v=s+s,B=C+C.

Estimation of parameters

A number of fields such as stellar photometry, Gaussian beam characterization, and emission/absorption line spectroscopy work with sampled Gaussian functions and need to accurately estimate the height, position, and width parameters of the function. There are three unknown parameters for a 1D Gaussian function (a, b, c) and five for a 2D Gaussian function (A;x0,y0;σX,σY).

The most common method for estimating the Gaussian parameters is to take the logarithm of the data and fit a parabola to the resulting data set.[7][8] While this provides a simple curve fitting procedure, the resulting algorithm may be biased by excessively weighting small data values, which can produce large errors in the profile estimate. One can partially compensate for this problem through weighted least squares estimation, reducing the weight of small data values, but this too can be biased by allowing the tail of the Gaussian to dominate the fit. In order to remove the bias, one can instead use an iteratively reweighted least squares procedure, in which the weights are updated at each iteration.[8] It is also possible to perform non-linear regression directly on the data, without involving the logarithmic data transformation; for more options, see probability distribution fitting.

Parameter precision

Once one has an algorithm for estimating the Gaussian function parameters, it is also important to know how precise those estimates are. Any least squares estimation algorithm can provide numerical estimates for the variance of each parameter (i.e., the variance of the estimated height, position, and width of the function). One can also use Cramér–Rao bound theory to obtain an analytical expression for the lower bound on the parameter variances, given certain assumptions about the data.[9][10]

  1. The noise in the measured profile is either i.i.d. Gaussian, or the noise is Poisson-distributed.
  2. The spacing between each sampling (i.e. the distance between pixels measuring the data) is uniform.
  3. The peak is "well-sampled", so that less than 10% of the area or volume under the peak (area if a 1D Gaussian, volume if a 2D Gaussian) lies outside the measurement region.
  4. The width of the peak is much larger than the distance between sample locations (i.e. the detector pixels must be at least 5 times smaller than the Gaussian FWHM).

When these assumptions are satisfied, the following covariance matrix K applies for the 1D profile parameters a, b, and c under i.i.d. Gaussian noise and under Poisson noise:[9] 𝐊Gauss=σ2πδXQ2(32c01a02ca201a02ca2) ,𝐊Poiss=12π(3a2c0120ca0120c2a) , where δX is the width of the pixels used to sample the function, Q is the quantum efficiency of the detector, and σ indicates the standard deviation of the measurement noise. Thus, the individual variances for the parameters are, in the Gaussian noise case, var(a)=3σ22πδXQ2cvar(b)=2σ2cδXπQ2a2var(c)=2σ2cδXπQ2a2

and in the Poisson noise case, var(a)=3a22πcvar(b)=c2πavar(c)=c22πa.

For the 2D profile parameters giving the amplitude A, position (x0,y0), and width (σX,σY) of the profile, the following covariance matrices apply:[10]

𝐊Gauss=σ2πδXδYQ2(2σXσY001AσY1AσX02σXA2σY000002σYA2σX001Aσy002σXA2σy01AσX0002σYA2σX)𝐊Poisson=12π(3AσXσY001σY1σX0σXAσY00000σYAσX001σY002σX3AσY13A1σX0013A2σY3AσX). where the individual parameter variances are given by the diagonal elements of the covariance matrix.

Discrete Gaussian

The discrete Gaussian kernel (solid), compared with the sampled Gaussian kernel (dashed) for scales t=12,1,2,4.

One may ask for a discrete analog to the Gaussian; this is necessary in discrete applications, particularly digital signal processing. A simple answer is to sample the continuous Gaussian, yielding the sampled Gaussian kernel. However, this discrete function does not have the discrete analogs of the properties of the continuous function, and can lead to undesired effects, as described in the article scale space implementation.

An alternative approach is to use the discrete Gaussian kernel:[11] T(n,t)=etIn(t) where In(t) denotes the modified Bessel functions of integer order.

This is the discrete analog of the continuous Gaussian in that it is the solution to the discrete diffusion equation (discrete space, continuous time), just as the continuous Gaussian is the solution to the continuous diffusion equation.[11][12]

Applications

Gaussian functions appear in many contexts in the natural sciences, the social sciences, mathematics, and engineering. Some examples include:

See also

References

  1. Squires, G. L. (2001-08-30). Practical Physics (4 ed.). Cambridge University Press. doi:10.1017/cbo9781139164498. ISBN 978-0-521-77940-1. https://www.cambridge.org/core/product/identifier/9781139164498/type/book. 
  2. Folland, Gerald B.; Sitaram, Alladi (1997). "The uncertainty principle: A mathematical survey". The Journal of Fourier Analysis and Applications 3 (3): 207–238. doi:10.1007/BF02649110. ISSN 1069-5869. Bibcode1997JFAA....3..207F. 
  3. Weisstein, Eric W.. "Fourier Transform – Gaussian". MathWorld. https://mathworld.wolfram.com/FourierTransformGaussian.html. 
  4. Nawri, Nikolai. "Berechnung von Kovarianzellipsen". http://imkbemu.physik.uni-karlsruhe.de/~eisatlas/covariance_ellipses.pdf. 
  5. Parent, A., M. Morin, and P. Lavigne. "Propagation of super-Gaussian field distributions". Optical and Quantum Electronics 24.9 (1992): S1071–S1079.
  6. "GLAD optical software commands manual, Entry on GAUSSIAN command". 2016-12-15. http://www.aor.com/anonymous/pub/commands.pdf. 
  7. Caruana, Richard A.; Searle, Roger B.; Heller, Thomas.; Shupack, Saul I. (1986). "Fast algorithm for the resolution of spectra". Analytical Chemistry (American Chemical Society (ACS)) 58 (6): 1162–1167. doi:10.1021/ac00297a041. ISSN 0003-2700. 
  8. 8.0 8.1 Hongwei Guo, "A simple algorithm for fitting a Gaussian function," IEEE Sign. Proc. Mag. 28(9): 134-137 (2011).
  9. 9.0 9.1 N. Hagen, M. Kupinski, and E. L. Dereniak, "Gaussian profile estimation in one dimension," Appl. Opt. 46:5374–5383 (2007)
  10. 10.0 10.1 N. Hagen and E. L. Dereniak, "Gaussian profile estimation in two dimensions," Appl. Opt. 47:6842–6851 (2008)
  11. 11.0 11.1 Lindeberg, T., "Scale-space for discrete signals," PAMI(12), No. 3, March 1990, pp. 234–254.
  12. Campbell, J, 2007, The SMM model as a boundary value problem using the discrete diffusion equation, Theor Popul Biol. 2007 Dec;72(4):539–46.
  13. Haddad, R.A. and Akansu, A.N., 1991, A Class of Fast Gaussian Binomial Filters for Speech and Image processing, IEEE Trans. on Signal Processing, 39-3: 723–727
  14. Honarkhah, M and Caers, J, 2010, Stochastic Simulation of Patterns Using Distance-Based Pattern Modeling, Mathematical Geosciences, 42: 487–517

Further reading

  • Haberman, Richard (2013). "10.3.3 Inverse Fourier transform of a Gaussian". Applied Partial Differential Equations. Boston: PEARSON. ISBN 978-0-321-79705-6.