Why does the python code calculate a very large variance for the lognormal distribution

54 Views Asked by At

enter image description hereThe final answer is Income y: Mean = 2484.87, Variance = 5650460.07, Gini = 0.4295 Consumption c: Mean = 2236.54, Variance = 2373130.74, Gini = 0.3159 I don't think this is correct. I want to verify that for an exponential normal distribution, the variance should be this large, and if not, how should I go about modifying it? Thanks so much.

1

There are 1 best solutions below

0
lastchance On

Remember that it is the logarithm of y that has a normal distribution with mean mu and variance sigma^2; y itself can then be very large.

The mean of the lognormal distribution is exp(mu+sigma^2/2) and the variance is exp(2.mu+sigma^2)*(exp(sigma^2)-1). With your parameters (mu=7.5 and sigma=0.8) this gives mean=2489.9 and variance=5557849.

This is perfectly in line with your statistics for y. So - no worries!

BTW: please give code samples as code samples, not images.