Functions for continuous probability distributions in SAS

1

The documentation for Python's SciPy package provides a table that concisely summarizes functions that are associated with continuous probability distributions. This article provides a similar table for SAS functions.

For more information on the CDF, PDF, quantile, and random-variate functions, see "Four essential functions for statistical programmers."

SAS functions for probability distributions

The following table shows the names and mathematical definitions for common probability distribution functions. The second column links to the SAS documentation. The fourth column explains how to apply a location parameter (L) and a scale parameter (S) to obtain a shifted and scaled quantity. The standard parameterization for the distribution assume L=0 and S=1.

Function Name SAS Function Notation or Definition Shift and Scale
Cumulative Distribution Function CDF \(F\left(x\right)\) \(F\left(x;L,S\right)=F\left(\frac{x-L}{S}\right)\)
Quantile Function QUANTILE \(G\left(\alpha\right)=F^{-1}\left(\alpha\right)\) \(G\left(\alpha;L,S\right)=L+SG\left(\alpha\right)\)
Survival Function SDF \(S\left(x\right)=1-F\left(x\right)\) \(S\left(x;L,S\right)=S\left(\frac{x-L}{S}\right)\)
Inverse Survival Function SQUANTILE \(Z\left(\alpha\right)=S^{-1}\left(\alpha\right)=G\left(1-\alpha\right)\) \(Z\left(\alpha;L,S\right)=L+SZ\left(\alpha\right)\)
Probability Density Function PDF \(f\left(x\right)=F^{\prime}\left(x\right)\) \(f\left(x;L,S\right)=\frac{1}{S}f\left(\frac{x-L}{S}\right)\)
Random Variates RAND \(Y=G\left(U\right)\), where \(U \sim U(0,1)\) \(X=L+SY\)
Log CDF LOGCDF \(\log\left( F\left(x\right) \right)\) \(\log\left( F\left(x;L,S\right) \right)\)
Log PDF LOGPDF \(\log\left( f\left(x\right) \right)\) \(\log\left( f\left(x;L,S\right)\right)\)
Log SDF LOGSDF \(\log\left( S\left(x\right) \right)\) \(\log\left( S\left(x;L,S\right)\right)\)

Some authors refer to the quantile function as the percent-point function (PPF) or the inverse distribution function.

Related functions for probability distributions

The following functions are related to the mathematical functions in the previous section. Although there is no built-in SAS function to evaluate these function, you can use SAS language to evaluate them by using the CDF and SDF function in the previous section.

Function Name Definition Shift and Scale
Cumulative Hazard Function \(H\left(x\right)=\) \(-\log\left(1-F\left(x\right)\right)\) \(H\left(x;L,S\right)=H\left(\frac{x-L}{S}\right)\)
Hazard Function \(h\left(x\right)=\frac{f\left(x\right)}{1-F\left(x\right)}\) \(h\left(x;L,S\right)=\frac{1}{S}h\left(\frac{x-L}{S}\right)\)
Share

About Author

Rick Wicklin

Distinguished Researcher in Computational Statistics

Rick Wicklin, PhD, is a distinguished researcher in computational statistics at SAS and is a principal developer of SAS/IML software. His areas of expertise include computational statistics, simulation, statistical graphics, and modern methods in statistical data analysis. Rick is author of the books Statistical Programming with SAS/IML Software and Simulating Data with SAS.

1 Comment

Leave A Reply

Back to Top