MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn moreOpportunities for recent engineering grads.

Apply Today**New to MATLAB?**

Asked by Ashish
on 12 Jun 2013

I have a dataset of a certain variable (100 values).

I want to find the mean and the variance of the dataset considering it follows a Lognormal distribution.

At last, I want to generate a random number from the Mean and Variance (found in the previous step).

*No products are associated with this question.*

Answer by Matt J
on 12 Jun 2013

Accepted answer

Formulas for the maximum likelihood estimate of the mean and variance are given here:

http://en.wikipedia.org/wiki/Log-normal_distribution#Maximum_likelihood_estimation_of_parameters

Show 1 older comment

Matt J
on 12 Jun 2013

Well, for example, the formula for the mean would be

mu_hat= mean(log(yourData));

Tom Lane
on 12 Jun 2013

This would be an estimate of the mu parameter, but that's not the mean of the lognormal. So if you really want the mean rather than mu, look elsewhere on that wikipedia page and see how to compute the mean from your mu and sigma estimates.

## 0 Comments