PROBP

Prints a probability plot.

Required Arguments

NOBS — Total number of observations in uncensored sample. (Input)

N1 — The rank number of the smallest observation in the sample X, if ranked in the complete sample. (Input)
In other words, the number of observations that have been censored from below is N1  1.

N2 — The rank number of the largest observation in the sample X, if ranked in the complete sample. (Input)
In other words, the number of observations that have been censored from above is NOBS  N2.

X — Vector of length N2  N1 + 1. (Input)
X contains the data, possibly a censored data set from a complete sample of size NOBS.

IDIST — Distribution option. (Input)

IDIST = 1, normal distribution.

IDIST = 2, lognormal distribution.

IDIST = 3, half‑normal distribution.

IDIST = 4, exponential distribution.

IDIST = 5, Weibull distribution.

IDIST = 6, extreme value distribution.

FORTRAN 90 Interface

Generic: CALL PROBP (NOBS, N1, N2, X, IDIST)

Specific: The specific interface names are S_PROBP and D_PROBP.

FORTRAN 77 Interface

Single: CALL PROBP (NOBS, N1, N2, X, IDIST)

Double: The double precision name is DPROBP.

Description

Routine PROBP sorts a data set and plots the observed values along the vertical axis and the ranks along the horizontal axis. In the case of the lognormal and Weibull distributions, the vertical axis has a log scale. The horizontal axis has the appropriate cumulative distribution function scale. Let M = NOBS denote the total number of observations in an uncensored sample. For normal and lognormal distributions, the horizontal plotting distance for the observation with rank I (out of M) is proportional to the inverse normal cumulative distribution function evaluated at (3 * I  1)/(3 * M + 1). For the half‑normal plot, the corresponding horizontal distance is proportional to the inverse normal cumulative distribution function evaluated at (3 * M + 3 * I  1)/(6 * M + 1). For other plots, the horizontal distances are proportional to the respective inverse cumulative distribution functions evaluated at (I   .5)/M.

Let N1 = N1 and N2 = N2. In PROBP it is assumed that the N1  1 smallest observations and the M  N2 largest observations have been censored. If there has been no censoring, N1 should be set to 1 and N2 set to M. The smallest observation is plotted against the expected value (or the approximated expected value) of the N1‑th order statistic from a sample of size M; the next smallest observation is plotted as if it were the (N1 + 1)‑th sample order statistic, and so on.

PROBP does not do any shifting of location of the observation in the data set. If any observations fall outside of the range of the distribution (that is, if any observations are nonpositive when the distribution specified is lognormal or Weibull), those observations are censored and N1 or N1 is modified to reflect the number censored. In this case an error message of type 3 is generated. A plot which is a straight line provides evidence that the sample is from the distribution specified.

Comments

1. Workspace may be explicitly provided, if desired, by use of P2OBP/DP2OBP. The reference is:

CALL P2OBP (NOBS, N1, N2, X, IDIST, M1, M2, WK)

The additional arguments are as follows:

M1 — Rank of the smallest observation actually used. (Output)

M2 — Rank of the largest observation actually used. (output)

WK — Work space of length 2 * NOBS.

2. Informational error

 

Type

Code

Description

3

7

It is necessary to delete some items from the plotting because those items do not satisfy properties of the distribution.

3. NOBS must be greater than or equal to N2  N1 + 1. If there is no censoring, then N1 = 1 and N2 = NOBS.

4. Output is written to the unit specified by the routine UMACH (see the Reference Material section in this manual).

5. Printing starts on a new page with default page width 78. The user may change it by calling the routine PGOPT (see Chapter 19, "Utilities") in advance.

Example

In this example, a sample of size 250 (artificially generated from a normal distribution by routines RNSET and RNNOR in Chapter 18, “Random Number Generation”) is plotted by PROBP against a normal distribution function. The generally straight line produced is an indication that the sample is from a normal distribution.

 

USE RNSET_INT

USE RNNOR_INT

USE PROBP_INT

 

IMPLICIT NONE

INTEGER NOBS

PARAMETER (NOBS=250)

!

INTEGER IDIST, N1, N2

REAL X(NOBS)

!

IDIST = 1

! No censoring

N1 = 1

N2 = 250

! Initialize the seed

CALL RNSET (123457)

CALL RNNOR (X)

!

CALL PROBP (NOBS, N1, N2, X, IDIST)

END

Output

 

Probability plot for normal distribution

2.5 +:::::::::::::::::::::::::::::::::::::::::::::: ::::.

. .

. .

. * *

. ** .

2.0 + *** .

. ** .

. ** .

. ** .

. * .

1.5 + * .

. ** .

. ** .

. * .

. ** .

1.0 + ** .

. ** .

. ** .

. ** .

O . ** .

b 0.5 + ** .

s . ** .

e . * .

r . ** .

v . ** .

a 0.0 +-------------------------*--------------------------.

t . * .

i . ** .

o . ** .

n . ** .

s -0.5 + ** .

. * .

. * .

. ** .

. ** .

-1.0 + ** .

. ** .

. ** .

. ** .

. * .

-1.5 + *** .

. * .

. * .

. ** .

. .

-2.0 + *** .

* * ** .

. .

. .

. .

-2.5 +:::+::::+:::+::::+::::+::::::+:::::+:::+::::::+:::::.

.01 .05 .10 .25 .50 .75 .90 .95 .99

 

Cumulative Probability