Calculate quantile of a normal distribution using one of the available methods.
qnormFast(
p,
mean = 0L,
sd = 1L,
method = "Voutier",
is_validation = TRUE,
n_cores = 1L
)
The function returns a vector of p
-level quantiles of a
normal distribution with mean equal to mean
and standard
deviation equal to sd
.
numeric vector of values between 0 and 1 representing levels of the quantiles.
numeric value representing the expectation of a normal distribution.
positive numeric value representing standard deviation of a normal distribution.
character representing the method to be used for quantile calculation. Available options are "Voutier" (default) and "Shore".
logical value indicating whether input
arguments should be validated. Set it to FALSE
to get
performance boost (default value is TRUE
).
positive integer representing the number of CPU cores
used for parallel computing. Currently it is not recommended to set
n_cores > 1
if vectorized arguments include less then 100000 elements.
If method = "Voutier"
then the method of P. Voutier (2010)
is used which maximum absolute error is about \(0.000025\).
If method = "Shore"
then the approach proposed
by H. Shore (1982) is applied which maximum absolute error is about
\(0.026\) for quantiles of level between \(0.0001\)
and \(0.9999\).
H. Shore (1982) <doi:10.2307/2347972>
P. Voutier (2010) <doi:10.48550/arXiv.1002.0567>
qnormFast(c(0.1, 0.9), mean = 1, sd = 2)
Run the code above in your browser using DataLab