E(X) and Var(X) for Normal Dist.

  • Thread starter Thread starter ArcanaNoir
  • Start date Start date
  • Tags Tags
    Normal
Click For Summary
SUMMARY

The discussion focuses on calculating the expected value E(X²) and E(aX² + b) for a normally distributed variable X with parameters 0 and σ². The integral for E(X²) is established as E(X²) = (1 / (σ√(2π))) ∫(−∞ to ∞) x²e^(−x²/(2σ²)) dx. Participants emphasize the use of integration by parts and the properties of the normal distribution, including the cumulative distribution function (CDF) Φ(x). The conversation highlights the necessity of numerical approximation for certain integrals related to the normal distribution.

PREREQUISITES
  • Understanding of normal distribution and its parameters (mean 0, variance σ²).
  • Familiarity with integration techniques, particularly integration by parts.
  • Knowledge of expected value calculations for random variables.
  • Ability to work with probability density functions (PDFs) and cumulative distribution functions (CDFs).
NEXT STEPS
  • Study the properties of the normal distribution, including the derivation of its moments.
  • Learn advanced integration techniques, specifically integration by parts and substitutions.
  • Explore numerical methods for approximating integrals that cannot be solved analytically.
  • Investigate the relationship between variance and expected values, particularly Var(X) = E(X²) - (E(X))².
USEFUL FOR

Students and professionals in statistics, mathematics, and data science who are working with normal distributions and require a deeper understanding of expected values and variance calculations.

ArcanaNoir
Messages
778
Reaction score
4

Homework Statement



Let X be normally distributed with the paremeters 0 and σ2. Find:
a. E(X2)
b. E(aX2+b)



Homework Equations



E(X) = \int_{-\infty}^{\infty} \! xf(x) \mathrm{d} x

E(X2) = \int_{-\infty}^{\infty} \! x^2f(x) \mathrm{d} x

E(aX+b) = aE(X)+b

The normal distribution with paremeters 0 and σ2 = ( \frac{1}{\sigma \sqrt{2 \pi }}) e^{ \frac{-x^2}{2 \sigma ^2}}

The Attempt at a Solution



a. E(X^2)= \frac{1}{ \sigma \sqrt{2 \pi }} \int_{-\infty}^{\infty} \! x^2e^{ \frac{-x^2}{2 \sigma ^2}} \mathrm{d} x

I don't knowhow to solve this integral. I think there might some tricks involved using the fact that this is a distribution function.

b. I just need to find E(X) which I start by setting up: E(X)= \frac{1}{ \sigma \sqrt{2 \pi }} \int_{-\infty}^{\infty} \! xe^{ \frac{-x^2}{2 \sigma ^2}} \mathrm{d} x

I don't know how to solve this integral either.

I also don't know how to solve the simpler integral \int e^{ \frac{-x^2}{2 \sigma ^2}} \mathrm{d} x
 
Physics news on Phys.org
Try integration by parts with
u = x,\, dv = xe^{-\frac {x^2}{2\sigma^2}}
Then you should be able to use the fact that the first moment is 0 and the fact that the normal distribution function is a distribution function.
 
Hi Arcana! :smile:

The integral \int_{-\infty}^x e^{-t^2}dt is proven to be unsolvable (with standard functions).

That's why they introduced a new function to deal with this (the cdf of the standard normal distribution):
\Phi(x) = {1 \over \sqrt{2\pi}} \int_{-\infty}^x e^{-t^2 \over 2}dt

\Phi has the property that \Phi(+\infty) = 1, but to find any regular function value it needs to be approximated numerically.

The trick for your problem is to use partial integration (as LCKurtz suggested).
Either you can solve directly, or you can reduce your formula to something like \int_{-\infty}^{+\infty} e^{-t^2 \over 2}dt and use that it is \sqrt{2\pi}.
 
ArcanaNoir said:

Homework Statement



Let X be normally distributed with the paremeters 0 and σ2. Find:
a. E(X2)
b. E(aX2+b)



Homework Equations



E(X) = \int_{-\infty}^{\infty} \! xf(x) \mathrm{d} x

E(X2) = \int_{-\infty}^{\infty} \! x^2f(x) \mathrm{d} x

E(aX+b) = aE(X)+b

The normal distribution with paremeters 0 and σ2 = ( \frac{1}{\sigma \sqrt{2 \pi }}) e^{ \frac{-x^2}{2 \sigma ^2}}

The Attempt at a Solution



