With the goal to have an "outlier"-aware normal distribution, I build a simple univariate mixing model of normal and uniform distributions:

U1 <- distr::Unif(-100, -4)
U2 <- distr::Unif(4, 100)
N <- distr::Truncate(distr::Norm(), lower = -4, upper = 4)
C  <- distr::UnivarMixingDistribution(U1, N, U2, mixCoeff = c(1, 98, 1)/100)

However, the quantile function is not the inverse of the distribution function:

x <- distr::p(C)(0.25)
> 0.5967383
> 0.2500331

Is this inaccuracy caused by my inaccuracte mixing model or by a floating point issue?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.