Mean[ Distribution ]

• To: mathgroup at christensen.cybernetics.net
• Subject: [mg1928] Mean[ Distribution ]
• From: wiener at finance.wharton.upenn.edu (Zvi Wiener)
• Date: Wed, 23 Aug 1995 22:31:10 -0400
• Organization: University of Pennsylvania

```Dear Mathematica users:

How can one use Statistics package to find expected value (and higher
moments) for a random variable which distribution is given by a standard
function?  Like this: I wish to find expected value of, say E^x, where x
is normally distributed:

In[1]:= <<Statistics`Master`
In[2]:= Mean[ NormalDistribution[0,.1]]
Out[2]= 0

this works OK!

In[3]:= Mean[ E^NormalDistribution[0,.1]]
NormalDistribution[0, 0.1]
Out[3]= Mean[E                          ]
But here I would like to have different answer

Of course I can do it manually like:

In[4]:= Integrate[ E^x*E^(-x^2/2), {x, -Infinity, Infinity}]
Out[4]= Sqrt[2 E Pi]

But I am sure there is a more straightforward way using the
NormalDistribution distribution.  HOW ?

Thank you in advance.
Zvi Wiener.
zwiener at lehman.com

```

• Prev by Date: Working with & plotting elevation represented as a 2D array
• Next by Date: Re: Q: Exponential or inversion of sparse matrices
• Previous by thread: Working with & plotting elevation represented as a 2D array
• Next by thread: Re: Q: Exponential or inversion of sparse matrices