clear all
close all
disp('Fit Lognormal to Renner Data')
  lw = 3; 
  set(0, 'DefaultAxesFontSize', 15);
  fs = 15;
  msize = 10;
% end of preabmle--------------------------------------

load 'C:\BESTAT\Norm\Normdat\renner.dat'
% middle of intervals of lenght 0.25
rennerx = renner(:,1);
% frequencies in the interval
rennerf = renner(:,2);

figure(1)
n = sum(renner(:,2)); % sample size (1573)
bar(rennerx,   rennerf./(0.25 * n))
hold on
   m = sum(log(rennerx) .* rennerf)/n   %m =-0.6083
   s = sqrt(   sum( rennerf .*(log(rennerx) - m).^2 )/n   ) %s=1.0040
xx = 0:0.01:8;
yy = lognpdf(xx, m, s);
plot(xx, yy, 'r-','linewidth',2)
% print -depsc 'C:\Springer\Norm\Normeps\renner.eps'
