Exact quantile confidence interval based on order statisticsΒΆ
We consider a random variable of dimension 1 and its quantile
of level
(
).
We seek to evaluate an upper bound of
with a confidence
greater than or equal to
, using order statistics.
Let be independent copies of
.
Let
be the
-th order statistic of
i.e.,
is the
-th smallest value of
for
.
For example,
is the minimum
and
is the maximum.
We have:
The cumulative distribution function of the order statistic is:
For any strictly positive integer and
,
let
be the cumulative distribution function of
the binomial distribution
.
Let
be the complementary cumulative distribution function
(also named survival function in dimension 1):
for any integer .
Then the cumulative distribution function of the
-th order statistic
is:
for any integer .
Therefore:
Rank for an upper bound of the quantileΒΆ
Let be an i.i.d. sample of size
of the random variable
.
Given a quantile level
, a confidence level
, and a sample size
, we seek the
smallest rank
such that:
(1)ΒΆ
The previous equation is equivalent to:
(2)ΒΆ
Then, the smallest rank such that the previous equation
is satisfied is:
If:
then there is no solution.
Otherwise, the solution is:
(3)ΒΆ
First, the optimal rank is computed.
Then, the upper bound of
is estimated using the corresponding
order statistic
from the sample
.
The following table presents the solution depending on the parameters.
1 |
1 |
1 |
|
1 |
see (3) |
||
1 |
Rank for a lower bound of the quantileΒΆ
Given the same data as previously, we seek the greatest rank
such that:
(4)ΒΆ
This is equivalent to:
Then, the greatest rank such that the previous equation
is satisfied is:
If:
then there is no solution.
Otherwise, the solution is:
(5)ΒΆ
The following table presents the solution depending on the parameters.
see (5) |
|||
Ranks for bilateral bounds of the quantileΒΆ
Given the previously established data, we seek the ranks
.
Because the optimal interval can be defined in various ways, the solution
depends on the chosen criterion.
Here are the different formulations based on the target objective.
Criterion 1: Symmetric probability tails
(6)ΒΆ
Criterion 2: Minimizing the rank interval length
(7)ΒΆ
Criterion 3: Minimizing the probability of coverage
(8)ΒΆ
Criterion 4: Symmetric ranks
Let be the rank corresponding to the empirical estimator
of the quantile
:
We search for the smallest
such that:
(9)ΒΆ
The solutions to (8) and (7) are determined numerically, using an optimization algorithm.
The solutions to (6) are such that:
The solutions are:
and:
Minimum sample size for an upper bound of the quantileΒΆ
Given ,
, and the rank
, we seek the smallest sample size
such that:
The previous equation is equivalent to:
(10)ΒΆ
Unlike the formulation leading to equation (1), where the
sample size is fixed and the rank is the unknown, here the relative rank
is fixed and the sample size is the variable to determine.
To determine this minimum sample size, we solve equation (10)
for the sample size .
An optimization algorithm is used to compute
from
the set
.
We can reduce the search space to the interval
, where
is a
sample size that satisfies equation (10).
This value
can be determined using the normal
approximation of the binomial distribution with the same mean and variance.
Once the smallest size has been estimated, a sample of size
can be generated from
and an upper bound of
is estimated using
.
Minimum sample size for a lower bound of the quantileΒΆ
Given the same data as previously, we seek the smallest sample size
such that equation (4) is satisfied.
The solution is:
The following table presents the solution depending on the parameters.
Minimum sample size for bilateral bounds of the quantileΒΆ
Given two order statistics with
, we seek the smallest sample size
such that:
(11)ΒΆ
Equation (11) can be rewritten as:
(12)ΒΆ
This can be equivalently expressed using the binomial distribution:
Unlike the formulation in equation :eq:EqOrderStatMinRankLength, where the
sample size is fixed and the ranks are the unknowns, this approach fixes the
relative ranks to determine the minimum required sample size.
To find the exact minimum that solves equation
(12), we use an optimization algorithm.
Once the smallest size has been computed, a sample of size
can be generated from
and a lower and an upper
bound of
are estimated using
and
.
In the particular case where , we seek the smallest
sample size
such that:
Then, equation (12) is equivalent to:
The optimal is determined using an optimization algorithm.
The search space is reduced to the interval:
where .
OpenTURNS