Message Boards Message Boards

0
|
1956 Views
|
2 Replies
|
3 Total Likes
View groups...
Share
Share this post:

Gaussian Integration didn't give correct result

Posted 1 year ago

As shown in the noteboook, I was calculating the variance of a Gaussian distribution centered at x=0. The correct result should be just w^2, which is a property of Gaussian distribution. The result here is not only wrong, but even still has x in the formula, which is not what I would expect after an integration. Can anyone see what the problem here is? Did I type the formula in a correct way? I'm new to Mathematica.

POSTED BY: Wei Liang
2 Replies
Posted 1 year ago

Ah, silly me. Thanks Claude!

POSTED BY: Wei Liang

Bounds are necessary.

Integrate[x^2/E^(x^2/(2*w^2)), { x, -\[Infinity], \[Infinity]}, 
  Assumptions -> w > 0]/
 Integrate[E^(-(x^2/(2*w^2))), { x, -\[Infinity], \[Infinity]}, 
  Assumptions -> w > 0]

works perfectly.

POSTED BY: Claude Mante
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract