Continuous distribution

Kumaraswamy distribution

A proportion or probability on with much the same range of shapes as the beta (humps, U shapes, J shapes) but a CDF and quantile function in closed form, so it is easy to sample by inverting the CDF. It was introduced for hydrology (bounded quantities like the fraction of a reservoir that is full) and is used in variational inference as a reparameterizable stand-in for the beta.

Kumaraswamy probability calculator

P(X ≤ 0.36) = 0.500432

At the parameters set by the sliders. The shaded region on the plot is the probability; the dots on the CDF mark F at its ends.

PDF

01200.20.40.60.81f(x)mean

CDF

00.250.50.75100.20.40.60.81F(x)

mean 0.3694 · variance 0.0302 · sd 0.1738 · mode 0.3333 · entropy −0.3609 nats

Formulas

Parameters
  • , the first shape
  • , the second shape
Support
PDF
CDF
Mean
Variance
Mode
Entropy

is the beta function and the harmonic number. The quantile function is . With or it is a beta distribution.

Worked example

A fraction follows Kumaraswamy(, ). What is its median?

Solve : . No incomplete beta function is needed, which is the point of the distribution. answer checked by code

How it relates to others

All the relationships, as a diagram →

In Python

import numpy as np

rng = np.random.default_rng(0)
a, b = 2, 5
pdf = lambda x: a * b * x**(a - 1) * (1 - x**a)**(b - 1)
cdf = lambda x: 1 - (1 - x**a)**b
ppf = lambda q: (1 - (1 - q)**(1 / b))**(1 / a)
ppf(rng.random(size=10))

SciPy has no ready-made version of this distribution, so this samples it directly. Sampling by the inverse CDF: feed uniform numbers through the quantile function.

Choosing between this and its neighbours? Which distribution for proportions and probabilities?

← BetaArcsine →