- Thread starter
- Admin
- #1

- Jan 26, 2012

- 4,041

**Problem:**

I need to use the Monte Carlo method to generate the mean, variance and kurtosis of the standard normal distribution. It has to be coded in Matlab, so there are two parts to this question:

1) The theory

2) The code

Any help on either is appreciated.

**My attempt:**

To find $E[X]$ for a random variable we can use the definition \(\displaystyle E[X]=\int_{-\infty}^{\infty}x*f(x)dx\), where $f(x)$ is the distribution's pdf.

I believe the first step is to general a random sample to use. Now my thought is to use random standard uniform variables on $[0,1]$ but I'm not sure.

Once we do that we find the mean for each $X$ and average them for n samples. It should converge to 0.

There are clearly some mistakes here in the set up so any guidance or comments is appreciated.