Kumaraswamy distribution

In probability and statistics, the Kumaraswamy’s double bounded distribution is a family of continuous probability distributions defined on the interval \((0,1)\). It is similar to the Beta distribution, but much simpler to use especially in simulation studies since its probability density function, cumulative distribution function and quantile functions can be expressed in closed form. This distribution was originally proposed by Poondi Kumaraswamy. In Equation 1 we have the pdf while in Equation 2 the cdf and in Equation 3 the quantile.

1 PDF

\[f(x; a, b) = abx^{a-1} (1-x^a)^{b-1} \quad x \in (0,1)\;a > 0, b > 0 \qquad(1)\]

dkumaraswamy <- function(x = NULL, a = 1, b = 1, rescale = FALSE){
  p <- c()
  for(i in 1:length(x)){
    if (x[i] <= 0 | x[i] >= 1) {
      p[i] <- 0
    } else {
      p[i] <- a*b*x[i]^(a - 1)*(1 - x[i]^a)^(b - 1)
    }
  }
  if (rescale) {
    return(p/sum(p))
  } else {
    return(p)
  }
}

2 CDF

\[ F(x; a, b) = 1 - (1-x^a)^{b} \quad x \in (0,1)\;a > 0, b > 0 \qquad(2)\]

pkumaraswamy <- function(x = NULL, a = 1, b = 1){
  p <- c()
  for(i in 1:length(x)){
    if (x[i] <= 0) {
      p[i] <- 0
    } else if (x[i] >= 1) {
      p[i] <- 1
    } else {
      p[i] <- 1 - (1 - x[i]^a)^b
    }
  }
  return(p)
}

3 Quantile

\[F^{-1}(y; a, b) = 1 - (1-y^{\frac{1}{b}})^{\frac{1}{a}} \quad x \in (0,1)\;a > 0, b > 0 \qquad(3)\]

qkumaraswamy <- function(y = NULL, a = 1, b = 1){
  
  # https://en.wikipedia.org/wiki/Kumaraswamy_distribution
  x <- c()
  for(i in 1:length(y)){
    if (y[i] <= 0) {
      x[i] <- 0
    } else if (y[i] >= 1) {
      x[i] <- 1
    } else {
      x[i] <- 1 - (1 - y[i]^(1/b))^(1/a)
    }
  }
  return(x)
}
Back to top