cauppf(3f) - [M_datapac:PERCENT_POINT] compute the Cauchy percent point
function
SUBROUTINE CAUPPF(P,Ppf)
REAL(kind=wp) :: P
REAL(kind=wp) :: Ppf
REAL(kind=wp) :: arg
CAUPPF(3f) computes the percent point function value for the cauchy
distribution with median = 0 and 75% point = 1.
This distribution is defined for all x and has the probability
density function
f(X) = (1/pi)*(1/(1+X*X))
Note that the percent point function of a distribution is identically
the same as the inverse cumulative distribution function of the
distribution.
P The value (between 0.0 and 1.0) at which the percent point
function is to be evaluated.
P should be between 0.0 and 1.0, exclusively.
PPF The percent point function value.
Sample program:
program demo_cauppf
use M_datapac, only : cauppf, label
implicit none
call label('cauppf')
! call cauppf(x,y)
end program demo_cauppf
Results:
The original DATAPAC library was written by James Filliben of the
Statistical Engineering Division, National Institute of Standards
and Technology.
John Urban, 2022.05.31
CC0-1.0
* Filliben, Simple and Robust Linear Estimation
of the Location Parameter of a Symmetric
Distribution (Unpublished PH.D. Dissertation,
Princeton University), 1969, pages 21-44, 229-231.
* Filliben, 'The Percent Point Function', (Unpublished Manuscript),
1970, pages 28-31.
* Johnson and Kotz, Continuous Univariate Distributions
-- 1, 1970, pages 154-165.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp) | :: | P | ||||
real(kind=wp) | :: | Ppf |
SUBROUTINE CAUPPF(P,Ppf) REAL(kind=wp) :: P REAL(kind=wp) :: Ppf REAL(kind=wp) :: arg ! ! CHECK THE INPUT ARGUMENTS FOR ERRORS ! IF ( P<=0.0_wp .OR. P>=1.0_wp ) THEN WRITE (G_IO,99001) 99001 FORMAT (' ',& & '***** FATAL ERROR--THE FIRST INPUT ARGUMENT TO CAUPPF(3f) IS OUTSIDE THE ALLOWABLE (0,1) INTERVAL *****') WRITE (G_IO,99002) P 99002 FORMAT (' ','***** THE VALUE OF THE ARGUMENT IS ',E15.8,' *****') RETURN ELSE arg = G_pi*P Ppf = -COS(arg)/SIN(arg) ENDIF END SUBROUTINE CAUPPF