1
$\begingroup$

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)
x
> 0.5967383
distr::q(C)(x)
> 0.2500331

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

$\endgroup$

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.