## PROBMED Function

computes cumulative probabilities for the sample median.

*Syntax*

**PROBMED**(*n*,*x*)
where

*n* | is the sample size. |

*x* | is the point of interest; that is, the PROBMED function
calculates the probability that the median is less
than or equal to *x*. |

*Description*

The PROBMED function computes the probability that the sample median
is less than or equal to *x* for a sample of *n* independent,
standard normal random variables (mean 0, variance 1).
Let *n* represent the sample size and *X*_{(i)} represent the *i*th
order statistic. Then, when *n* is odd, the function calculates

where

and B, where is the gamma function. If *n* is even, the PROBMED function calculates

where B and and
are the standard normal cumulative
distribution function and density function, respectively.

For more information, refer to David (1981).

*Examples*

The statements

data;
b=probmed(5,-0.1);
put b;
run;

result in a value of 0.4256380897.

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.