%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Let's try the lognormal distribution %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %The normal and lognormal distributions are closely related. %If X is distributed lognormal with parameters µ and sigma, % then ln(X) is distributed normal with parameters µ and sigma. %The lognormal distribution is often applicable % *when something multiplicative causes the distribution % *the quantity of interest must be positive, % since ln(X) exists only when X is positive. %Economists often model the distribution of income % using a lognormal distribution. %Cumulative population size is distributed this way. % (something multiplicative causes the distribution...) help lognpdf %for more details %which parameters do you need to set? clear all close all mu=40000; % set the mean sigma=1.25; % set the standard deviation x = (10:1000:125010)'; % set the range of x figure(20) y = lognpdf(x,log(mu),sigma); plot(x,y); text(mu,.1E-5,['\downarrowmean = ' num2str(mu)],'FontSize',16) set(gca,'xtick',[0 30000 60000 90000 120000]) set(gca,'xticklabel',str2mat('0','30,000','60,000',... '90,000','120,000')) title(['Lognormal Distribution, \mu =' num2str(mu) ', \sigma = ' num2str(sigma)]) xlabel('outcome') ylabel('probability density')