# Computing for any general function whose variable is a gaussian

If I have a variable X whose gaussian distribution is known and let f be a known function, is there a way to compute f(X) (i.e) the resulting gaussian distribution from this? Is the result actually a gaussian distribution?

#### Office_Shredder

Staff Emeritus
Gold Member
It won't be a gaussian distribution in general. For example if f(x) = x2 then you get what's called the chi-squared distribution with one degree of freedom (k degrees of freedom is adding the square of k gaussians). These are not gaussian (in fact it always has to give a positive number)

It won't be a gaussian distribution in general. For example if f(x) = x2 then you get what's called the chi-squared distribution with one degree of freedom (k degrees of freedom is adding the square of k gaussians). These are not gaussian (in fact it always has to give a positive number)
$E(f(z))= \int_{-\inf}^{\inf}{f(z)e^{-\frac{z^2}{2}}}dz$

What about this above relation? Found it somewhere and it said this is for finding the expected value of f(z) when z is a random variable with gaussian distro.

#### Office_Shredder

Staff Emeritus
Gold Member
That's correct except there should be a 1/sqrt(2pi) in there. In general if you have a probability density function p(x) for a random variable X, then
$$E(f(X)) = \int_{-\infty}^{\infty} f(x) p(x) dx$$
In this case your p(x) is the Gaussian density.

That's correct except there should be a 1/sqrt(2pi) in there. In general if you have a probability density function p(x) for a random variable X, then
$$E(f(X)) = \int_{-\infty}^{\infty} f(x) p(x) dx$$
In this case your p(x) is the Gaussian density.
If you don't mind, can you write down the correct expression with the pi?

That's correct except there should be a 1/sqrt(2pi) in there. In general if you have a probability density function p(x) for a random variable X, then
$$E(f(X)) = \int_{-\infty}^{\infty} f(x) p(x) dx$$
In this case your p(x) is the Gaussian density.
$E(f(z))= \frac{1}{sqrt(2\pi)}\int_{-\inf}^{\inf}{f(z)e^{-\frac{z^2}{2}}}dz$

Is this the right expression?

Mod note: Fixed it for you. The LaTeX for infinity is \infty, not \inf. And for the square root, it's \sqrt
$$E(f(z))= \frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty}{f(z)e^{-\frac{z^2}{2}}}dz$$

Last edited by a moderator:

#### Office_Shredder

Staff Emeritus
Gold Member
That looks correct. That doesn't say anything about what the distribution of f is, all you are being told is what the expected value is

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving