Standard Normal Dist Transformation

  • Thread starter mrkb80
  • Start date
  • #1
mrkb80
41
0

Homework Statement


The question ask to find [itex]E[X]; E[X^2]; Var(X)[/itex] for the standard normal distribution [itex]f(x)=1/\sqrt{2\pi}e^{-x^2/2}[/itex]


Homework Equations


I found
[itex]
\begin{align}
E[X]&=\int_{-\infty}^\infty \! x*1/\sqrt{2\pi}e^{-x^2/2} \, \mathrm{d} x\\
&=1/\sqrt{2\pi} ( \int_{-\infty}^0 \! x*e^{-x^2/2} \, \mathrm{d} x + \int_{0}^{\infty} \! x*e^{-x^2/2} \, \mathrm{d} x )\\
&= 1/\sqrt{2\pi} ( (-1-0) + (0+1) )\\
&= 0
\end{align}
[/itex]
I found [itex]E[X^2]=1[/itex]
and [itex]Var[X]=1[/itex]. So far no problem.


The Attempt at a Solution


Now, I am asked to find the pdf, [itex]E[Y], Var[Y][/itex] of [itex]Y=|X|[/itex]
Since the inverse of [itex]Y=|X|[/itex] is [itex]X=|Y|[/itex] and the derivative of the inverse is 1. The transformation seems fairly straight forward.

[itex]f(y)=1/\sqrt{2\pi}e^{-|y|^2/2}[/itex]

I am just not sure about the domain of y, isn't it exactly the same as X because x is squared? Once I get that I should be able to use the same integration technique as above to find [itex]E[Y]; Var[Y][/itex] Wouldn't these values be exactly the same as [itex]E[X]; Var[X][/itex]? Something seems wrong here.
 
Last edited:

Answers and Replies

  • #2
jbunniii
Science Advisor
Homework Helper
Insights Author
Gold Member
3,475
257
[itex]f(y)=1/\sqrt{2\pi}e^{-|y|^2/2}[/itex]
No, this can't be right. Y = |X|, so Y can never be negative. Therefore f(y) must be zero for negative y. Your f(y) does not have that property.

