Density, distribution function and random generation for the U-quadratic distribution.
dUquad(x, a=0, b=1, log=FALSE)
pUquad(q, a=0, b=1, lower.tail=TRUE, log.p=FALSE)
rUquad(n, a=0, b=1)
dUquad gives the density, pUquad gives the distribution function, and rUquad generates random deviates. The length of the result is determined by n for rasin, and is the maximum of the lengths of the numerical arguments for the other functions. The numerical arguments other than n are recycled to the length of the result. Only the first elements of the logical arguments are used.
vector of quantiles.
number of observations. If length(n) > 1, the length is taken to be the number required.
range of variable x. (\(a<b\)).
logical; if TRUE, probabilities p are given as log(p).
logical; if TRUE (default), probabilities are \(P[X\leq x]\), otherwise, \(P[X>x]\).
Diego Gallardo
The U-quadratic distribution has density $$ f(x) = \alpha (x-\beta)^2, \quad x\in (a,b), a\leq x \leq b, $$ where \(\alpha=12/(b-a)^3\) and \(\beta=(a+b)/2\). Its cumulative distribution function is $$ F(x) = \frac{\alpha}{3}[(x-\beta)^3+(\beta-a)^3], \quad x\in (a,b). $$
dUquad(0.5)
pUquad(0.5)
rUquad(5)
Run the code above in your browser using DataLab