Open in the MATLAB editor: g08cl_example
function g08cl_example fprintf('g08cl example results\n\n'); y = [0.4782745, 1.2858962, 1.1163891, 2.0410619, 2.2648109, 0.0833660, ... 1.2527554, 0.4031288, 0.7808981, 0.1977674, 3.2539440, 1.8113504, ... 1.2279834, 3.9178773, 1.4494309, 0.1358438, 1.8061778, 6.0441929, ... 0.9671624, 3.2035042, 0.8067364, 0.4179364, 3.5351774, 0.3975414, ... 0.6120960, 0.1332589]; % Let g08cl sort the data issort = false; % Calculate a-squared and probability [ybar, a2, aa2, p, ifail] = g08cl( ... issort, y); % Results fprintf('H0: data from exponential distribution with mean %10.4e\n', ybar); fprintf('Test statistic, A-squared: %8.4f\n', a2); fprintf('Adjusted A-squared: %8.4f\n', aa2); fprintf('Upper tail probability: %8.4f\n', p);
g08cl example results H0: data from exponential distribution with mean 1.5240e+00 Test statistic, A-squared: 0.1616 Adjusted A-squared: 0.1654 Upper tail probability: 0.9831