%
%  macm 202 -- 04 mar 03 -- djm
%
%  w9edf2.m:  exponential distribution
%     - transformed data

%  make exponential transform based on known mu
zsort    = 1 - exp(-mu*xsort);

%  plot transformed data

figure(3);  clf
plot(zsort,frac_hi,'k*')
hold on
plot(zsort,frac_lo,'k.')
title(['\bf EDF of transformed, ordered randoms'])
ylabel('\bf fraction of empirical data below z')
xlabel('\bf transformed random data: z_{(i)}')

%  connect the dots!
edfx = [zsort ; zsort];
edfy = [frac_lo ; frac_hi];
plot(edfx(:),edfy(:),'b')

%  perfect line
plot([0 1],[0 1],'r')