jackaip
- 1
- 0
I am studying statistics and am interested in understanding the log normal distribution. From some discussion I gather that the log normal distributions arises from multiplicative effects while the normal distribution arises from additive effects. I generated the following MATLAB code to simulate the normal distribution.
clear
for j = 1:10000
S = 0;
for i = 1:1000
S = S + rand(1)-0.5;
end
T(j) = S;
end
hist(T,100)
If you add a bunch of random numbers between -0.5 and 0.5 you get more or less a gaussian
by the central limit theorem.
Now I am interested in simulating the log normal distribution, but not sure what to do. Has anyone ever tried this. I saw that if the variance grows in time in certain stock market models you can get a log normal distribution. Also the number of proteins in cells is more or less log normal distributed.
Thanks,
jackaip
clear
for j = 1:10000
S = 0;
for i = 1:1000
S = S + rand(1)-0.5;
end
T(j) = S;
end
hist(T,100)
If you add a bunch of random numbers between -0.5 and 0.5 you get more or less a gaussian
by the central limit theorem.
Now I am interested in simulating the log normal distribution, but not sure what to do. Has anyone ever tried this. I saw that if the variance grows in time in certain stock market models you can get a log normal distribution. Also the number of proteins in cells is more or less log normal distributed.
Thanks,
jackaip