Wilks¶
- class Wilks(*args)¶
Class to estimate a confidence interval on a quantile.
Refer to Estimation of a quantile upper bound by Wilks’ method.
- Parameters:
- X
RandomVector
, A random vector of dimension 1.
- X
Methods
ComputeSampleSize
(quantileLevel, confidenceLevel)Evaluate the minimum size of the sample.
computeQuantileBound
(quantileLevel, ...[, ...])Evaluate an upper bound of a quantile.
Notes
This static class estimates an upper bound of the quantile of level
of the random variable
with a confidence greater than
, using a given order statistics.
Let
be the unknown quantile of level
of the random variable
of dimension 1. Let
be a sample of independent and identically distributed variables according to
. Let
be the
-th order statistics of
which means that
is the
-th maximum of
for
. For example,
is the minimum and
is the maximum. We have:
Given
,
and
, the class estimates the minimal size
such that:
Once the minimal size
has been estimated, a sample of size
can be generated from
and an upper bound of
is estimated by the value of the
on the sample.
- __init__(*args)¶
- static ComputeSampleSize(quantileLevel, confidenceLevel, marginIndex=0)¶
Evaluate the minimum size of the sample.
- Parameters:
- alphapositive float in
The level
of the quantile.
- betapositive float in
,
The confidence level on the upper bound.
- iint
The index such that
is an upper bound of
with confidence
. Default value is
.
- alphapositive float in
- Returns:
- nint,
The minimum size of the sample.
Notes
The minimum sample size
is such that:
- computeQuantileBound(quantileLevel, confidenceLevel, marginIndex=0)¶
Evaluate an upper bound of a quantile.
- Parameters:
- alphapositive float in
The level
of the quantile.
- betapositive float in
The confidence level on the upper bound.
- iint
The index such that
is an upper bound of
with confidence level
. Default value is
.
- alphapositive float in
- Returns:
- upperBound
Point
The estimate of the quantile upper bound.
- upperBound
Notes
The method starts by evaluating the minimum sample size
such that:
Then, it generates a sample of size
from the random vector
. The upper bound of
is
, that is, the
-th observation in the ordered sample.