a. E(X^2)= \frac{1}{ \sigma \sqrt{2 \pi }} \int_{-\infty}^{\infty} \! x^2e^{ \frac{-x^2}{2 \sigma ^2}} \mathrm{d} x

I don't knowhow to solve this integral. I think there might some tricks involved using the fact that this is a distribution function.

b. I just need to find E(X) which I start by setting up: E(X)= \frac{1}{ \sigma \sqrt{2 \pi }} \int_{-\infty}^{\infty} \! xe^{ \frac{-x^2}{2 \sigma ^2}} \mathrm{d} x

I don't know how to solve this integral either.

I also don't know how to solve the simpler integral \int e^{ \frac{-x^2}{2 \sigma ^2}} \mathrm{d} x

Don't you mean E(a X^2 + b) = a E(X^2) + b? I am surprised that you have not seen the standard result that \mbox{Var}(X) = E(X^2) - (EX)^2, which is true for _any_ random variable having finite mean and variance. It ought to be in your textbook or course notes.

RGV
 
I don't remember why I thought finding E(X) was going to help. As for E(X2), here is my attempt. And I'm sure I'm breaking tons of rules here.

E(X^2) = \frac{1}{ \sigma \sqrt{2 \pi }} \int_{-\infty}^{\infty} \! x^2e^{ \frac{-x^2}{2 \sigma ^2}} \mathrm{d} x
u=x^2 \mathrm{d} u=2x \mathrm{d} v v= \sqrt{2\pi } dv= e^{-\frac {x^2}{2\sigma^2}} \mathrm{d} x

\frac{1}{ \sigma \sqrt{2 \pi }} \int_{-\infty}^{\infty} \! x^2e^{ \frac{-x^2}{2 \sigma ^2}} \mathrm{d} x =
<br /> \frac{1}{ \sigma \sqrt{2 \pi }}( x^2 \sqrt{2\pi } ^{-\infty }_{\infty } - \sqrt{2\pi } \int_{-\infty}^{\infty} \! 2x \mathrm{d} x )

Am I messing it up? I don't think I'm on the right track.
 
Last edited:
For E[X^2], do integration by parts by putting

u=x,~v=xe^{\frac{-x^2}{2\sigma^2}}
 
Let's see.
We want to apply partial integration, which is:
\int u dv = u v - \int v du

I hope you don't mind that I point out a few rules that you are breaking. :shy:
Perhaps we can fix that.


ArcanaNoir said:
I don't remember why I thought finding E(X) was going to help. As for E(X2), here is my attempt. And I'm sure I'm breaking tons of rules here.

E(X^2) = \frac{1}{ \sigma \sqrt{2 \pi }} \int_{-\infty}^{\infty} \! x^2e^{ \frac{-x^2}{2 \sigma ^2}} \mathrm{d} x

u=x^2\mathrm{d} u=2x \mathrm{d} v

With your choice for u this should be: \mathrm{d} u=2x \mathrm{d} x


ArcanaNoir said:
v= \sqrt{2\pi }

With this choice for v, we would get: dv = 0.
That can't be right. :confused:


ArcanaNoir said:
dv= e^{-\frac {x^2}{2\sigma^2}} \mathrm{d} x

With this choice for dv, I don't see how you can figure out v, since this expression does not have an anti-derivative (expressed in standard functions).


ArcanaNoir said:
\frac{1}{ \sigma \sqrt{2 \pi }} \int_{-\infty}^{\infty} \! x^2e^{ \frac{-x^2}{2 \sigma ^2}} \mathrm{d} x =
<br /> \frac{1}{ \sigma \sqrt{2 \pi }}( x^2 \sqrt{2\pi } ^{-\infty }_{\infty } - \sqrt{2\pi } \int_{-\infty}^{\infty} \! 2x \mathrm{d} x )

There should be a vertical line in there, and the limits should be switched around.
But let's take care of that when the rest is in order.


ArcanaNoir said:
Am I messing it up? I don't think I'm on the right track.

Only a little bit.
It needs to be tweaked a bit to get on the right track.


I recommend using:
u = xdv = x e^{-\frac {x^2}{2\sigma^2}} \mathrm{d} x

Of course this means that you have to integrate dv to find v...
 
Hooray! The problem is solved! Thanks team :)
 
I can't speak for the others in this thread, but I am curious to see what you did.
 
  • #10
it mostly went down in chat, lots of integrating with substitutions and by parts.
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
2K
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
6
Views
2K
Replies
9
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 105 ·
4
Replies
105
Views
7K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 14 ·
Replies
14
Views
2K