Learn R Programming

hypersampleplan (version 0.1.1)

hypergeoquantile: Calculation Hypergeometric Quantiles Table using Chebyshev Polynomials

Description

This is an algorithm for efficient and exact calculation of hypergeometric quantiles using Chebyshev polynomials. For a fixed population size N and fixed sample size n, such calculations simultaneously produce quantiles of q for all possible values of the population number of "successes" M.

Usage

hypergeoquantile(q, N, n)

Arguments

q

probability, it must be between 0 and 1.

N

population size N.

n

sample size n.

Value

a matrix containing all possible required values of the hypergeometric quantiles for q in row M=0,1,...,N.

Details

The detailed algorthim can be found: Alvo, M., & Cabilio, P. (2000). Calculation of hypergeometric probabilities using Chebyshev polynomials. The American Statistician, 54(2), 141-144.

References

Alvo, M., & Cabilio, P. (2000). Calculation of hypergeometric probabilities using Chebyshev polynomials. The American Statistician, 54(2), 141-144.

Examples

Run this code
# Calculate the hypergeometric quantile for q=0.05, N=10, n=5.
hypergeoquantile(0.05,10,5)

Run the code above in your browser using DataLab