Pseudo random number generation for sum of normal-distributed values

357 Views Asked by At

Les us give N distribution functions $f_{1}, f_{1},... f_{N}$ each for normal distributed random value (with shifted from zero mean vector) on n-dimensional space $\mathbb{R}^{n}$. We can construct an arithmetical mean of them which also will be a distribution function for some vector random value. How can I generate random values based on this new random value from uniform distribution?

For N=1 this task can be solved by Box–Muller transform, but what if I need to generate random vectors based on sum of two, three or more normal distributions?

1

There are 1 best solutions below

0
On BEST ANSWER

Suppose we have $N$ probability distribution functions (pdfs) $f_m(x)$. Since they are pdfs, each of the $f_m(x)$ satisfies $f_m(x) \ge 0$ and $\int_{-\infty}^{\infty} dx\, f_m(x) = 1$. It is assumed that we have a method for generating samples from each of these pdfs. Define their weighted mean $f(x)$ as $$ f(x) = \sum_{m=1}^N \alpha_m\, f_m(x)\, , $$ with weights $0\le \alpha_m \le 1$ such that $\sum_{m=1}^{N}\alpha_m = 1$. $f(x)$ is then also a pdf, since clearly $f(x)\ge 0$ and \begin{align} \int_{-\infty}^{\infty}dx\, f(x) &= \sum_{m=1}^N \alpha_m\, \int_{-\infty}^{\infty}dx\, f_m(x)\\ &= \sum_{m=1}^N \alpha_m \times 1\\ &= 1\, . \end{align}

To generate a random sample $X$ from the pdf $f(x)$, first pick a random integer $1\le m\le N$ from the discrete distribution with probabilities $\alpha_m$. (This link describes methods for this.) Then set $X$ equal to a sample generated from the distribution $f_m(x)$.

To see heuristically why this works, imagine generating many samples in this fashion, and filling in a histogram to describe their distribution. Each sample will have a probability $\alpha_m$ of populating the "sub-histogram" associated with $f_m(x)$. Clearly, then, the resulting distribution will be a weighted mean of the "sub-distributions" $f_m(x)$.