2.1.1.8. UniformByParts law
The UniformByParts law is defined between a minimum and a median and between the median and a maximum, as
\[f(x) = \frac{0.5}{(x_{\rm med}-x_{\rm min})} \; {\rm 1\kern-0.28emI}_{[x_{\rm min},x_{\rm med}]}(x)
\qquad{\rm and} \qquad f(x) =\frac{0.5}{(x_{\rm max}-x_{\rm med})} \;
{\rm 1\kern-0.28emI}_{[x_{\rm med},x_{\rm max}]}(x)\]
For this distribution, the mean value is \(\mu = 0.25 * (x_{\rm max} + x_{\rm min} + 2 x_{\rm med})\) while the variance is \(\sigma^2 = \frac{1}{6} * (x^2_{\rm max} + x^2_{\rm min} + x_{\rm med} ( x_{\rm max} + x_{\rm min} + 2 x_{\rm med}))\).
Figure 2.9 shows the PDF, CDF and inverse CDF generated for different sets of parameters.
Figure 2.9 Example of PDF, CDF and inverse CDF for UniformByParts distributions.