# pKUM: Kumaraswamy Distribution In Amalan-ConStat/R-fitODBOD: Modeling Over Dispersed Binomial Outcome Data Using BMD and ABD

## Description

These functions provide the ability for generating probability density values, cumulative probability density values and moment about zero values for the Kumaraswamy Distribution bounded between [0,1]

## Usage

 1 pKUM(p,a,b) 

## Arguments

 p vector of probabilities a single value for shape parameter alpha representing as a b single value for shape parameter beta representing as b

## Details

The probability density function and cumulative density function of a unit bounded Kumaraswamy Distribution with random variable P are given by

g_{P}(p)= abp^{a-1}(1-p^a)^{b-1}

; 0 ≤ p ≤ 1

G_{P}(p)= 1-(1-p^a)^b

; 0 ≤ p ≤ 1

a,b > 0

The mean and the variance are denoted by

E[P]= bB(1+\frac{1}{a},b)

var[P]= bB(1+\frac{2}{a},b)-(bB(1+\frac{1}{a},b))^2

The moments about zero is denoted as

E[P^r]= bB(1+\frac{r}{a},b)

r = 1,2,3,...

Defined as B(a,b) is the beta function.

NOTE : If input parameters are not in given domain conditions necessary error messages will be provided to go further

## Value

The output of pKUM gives the cumulative density values in vector form.

## References

Kumaraswamy, P. (1980). A generalized probability density function for double-bounded random processes. Journal of Hydrology, 46(1), 79-88.

Available at : http://dx.doi.org/10.1016/0022-1694(80)90036-0

Jones, M. C. (2009). Kumaraswamy's distribution: A beta-type distribution with some tractability advantages. Statistical Methodology, 6(1), 70-81.

Available at : http://dx.doi.org/10.1016/j.stamet.2008.04.001

Kumaraswamy
  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 #plotting the random variables and probability values col<-rainbow(4) a<-c(1,2,5,10) plot(0,0,main="Probability density graph",xlab="Random variable",ylab="Probability density values", xlim = c(0,1),ylim = c(0,6)) for (i in 1:4) { lines(seq(0,1,by=0.01),dKUM(seq(0,1,by=0.01),a[i],a[i])$pdf,col = col[i]) } dKUM(seq(0,1,by=0.01),2,3)$pdf #extracting the probability values dKUM(seq(0,1,by=0.01),2,3)$mean #extracting the mean dKUM(seq(0,1,by=0.01),2,3)$var #extracting the variance #plotting the random variables and cumulative probability values col<-rainbow(4) a<-c(1,2,5,10) plot(0,0,main="Cumulative density graph",xlab="Random variable",ylab="Cumulative density values", xlim = c(0,1),ylim = c(0,1)) for (i in 1:4) { lines(seq(0,1,by=0.01),pKUM(seq(0,1,by=0.01),a[i],a[i]),col = col[i]) } pKUM(seq(0,1,by=0.01),2,3) #acquiring the cumulative probability values mazKUM(1.4,3,2) #acquiring the moment about zero values mazKUM(2,2,3)-mazKUM(1,2,3)^2 #acquiring the variance for a=2,b=3 #only the integer value of moments is taken here because moments cannot be decimal mazKUM(1.9,5.5,6)