Kumaraswamy distribution
In probability and statistics, the Kumaraswamy’s double bounded distribution is a family of continuous probability distributions defined on the interval
1 Distribution function
For
In R
code:
Plot Kumaraswamy cdf
grid <- seq(0, 1, 0.01)
bind_rows(
tibble(label = "a = 0.5, b = 0.5", a = 0.5, b = 0.5, x = grid, p = pkumaraswamy(x, a, b)),
tibble(label = "a = 5, b = 1", a = 5, b = 1, x = grid, p = pkumaraswamy(x, a, b)),
tibble(label = "a = 1, b = 3", a = 1, b = 3, x = grid, p = pkumaraswamy(x, a, b)),
tibble(label = "a = 2, b = 2", a = 2, b = 2, x = grid, p = pkumaraswamy(x, a, b)),
tibble(label = "a = 2, b = 5", a = 2, b = 5, x = grid, p = pkumaraswamy(x, a, b))
) %>%
ggplot()+
geom_line(aes(x, p, color = label))+
theme_bw()+
labs(x = TeX("$x$"), y = TeX("$F(x;a,b)$"), color = NULL)+
theme(legend.position = "top")
2 Density function
For
In R
code:
Plot pdf
grid <- seq(0.01, 0.99, 0.01)
bind_rows(
tibble(label = "a = 0.5, b = 0.5", a = 0.5, b = 0.5, x = grid, p = dkumaraswamy(x, a, b)),
tibble(label = "a = 5, b = 1", a = 5, b = 1, x = grid, p = dkumaraswamy(x, a, b)),
tibble(label = "a = 1, b = 3", a = 1, b = 3, x = grid, p = dkumaraswamy(x, a, b)),
tibble(label = "a = 2, b = 2", a = 2, b = 2, x = grid, p = dkumaraswamy(x, a, b)),
tibble(label = "a = 2, b = 5", a = 2, b = 5, x = grid, p = dkumaraswamy(x, a, b))
) %>%
ggplot()+
geom_line(aes(x, p, color = label))+
theme_bw()+
labs(x = TeX("$x$"), y = TeX("$f(x;a,b)$"), color = NULL)+
theme(legend.position = "top")
3 Quantile function
For
In R
code:
4 Random generator
In general, given a random variable
Step 1.: simulate the grades
.Step 2.: apply the quantile function of the desired distribution on the grades to obtain a simulations.
In R
code:
Plot pdf
params <- c(a = 1.5, b = 1.5)
x <- rkumaraswamy(5000, a = params[1], b = params[2])
ker <- density(x, from = min(x), to = max(x))
ker$pdf_th <- dkumaraswamy(ker$x, a = params[1], b = params[2])
#ker$pdf_th <- ker$pdf_th/sum(ker$pdf_th)
ker$pdf_emp <- ker$y#/sum(ker$y)
ggplot()+
geom_line(aes(ker$x, ker$pdf_th), color = "red")+
geom_line(aes(ker$x, ker$pdf_emp))+
theme_bw()+
labs(x = TeX("$x$"), y = TeX("$f(x;a,b)$"), color = NULL)+
theme(legend.position = "top")
Citation
@online{sartini2024,
author = {Sartini, Beniamino},
title = {Kumaraswamy Distribution},
date = {2024-05-01},
url = {https://greenfin.it/statistics/distributions/kumaraswamy.html},
langid = {en}
}