These functions provide the ability for generating probability function values and cumulative probability function values for the Kumaraswamy Binomial Distribution.
Arguments
- x
vector of binomial random variables
- n
single value for no of binomial trial
- a
single value for shape parameter alpha representing a
- b
single value for shape parameter beta representing b
- it
number of iterations to converge as a proper probability function replacing infinity
Value
The output of dKumBin
gives a list format consisting
pdf
probability function values in vector form.
mean
mean of the Kumaraswamy Binomial Distribution.
var
variance of the Kumaraswamy Binomial Distribution.
over.dis.para
over dispersion value of the Kumaraswamy Distribution.
Details
Mixing Kumaraswamy distribution with Binomial distribution will create the Kumaraswamy Binomial distribution. The probability function and cumulative probability function can be constructed and are denoted below.
The cumulative probability function is the summation of probability function values.
$$P_{KumBin}(x)= ab{n \choose x} \sum_{j=0}^{it} (-1)^j{b-1 \choose j}B(x+a+aj,n-x+1) $$ $$a,b > 0$$ $$x = 0,1,2,...n$$ $$n = 1,2,3,...$$ $$it > 0$$
The mean, variance and over dispersion are denoted as $$E_{KumBin}[x]= nbB(1+\frac{1}{a},b) $$ $$Var_{KumBin}[x]= n^2 b(B(1+\frac{2}{a},b)-bB(1+\frac{1}{a},b)^2)+ nb(B(1+\frac{1}{a},b)-B(1+\frac{2}{a},b)) $$ $$over dispersion= \frac{(bB(1+\frac{2}{a},b)-(bB(1+\frac{1}{a},b))^2)} {(bB(1+\frac{1}{a},b)-(bB(1+\frac{1}{a},b))^2)} $$
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.
References
Xiaohu L, Yanyan H, Xueyan Z (2011). “The Kumaraswamy binomial distribution.” Chinese Journal of Applied Probability and Statistics, 27(5), 511--521.
Examples
if (FALSE) {
#plotting the random variables and probability values
col <- rainbow(5)
a <- c(1,2,5,10,.85)
plot(0,0,main="Kumaraswamy binomial probability function graph",xlab="Binomial random variable",
ylab="Probability function values",xlim = c(0,10),ylim = c(0,0.5))
for (i in 1:5) {
lines(0:10,dKumBin(0:10,10,a[i],a[i])$pdf,col = col[i],lwd=2.85)
points(0:10,dKumBin(0:10,10,a[i],a[i])$pdf,col = col[i],pch=16)
}
}
dKumBin(0:10,10,4,2)$pdf #extracting the pdf values
#> [1] 0.001975149 0.007809184 0.019157313 0.037217684 0.062388592 0.093788564
#> [7] 0.128616482 0.161328867 0.182611506 0.178122531 0.126984127
dKumBin(0:10,10,4,2)$mean #extracting the mean
#> [1] 7.111111
dKumBin(0:10,10,4,2)$var #extracting the variance
#> [1] 4.54321
dKumBin(0:10,10,4,2)$over.dis.para #extracting the over dispersion value
#> [1] 0.1346154
if (FALSE) {
#plotting the random variables and cumulative probability values
col <- rainbow(5)
a <- c(1,2,5,10,.85)
plot(0,0,main="Cumulative probability function graph",xlab="Binomial random variable",
ylab="Cumulative probability function values",xlim = c(0,10),ylim = c(0,1))
for (i in 1:5) {
lines(0:10,pKumBin(0:10,10,a[i],a[i]),col = col[i])
points(0:10,pKumBin(0:10,10,a[i],a[i]),col = col[i])
}
}
pKumBin(0:10,10,4,2) #acquiring the cumulative probability values
#> [1] 0.001975149 0.009784333 0.028941647 0.066159331 0.128547923 0.222336487
#> [7] 0.350952969 0.512281836 0.694893342 0.873015873 1.000000000