[edit] Just saw your remark about the domain. Right, so as I said, f(y) must be zero for negative y. However, you can't simply write
[tex]f(y) = \left\{ \begin{array}{lr}
1/\sqrt{2\pi}e^{-|y|^2/2} & y \geq 0 \\
0 & \text{otherwise}
\end{array} \right.[/tex]
because that function will not integrate to 1. But I'm sure you can fix that easily enough.
 
  • #3
mrkb80
41
0
I guess then the inverse of [itex]Y=|X|[/itex] is not [itex]X=|Y|[/itex]. It must be something like
[itex] f(y) =1/\sqrt{2\pi}e^{-y^2/2} \, for \, y\geq0[/itex].Which I think means I'm only looking at half the distribution. The right half to be exact. Correct?
 
Last edited:
  • #4
jbunniii
Science Advisor
Homework Helper
Insights Author
Gold Member
3,475
257
I guess then the inverse of [itex]Y=|X|[/itex] is not [itex]X=|Y|[/itex]. It must be something like
[itex] f(y) =1/\sqrt{2\pi}e^{-y^2/2} \, for \, y\geq0[/itex].Which I think means I'm only looking at half the distribution. The right half to be exact. Correct?
Y = |X| doesn't have a (single-valued) inverse. For every nonzero value of Y, there are two values of X that give Y = |X|. You have to account for both of these. Hopefully you have seen an example of how to do this in your textbook or lecture?
 
  • #5
jbunniii
Science Advisor
Homework Helper
Insights Author
Gold Member
3,475
257
It must be something like
[itex] f(y) =1/\sqrt{2\pi}e^{-y^2/2} \, for \, y\geq0[/itex].Which I think means I'm only looking at half the distribution. The right half to be exact. Correct?
Yes, this is almost correct. However, because you chopped off the left half, it no longer integrates to 1. You have to re-scale it appropriately.
 
  • #6
mrkb80
41
0
So I must have to multiply it by 2.
[itex]f(y) =2/\sqrt{2\pi}e^{-y^2/2} \, for \, y\geq0[/itex] ?

I don't really see how an absolute value transformation works for a distribution that isn't the standard normal.

I'm confused.
 
  • #7
jbunniii
Science Advisor
Homework Helper
Insights Author
Gold Member
3,475
257
So I must have to multiply it by 2.
[itex]f(y) =2/\sqrt{2\pi}e^{-y^2/2} \, for \, y\geq0[/itex] ?

I don't really see how an absolute value transformation works for a distribution that isn't the standard normal.

I'm confused.
Yes, in general it's a bit more complicated. Here it was easier because the standard normal is symmetric around zero. To see how it works in a somewhat more general case, consider what happens if you start with a normal distribution that has nonzero mean. There's an expression for the PDF here:

http://en.wikipedia.org/wiki/Folded_normal_distribution

Note that it simplifies to your result if [itex]\mu = 0[/itex].

If your book doesn't cover how to calculate the density function when the transformation is not one-to-one, you can read about it here (and I would also recommend finding a better book!)

http://www.cl.cam.ac.uk/teaching/2003/Probability/prob11.pdf
 
  • #8
mrkb80
41
0
I do not like the main book, but I looked in the second book and I just realized how you would have to do it. You would need to break it up into parts that are monotone and add them together. Correct?
 
  • #9
mrkb80
41
0
So if my integration is correct
[itex]
\begin{align}
E[Y]&=\int_0^\infty \! 2/\sqrt{2\pi}e^{-y^2/2} \, dy \\
&=2/\sqrt{2\pi} (-e^{-y^2/2}|_0^ \infty)\\
&=2/\sqrt{2\pi}
\end{align}
[/itex]

and
[itex]Var(Y)=1-2/\pi[/itex]

Edit: I saw where you posted the link to the folded normal. These answers are correct. Thanks for your help!
 
Last edited:
  • #10
Ray Vickson
Science Advisor
Homework Helper
Dearly Missed
10,706
1,722

Homework Statement


The question ask to find [itex]E[X]; E[X^2]; Var(X)[/itex] for the standard normal distribution [itex]f(x)=1/\sqrt{2\pi}e^{-x^2/2}[/itex]


Homework Equations


I found
[itex]
\begin{align}
E[X]&=\int_{-\infty}^\infty \! x*1/\sqrt{2\pi}e^{-x^2/2} \, \mathrm{d} x\\
&=1/\sqrt{2\pi} ( \int_{-\infty}^0 \! x*e^{-x^2/2} \, \mathrm{d} x + \int_{0}^{\infty} \! x*e^{-x^2/2} \, \mathrm{d} x )\\
&= 1/\sqrt{2\pi} ( (-1-0) + (0+1) )\\
&= 0
\end{align}
[/itex]
I found [itex]E[X^2]=1[/itex]
and [itex]Var[X]=1[/itex]. So far no problem.


The Attempt at a Solution


Now, I am asked to find the pdf, [itex]E[Y], Var[Y][/itex] of [itex]Y=|X|[/itex]
Since the inverse of [itex]Y=|X|[/itex] is [itex]X=|Y|[/itex] and the derivative of the inverse is 1. The transformation seems fairly straight forward.

[itex]f(y)=1/\sqrt{2\pi}e^{-|y|^2/2}[/itex]

I am just not sure about the domain of y, isn't it exactly the same as X because x is squared? Once I get that I should be able to use the same integration technique as above to find [itex]E[Y]; Var[Y][/itex] Wouldn't these values be exactly the same as [itex]E[X]; Var[X][/itex]? Something seems wrong here.

[tex] E|X| = \int_{-\infty}^{\infty} |x| f(x) \, dx = 2 \int_0^{\infty} x f(x) \, dx.[/tex] This is not zero.

[tex]\text{Var}(|X|) = E(|X|^2) - (E|X|)^2 = E(X^2) -(E|X|)^2 = 1 - (E|X|)^2,[/tex] because EX2 is just the variance of X.

RGV
 
  • #11
mrkb80
41
0
The absolute value threw me because the inverse is not monotone. The book does a horrible job of explaining how to handle this case and instead focuses on the fact that it must be strictly increasing or decreasing in the domain for the transformation to work.

I guess another way to think about this problem would be to split the absolute value into two parts.
[itex]\int_0^\infty \! yf(y) dy \, + \int_0^\infty \! yf(y) dy [/itex]
since Y=|X| if I put postive values into x, I get postive y's and if I put negative values into x I get the same postive y's (hence the 2 times or the sum of integrals). Since x is defined for [itex] -\infty \le x \le \infty [/itex] I must transform the entire domain, but you can see that when I do this I get only postive y's, so the domain of y must be [itex] y \geq 0 [/itex].

Thanks everyone for the help.
 

Suggested for: Standard Normal Dist Transformation

Replies
3
Views
301
  • Last Post
Replies
3
Views
538
Replies
1
Views
298
  • Last Post
Replies
1
Views
318
Replies
7
Views
406
  • Last Post
Replies
6
Views
432
Replies
7
Views
394
Replies
58
Views
1K
Replies
1
Views
308
Top