These functions provide the ability for generating probability function values and cumulative probability function values for the Uniform Binomial Distribution.
dUniBin(x,n)
x | vector of binomial random variables. |
---|---|
n | single value for no of binomial trials. |
The output of dUniBin
gives a list format consisting
pdf
probability function values in vector form.
mean
mean of the Uniform Binomial Distribution.
var
variance of the Uniform Binomial Distribution.
ove.dis.para
over dispersion value of Uniform Binomial Distribution.
Mixing unit bounded uniform distribution with binomial distribution will create the Uniform 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_{UniBin}(x)= \frac{1}{n+1} $$ $$n = 1,2,...$$ $$x = 0,1,2,...n$$
The mean, variance and over dispersion are denoted as $$E_{UniBin}[X]= \frac{n}{2} $$ $$Var_{UniBin}[X]= \frac{n(n+2)}{12} $$ $$over dispersion= \frac{1}{3} $$
NOTE : If input parameters are not in given domain conditions necessary error messages will be provided to go further.
Horsnell, G. (1957). Economic acceptance sampling schemes. Journal of the Royal Statistical Society, Series A, 120:148-191.
Okagbue, H. et al., 2014. Using the Average of the Extreme Values of a Triangular Distribution for a Transformation, and Its Approximant via the Continuous Uniform Distribution. British Journal of Mathematics & Computer Science, 4(24), pp.3497-3507.
Available at: http://www.sciencedomain.org/abstract.php?iid=699&id=6&aid=6427 .
#plotting the binomial random variables and probability values plot(0:10,dUniBin(0:10,10)$pdf,type="l",main="Uniform binomial probability function graph", xlab=" Binomial random variable",ylab="Probability function values")dUniBin(0:300,300)$pdf #extracting the pdf values#> [1] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [7] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [13] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [19] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [25] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [31] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [37] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [43] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [49] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [55] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [61] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [67] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [73] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [79] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [85] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [91] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [97] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [103] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [109] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [115] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [121] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [127] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [133] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [139] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [145] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [151] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [157] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [163] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [169] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [175] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [181] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [187] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [193] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [199] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [205] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [211] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [217] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [223] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [229] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [235] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [241] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [247] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [253] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [259] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [265] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [271] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [277] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [283] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [289] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [295] 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 0.003322259 #> [301] 0.003322259dUniBin(0:10,10)$mean #extracting the mean#> [1] 5dUniBin(0:10,10)$var #extracting the variance#> [1] 10dUniBin(0:10,10)$over.dis.para #extracting the over dispersion#> [1] 0.3333333#plotting the binomial random variables and cumulative probability values plot(0:10,pUniBin(0:10,10),type="l",main="Cumulative probability function graph", xlab=" Binomial random variable",ylab="Cumulative probability function values")#> [1] 0.0625 0.1250 0.1875 0.2500 0.3125 0.3750 0.4375 0.5000 0.5625 0.6250 #> [11] 0.6875 0.7500 0.8125 0.8750 0.9375 1.0000