Wikipedia / Gaussian function
Wikipedia / Gaussian function
In mathematics, a Gaussian function, often simply referred to as a Gaussian, is a function for arbitrary real constants , and non-zero . It is named after the mathematician Carl Friedrich Gauss. The graph of a Gaussian is a characteristic symmetric "bell curve" shape. The parameter is the height of the curve's peak, is the horizontal position of the center of the peak, and (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 and variance . In this case, the Gaussian is of the form
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)
The Gaussian functions are thus those functions whose logarithm is a concave quadratic function.
The parameter is related to the full width at half maximum (FWHM) of the peak according to
The function may then be expressed in terms of the FWHM, represented by
Alternatively, the parameter can be interpreted by saying that the two inflection points of the function occur at .
The full width at tenth of maximum
Gaussian functions are analytic, and their limit as is0 (for the above case of ).
Gaussian functions are among those functions that are elementary but lack elementary antiderivatives; the integral of the Gaussian function is the error function:
Nonetheless, their improper integrals over the whole real line can be evaluated exactly, using the Gaussian integral
(the normalizing constant), and in this case the Gaussian is the probability density function of a normally distributed random variable with expected value and variance
These Gaussians are plotted in the accompanying figure.
The product of two Gaussian functions is a Gaussian, and the convolution. 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.
Taking the Fourier transform (unitary, angular-frequency convention) of a Gaussian function with parameters , and , and . So in particular the Gaussian functions with and are kept fixed by the Fourier transform (they are eigenfunctions of the Fourier transform with eigenvalue1). 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 identity from the Poisson summation formula
Integral of a Gaussian function
where must be strictly positive for the integral to converge.
Relation to standard Gaussian integral
for some real constants can be calculated by putting it into the form of a Gaussian integral. First, the constant can simply be factored out of the integral. Next, the variable of integration is changed from to
Then, using the Gaussian integral identity
Two-dimensional Gaussian function
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
Here the coefficient A is the amplitude, x0,y0 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.
Using this formulation, the figure on the right can be created using , , , .
Meaning of parameters for the general equation
For the general form of the equation the coefficient A is the height of the peak and is the center of the blob.
(for negative, clockwise rotation, invert the signs in the b coefficient).
use
Example rotations of Gaussian blobs can be seen in the following examples:Using the following Octave code, one can easily see the effect of changing the parameters:
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
This function is known as a super-Gaussian function and is often used for Gaussian beam formulation. This function may also be expressed in terms of the full width at half maximum (FWHM), represented by
can be combined
Multi-dimensional Gaussian function
is a positive-definite denotes matrix transposition.
.
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.
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. 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. 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.
The noise in the measured profile is either i.i.d. Gaussian, or the noise is Poisson-distributed.
The spacing between each sampling (i.e. the distance between pixels measuring the data) is uniform.
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.
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 under i.i.d. Gaussian noise and under Poisson noise:
of the profile, the following covariance matrices apply:
where the individual parameter variances are given by the diagonal elements of the covariance matrix.
Discrete Gaussian
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: 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.
Applications
Gaussian functions appear in many contexts in the natural sciences, the social sciences, mathematics, and engineering. Some examples include:
In statistics and probability theory, Gaussian functions appear as the density function of the normal distribution, which is a limiting probability distribution of complicated sums, according to the central limit theorem.
Gaussian functions are the Green's function for the (homogeneous and isotropic) diffusion equation (and to the heat equation, which is the same thing), a partial differential equation that describes the time evolution of a mass-density under 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 and c being linearly related to ; this time-varying Gaussian is described by the heat kernel. More generally, if the initial mass-density is (x), then the mass-density at later times is obtained by taking the convolution of 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 of the ground state of the quantum harmonic oscillator.
The molecular orbitals used in computational chemistry can be linear combinations of Gaussian functions called Gaussian orbitals (see also basis set (chemistry)).
Mathematically, the derivatives of the Gaussian function can be represented using Hermite functions. For unit variance, the n-th derivative of the Gaussian is the Gaussian function itself multiplied by the n-th Hermite polynomial, up to scale.
Consequently, Gaussian functions are also associated with the vacuum state in quantum field theory.
Gaussian beams are used in optical systems, microwave systems and lasers.
In scale space representation, Gaussian functions are used as smoothing kernels for generating multi-scale representations in computer vision and image processing. Specifically, derivatives of Gaussians (Hermite functions) are used as a basis for defining a large number of types of visual operations.
Gaussian functions are used to define some types of artificial neural networks.
In fluorescence microscopy a 2D Gaussian function is used to approximate the Airy disk, describing the intensity distribution produced by a point source.
In signal processing they serve to define Gaussian filters, such as in image processing where 2D Gaussians are used for Gaussian blurs. In digital signal processing, one uses a discrete Gaussian kernel, which may be approximated by the Binomial coefficient or sampling a Gaussian.
In geostatistics they have been used for understanding the variability between the patterns of a complex training image. They are used with kernel methods to cluster the patterns in the feature space.
See also
References
Further reading
External links
Mathworld, includes a proof for the relations between c and FWHM
Haskell, Erlang and Perl implementation of Gaussian distribution