Note: the interface to this routine has changed since earlier releases of the toolbox:
At Mark 23: |
tail was made optional (default 'L') |
The lower tail probability for the standard Normal distribution,
is defined by:
where
The relationship
is used, where erfc is the complementary error function, and is computed using
nag_specfun_erfc_real (s15ad). For the upper tail probability the relationship
is used and for the two tail significance level probability twice the probability obtained from the absolute value of
is returned.
When the two tail confidence probability is required the relationship
is used, where erf is the error function, and is computed using
nag_specfun_erf_real (s15ae).
None.
Four values of
tail and
x are input and the probabilities calculated and printed.
function g01ea_example
fprintf('g01ea example results\n\n');
x = 1.96;
tail = {'Lower'; 'Upper'; 'Confidence'; 'Significance'};
fprintf(' Tail x probability\n');
for j = 1:size(tail,1);
[p, ifail] = g01ea( ...
x,'tail',tail{j});
fprintf('%4s%8.2f%12.4f\n',tail{j}(1),x,p);
end