m=20000;
g=rand(1,m);
for s=1:m
p(s)=-log(g(s));
end
m1=mean(p)

s1=std(p)^2
tt=1:1:100;p1=(1/m).*p;
hist(p,tt)