A reparameterization of the Weibull distribution

Real-world data is often messy. There may be completely spurious measurements, like a negative value when the parameter is defined to be positive. Or there may be outliers that do not meaningfully represent the underlying process. In these situations, quantiles (aka percentiles) are often used as descriptive statistics because of their robustness to outliers. If the data is being modeled with a parametric probability distribution, it's convenient if the parameters can be cast directly in terms of quantiles. This short post describes one such distribution and its reparameterization.

The Weibull distribution a is widely used two-parameter probability distribution over positive real numbers that has attractive analytic properties. Its cumulative distribution function (CDF) is an elementary, invertible function:

$$
\begin{equation}
F(x) = 1 - \exp[-(x/b)^{a}]~,
\end{equation}
$$

defined for $x \geq 0$.

If $F(x)$ has the value $q$ between 0 and 1, then its inverse is

$$
\begin{equation}
x(q) = b\,[- \ln (1 - q)]^{1/a}~.
\end{equation}
$$

Notice that $x(q)$ is the $q$-quantile of the distribution. When working with a sample of values being modeled by a Weibull distribution, the parameters $a$ and $b$ can each be written as a simple function of any pair of quantiles from the sample.

Suppose that $q_1$ and $q_2 \neq q_1$ are two quantile parameters, and that $x_1$ and $x_2$ are the corresponding quantiles. To ease notation, let $l_i = -\ln(1 - q_i)$, so that $x_i = b\, l_i^{1 / a}$. After some algebra, we find

$$
\begin{equation}
a = \frac{\ln(l_2 / l_1)}{\ln(x_2 / x_1)}~,
\end{equation}
$$

and

$$
\begin{equation}
b = x_1\,l_1^{-1 / a}~.
\end{equation}
$$

And that's it. We now have a way to robustly estimate the parameters of the Weibull distribution.