# CONFX

## Purpose:

Returns confidence level for a given density function and X value.

## Syntax:

CONFX(pdens, x, interp)

pdens

-

A series. The probability density function or histogram series.

x

-

A real or series, the X values.

interp

-

Optional. An integer, the confidence level interpolation flag:

 0: Do not interpolate confidence level 1: Linearly interpolate confidence level if necessary (default)

## Returns:

A real or series, the confidence level or probability value.

## Example:

W1: gnorm(10000, 1, 5)

W2: histogram(W1, 1000)

confx(W2, 5)

returns 0.496275, a confidence level of approximately 50%.

## Example:

W1: pdfnorm(-8..0.001..0.8)

W2: confx(w1, {-2, -1, 0, 1, 2});

W3: probn({-2, -1, 0, 1, 2}})

W1 contains 16001 samples of normal distribution with a mean of 0 and a standard deviation of 1.

W2 contains the series {0.022750, 0.158655, 0.500000, 0.841345, 0.977250}.

W3 contains the series {0.022750, 0.158655, 0.500000, 0.841345, 0.977250}.

Both W2 and W3 contain the confidence level at X values {-2, -1, 0, 1, 2} for the normal distribution. W2 looks up the values from the cumulative distribution derived from W1 and W3 uses PROBN to compute the confidence level assuming a normal distribution.

## Remarks:

The cumulative density function derived from the input density function or histogram is normalized between 0 and 1.

CONFX returns values between 0 and 1 inclusive.

See XCONF to return an X value given a density function and confidence level.

See PROBN to compute the confidence level for a normal distribution.

GNORMAL

GRANDOM

INTEG

INVPROBN

PDFNORM

PROBN

XCONF

XYLOOKUP