Density Function ---------------- The Generalized Gaussian density has the following form: $\mathcal{GG}(x;\rho) = \frac{1}{2\, \Gamma(1+1/\rho)}\exp(-\|x\|^{\rho})$ where $\rho$ (rho) is the "shape parameter". The density isplotted in the following figure: ![Image:Ggpdf.png](Ggpdf.png) Matlab code used to generate this figure is available here: [ggplot.m](ggcode). Adding an arbitrary location parameter, $\mu$, and inverse scaleparameter, $\beta$, the density has the form, $\mathcal{GG}(x;\mu,\beta,\rho) = \frac{\beta^{1\!/2} }{2\,\Gamma(1+1/\rho)} \exp(-\beta^{\rho/2}\|x-\mu\|^{\rho})$ ![Image:Ggpdf2.png](Ggpdf2.png) Matlab code used to generate this figure is available here: [ggplot2.m](ggcode2). Generating Random Samples ------------------------- Samples from the Generalized Gaussian can be generated by a transformation of Gamma random samples, using the fact that if $Y$is a $\text{Gamma}(1/\rho,1)$ distributed random variable, and$S$ is an independent random variable taking the value -1 or +1with equal probability, then, $X = S \cdot \|Y\|^{1/\rho}$ is distributed $\mathcal{GG}(x;0,1,\rho)$. That is, $Y \sim \text{Gamma}(1/\rho,1)\\ S \sim \mbox{\frac{1}{2}}\, $S=-1$ + \mbox{\frac{1}{2}}\, $S=1$\\ \mu + \beta^{-1/2} S \cdot \|Y\|^{1/\rho} \sim \mathcal{GG}(x;\mu,\beta,\rho)$ where the density of $S$ is written in a non-standard butsuggestive form. Matlab Code ----------- Matlab code to generate random variates from the Generalized Gaussian density with parameters as described here is here: [gg6.m](gg6.m) As an example, we generate random samples from the example Generalized Gaussian densities shown above. ![Image:Ggpdf3.png](Ggpdf3.png) Matlab code used to generate this figure is available here: [ggplot3.m](ggcode3). Mixture Densities ----------------- A more general family of densities can be constructed from mixtures of Generalized Gaussians. A mixture density, $p_M(x)$, is made up of $m$ constituent densities$p_j(x),\, j = 1,\ldots,m,$ together with probabilities$\alpha_j$ associated with each constituent density. $p_M(x) = \sum_{j=1}^m \alpha_j p_j(x)$ The densities $p_j(x)$ have different forms, or parameter values. Arandom variable with a mixture density can be thought of as being generated by a two-part process: first a decision is made as to which constituent density to draw from, where the $j\text{th}$ densityis chosen with probability $\alpha_j$, then the value of therandom variable is drawn from the chosen density. Independent repetitions of this process result in a sample having the mixture density $p_M$. As an example consider the density, $\mbox{\frac{1}{2}}\,\mathcal{GG}(x;-2,1,1) +\mbox{\frac{2}{10}}\,\mathcal{GG}(x;0,1,2) + \mbox{\frac{3}{10}}\,\mathcal{GG}(x;2,1,10)$ !![500px](Ggmix1.png)!![500px](Ggmix2.png) Matlab code used to generate these figures is available here: [ggplot4.m](ggcode4).