I have some random numbers which are generated from Gaussian Distribution. But I don't know the mean, standard deviation of that distribution. How can I find them using random numbers?
-
3$\begingroup$ If the only thing you have available to you is the sample of random numbers, this is impossible. But you can estimate them by computing the empirical mean and standard deviation. $\endgroup$– ocramCommented Jan 8, 2012 at 9:08
-
$\begingroup$ @ocram Yeah, I have only large amount of random numbers generated from Gaussian Distribution. $\endgroup$– userCommented Jan 8, 2012 at 9:21
-
$\begingroup$ Then, both the mean and variance can be estimated from your sample. @David Robinson has clarified that point. $\endgroup$– ocramCommented Jan 8, 2012 at 9:42
1 Answer
You can estimate them. The best estimate of the mean of the Gaussian distribution is the mean of your sample- that is, the sum of your sample divided by the number of elements in it.
$$\bar{x} = \frac{1}{n}\sum_{i=1}^nx_i$$
The most common estimate of the standard deviation of a Gaussian distribution is
$$\bar{s} = \sqrt{\frac{1}{n-1}\sum_{i=1}^n\left(x_i - \bar{x}\right)^2}.$$
Here, $x_i$ is the $i^\text{th}$ number in your sample. See Wikipedia for details.
-
$\begingroup$ Thanks, edited to add this. But of course you meant to add 1/n. $\endgroup$ Commented Jan 8, 2012 at 21:46