Simulacija

n=100;(* spreminjajte: 10, 100, 1000, 100000 *)
X=RandomReal[ExponentialDistribution[2],{n}];
Histogram[X,Automatic,"PDF"]
Plot[2(E^(-2x)),{x,0,3}]
Plot[1-(E^(-2x)),{x,0,3}]
Show[%%%,%%,%]

vzorec={0.18,0.4,0.18644,0.123456789,0.54543,0.711,0.47,0.00007,0.356666543788833333646564777,0.444444444444444444444,0.456773,0.64679654,0.342210096548431178643,0.123456,0.2611,0.7,0.1234566789,0.8356,0.6527};(* vzorec, ki ga je generiral naš generator naključnih števil *)
Sort[vzorec]
Histogram[vzorec]
Histogram[vzorec,{0.1},"PDF"]

Transformacija

n=10000;(* spreminjajte velikost vzorca *)
X=RandomReal[ExponentialDistribution[2],{n}];
Histogram[X]
Y=(E^(-X)); (* spreminjajte konstanto v eksponentni funkciji - 2 je prava, poskusite tudi 1, 3, ... *)
Histogram[Y]

Transformacija (statistika)

n=10000;
λ=RandomReal[{0,10}];
X=RandomReal[ExponentialDistribution[λ],{n}];
Histogram[X]
m=Mean[X];
Y=(E^(-X/m));
Histogram[Y]

λ

m