Returns X value for a given density function and confidence level.
XCONF(pdens, c, interp)
pdens |
- |
A series. The probability density function or histogram series. |
||||
c |
- |
A real or series. The confidence level or percentile |
||||
interp |
- |
Optional. An integer, the X value linear interpolation flag:
|
A real or series, the X (or z) value for the distribution given the input probability level.
W1: gnorm(10000, 1, 5)
W2: histogram(W1, 1000)
xconf(W2, 0.5)
returns 4.989789, the approximate mean of the original series.
W1: pdfnorm(-8..0.001..8)
W2: pdfnorm({-2, -1, 0, 1, 2})
W3: xconf(w1, w2)
W4: invprobn(w2)
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}, the confidence level at X values {-2, -1, 0, 1, 2} for a normal distribution.
W3 contains the series {-2, -1, 0, 1, 2}, the X values for the confidence levels in W2.
W4 contains the series {-2, -1, 0, 1, 2}, the X values for the confidence levels in W2.
Both W3 and W4 contain X values for the confidence levels {0.022750, 0.158655, 0.500000, 0.841345, 0.977250} for the normal distribution. W3 looks up the values from the cumulative distribution derived from W1 and W4 uses INVPROBN to compute the X values assuming a normal distribution.
The cumulative distribution derived from the input density function or histogram is automatically normalized between 0 and 1.
XCONF returns NA if the confidence level is out of range.
Unless specified, XCONF automatically performs linear interpolation to find the best X value for a given confidence level if an exact match is not found.
See CONFX to return a confidence level for a density function and X value.
See INVPROBN to compute the X value for a normal distribution.