Next Article in Journal
Exact Solutions to Fractional Schrödinger–Hirota Equation Using Auxiliary Equation Method
Previous Article in Journal
On the Torsional Energy of Deformed Curves and Knots
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Bimodal Extension of the Beta-Binomial Distribution with Applications

1
Departamento de Estadística y Ciencia de Datos, Facultad de Ciencias Básicas, Universidad de Antofagasta, Antofagasta 1270300, Chile
2
Department of Mathematics, University of the Basque Country UPV/EHU, 48940 Leioa, Spain
3
School of Science and Technology, IE University, 28046 Madrid, Spain
*
Author to whom correspondence should be addressed.
Axioms 2024, 13(10), 662; https://doi.org/10.3390/axioms13100662
Submission received: 24 August 2024 / Revised: 17 September 2024 / Accepted: 19 September 2024 / Published: 25 September 2024
(This article belongs to the Special Issue Advances in the Theory and Applications of Statistical Distributions)

Abstract

:
In this paper, we propose an alternative distribution to model count data exhibiting uni/bimodality. It arises as a weighted version of the beta-binomial distribution, which is defined by a parametric weight function that admits up to two modes for the resulting probability mass function. Like the baseline beta-binomial distribution, the proposed distribution performs well in modeling overdispersed binomial data. Structural properties of the new distribution are studied. Raw moments are derived, which are used to describe the dispersion behavior relative to the mean and the skewness behavior. Parameter estimation is carried out using the maximum likelihood method. A simulation study is conducted in order to illustrate the behavior of the estimators. Finally, two applications illustrating the usefulness of the proposal are presented.

1. Introduction

Count data represents the number of times a particular event occurs in an interval of time, space, or other unit of measurement. This type of data is commonly found in various areas, such as medicine, economics, and engineering, to name a few. For example, Böhning et al. [1] analyzed count data from a dental epidemiological study under the situation of additional zeros. Salman et al. [2] analyzed bankruptcy count data from Swedish small manufacturing firms with the aim of investigating the business failure risk factors of small manufacturing firms. Calabria et al. [3] analyzed the reliability of repairable systems from in-service failure count data.
There are many real-world scenarios where the probability of success in binomial experiments cannot be considered constant. For example, the probability of consuming alcohol across the 7 days of a particular week varies from one individual to another (see Alanko and Lemmens [4]). Considering a beta distribution for the probability of success in a binomial distribution (which gives rise to the beta-binomial distribution) is not overly restrictive since the beta distribution is very flexible in terms of the shapes of its probability density function.
A random variable X follows the beta-binomial distribution, denoted X BB ( n , α , β ) , if its probability mass function (p.m.f.) is given by
P ( X = x ) = n x B ( x + α , n x + β ) B ( α , β ) , x = 0 , 1 , 2 , , n , α , β > 0 ,
where B ( a , b ) = 0 1 u a 1 ( 1 u ) b 1 d u , a , b > 0 , is the beta function.
In Bayesian inference, the beta-binomial distribution is used to make predictions about the number of successes in future trials, taking into account the uncertainty in the estimate of the probability of success. In classical inference, the beta-binomial distribution can be used to model data with overdispersion in binomial experiments, i.e., when the observed variability is greater than that expected under a standard binomial distribution.
A review of the applicability and extensions of the beta-binomial distribution can be found in Wilcox [5]. The use of the beta-binomial distribution in the context of regression is discussed in Crowder [6]. Details on the estimation of the parameters of the beta-binomial distribution can be found in Tripathi et al. [7].
Regarding more recent applications of the beta-binomial distribution, several studies can be found in the literature. To name a few, Palm et al. [8] use the beta-binomial distribution in the formulation of the BBARMA (Beta-Binomial Autoregressive Moving Average) model, which can capture the temporal dynamics and autoregressive structure in count data. Chen et al. [9] use the beta-binomial distribution to propose a GARCH model that captures the variation in the number of new cases of cryptosporidiosis infection, obtaining a useful model for time series data that present bounded counts and high volatility. Jansen and Holling [10], under a Bayesian approach, use the beta-binomial distribution in the meta-analysis of rare events.
Although the beta-binomial distribution is applied in various real-world settings, its performance is not good when empirical distributions exhibit bimodality, i.e., when there are two modes or peaks in the empirical distributions. The presence of bimodality can be explained by the existence of two groups or subpopulations with unique characteristics or by the existence of latent variables that significantly influence the distribution of the population.
A very popular methodology in the literature to incorporate flexibility in terms of asymmetry and multimodality is related to the definition of weighted distributions proposed by Fisher [11] and Rao [12]. Suppose that X is a random variable with probability function f ( x ) . The weighted random variable X w has PDF
f X w ( x ) = w ( x ) f ( x ) μ w ,
where w ( · ) is a nonnegative weight function and μ w = E [ W ( X ) ] < .
A particularly salient case of (2) is obtained when w ( x ) = x , which defines a length-biased distribution. These distributions arise naturally in applied fields, such as reliability and survival analysis, when individuals or mechanical units are sampled with unequal probability due to the experimental design or the existing unequal probability of detection.
On the other hand, it is possible to find in the literature weight functions that can lead to multimodality for the weighted distributions resulting from (2). For example, if w ( x ) = 1 + 1 α ( x μ ) σ 2 , α R , and f ( x ) is the pdf of the normal distribution with mean μ R and variance σ 2 > 0 , then (2) reduces to the family of bimodal distributions called the alpha-skew-normal distribution, see Elal-Olivero [13]. Based on the same weight function, Gómez-Déniz et al. [14] introduces a bimodal version of the Poisson distribution. Cortés et al. [15] propose a parametric weight function that involves a power function of exponent 4, which can lead to a probability function with up to three modes.
In this paper, we propose an extension of the beta-binomial distribution appropriate to fit overdispersed binomial data that may exhibit both unimodality and bimodality. The proposal arises from (2), using the weight function proposed by Elal-Olivero [13] under a beta-binomial baseline distribution. In this way, the new distribution is aimed at expanding the use of beta-binomial distributions to real-world scenarios where empirical distributions exhibit bimodality.
The remainder of the paper is organized as follows. In Section 2, we define the bimodal beta-binomial random variable and study some of its properties, such as the probability mass function, cumulative distribution function, and the raw moments. The latter are used to describe the behavior of the relative dispersion with respect to the mean and the skewness behavior of the distribution. In Section 3, parameter estimation for the new distribution using the maximum likelihood method is discussed. A simulation study is carried out to evaluate the behavior of the estimators. In Section 4, two application examples with real data are presented to illustrate the usefulness of the proposed distribution. Finally, concluding remarks are presented in Section 5.

2. Bimodal Beta-Binomial Distribution

In this section, we derive the new distribution and study some of its main properties.

2.1. Bimodal Beta-Binomial Random Variable

The following proposition presents the p.m.f. of the new distribution.
Proposition 1.
Let X BB ( n , α , β ) and w ( · ) be a parametric function given by
w ( x ) = 1 + 1 q ( x μ ) σ 2 , x = 0 , 1 , , n ,
where
μ = n α α + β a n d σ 2 = n α β ( α + β + n ) ( α + β ) 2 ( α + β + 1 ) ,
are the mean and variance of X, respectively. Then, the p.m.f. of the weighted random variable X w is
f X w ( x ; α , β , q ) = P ( X w = x ) = 1 2 + q 2 1 + 1 q ( x μ ) σ 2 n x B ( x + α , n x + β ) B ( α , β ) , x = 0 , 1 , , n ,
such that α , β > 0 , q R and B ( · , · ) is the beta function.
Proof. 
First, we observe that f X w ( x ) > 0 for all x = 0 , 1 , 2 , , n when α , β > 0 and q R . Second, it can be seen that
x = 0 n f X w ( x ) = 1 ( 2 + q 2 ) x = 0 n 1 + 1 q ( x μ ) σ 2 f X ( x ) = 1 2 + q 2 2 2 q σ x = 0 n ( x μ ) f X ( x ) + q 2 σ 2 x = 0 n ( x μ ) 2 f X ( x ) = 1 .
In consequence, it is concluded that (3) is a valid p.m.f.    □
Definition 1.
Let X w be a random variable with p.m.f. given in (3), then we say that X w follows a bimodal beta-binomial distribution. We denote this as X w BBB ( n , α , β , q ) .
The name given in Definition 1 to refer to the new distribution is based on the bimodal behavior that the p.m.f. can present. Figure 1 shows some plots of the p.m.f. of the bimodal beta-binomial distribution for different values of its parameters. In the figure, it can be seen that the BBB p.m.f can present a great variety of shapes depending on its parameters: monotonic shape, symmetric/asymmetric unimodal shape, bathtub shape, or asymmetric bimodal shape.
A function in the R programming language [16] for computing (3) is provided in Appendix A.

2.2. Two Related Distributions

Corollary 1.
Let X w BBB ( n , α , β , q ) . Then,
1. 
f X w ( x ; α , β , q = 0 ) = n x B ( x + α , n x + β ) B ( α , β ) , x = 0 , 1 , 2 , , n , α , β > 0 , which is the p.m.f. of the beta-binomial distribution.
2. 
If n = 1 , then f X w ( x ; α , β , q ) = θ x ( 1 θ ) 1 x , x = 0 , 1 , such that
θ = β ( 2 + q 2 ) ( α + β ) 1 + 1 + q α / β 2 , i f x = 0 , α ( 2 + q 2 ) ( α + β ) 1 + 1 + q β / α 2 , i f x = 1 .
Corollary 1 is a direct consequence of (3) considering fixed values for q and n. Part 1 shows that the beta-binomial distribution is a special case of the bimodal beta-binomial distribution obtained when q = 0 . The second part shows that the bimodal beta-binomial distribution reduces to the Bernoulli distribution with parameter θ , where θ is a function of the parameters α , β , and q.

2.3. Cumulative Distribution Function

The cumulative distribution function (c.d.f.) of X w BBB ( n , α , β , q ) can be obtained straightforwardly from Proposition 1.
Corollary 2.
Let X w BBB ( n , α , β , q ) . Then, the cumulative distribution function (c.d.f.) of X w is given by
F X w ( x ) = P ( X w x ) = 0 , i f x < 0 , 1 2 + q 2 t = 0 x 1 + 1 q ( t μ ) σ 2 n t B ( t + α , n t + β ) B ( α , β ) , i f 0 x < n , 1 , i f x n ,
where x = max { k Z | k < x } , x R .
Figure 2 shows some plots of the c.d.f. of the bimodal beta-binomial distribution for different values of α , β , and q. As expected, the figure shows that the frequencies are not decreasing as x increases. However, two sharp increases in frequency can be observed in two different intervals of x, which is explained by the bimodal behavior of the corresponding p.m.f.
A function in the R programming language for computing (4) is provided in Appendix A.

2.4. Moments

The following proposition derives the raw moments of the beta-binomial distribution. Essentially, these moments are expressed as a function of the raw moments of the beta-binomial distribution.
Proposition 2.
Let X w BBB ( n , α , β , q ) . Then, the rth raw moment of X w is given by
E X w r = a μ r b μ r + 1 + c μ r + 2 , r = 1 , 2 , ,
where
a = 1 2 + q 2 2 + 2 q μ σ + q 2 μ 2 σ 2 , b = 1 2 + q 2 2 q σ + 2 q 2 μ σ 2 , c = q 2 ( 2 + q 2 ) σ 2 ,
such that
μ j = E X j = x = 0 n x j n x B ( x + α , n x + β ) B ( α , β ) , j = 1 , 2 ,
is the j t h raw moment of the beta-binomial distribution.
Proof .
By definition of expectation, we have that
E X w r = x = 0 n x r f X w ( x ; α , β , q )
= 1 2 + q 2 x = 0 n x r 1 + 1 q ( x μ ) σ 2 f X ( x ; α , β ) ,
where f X ( x ; α , β ) is the p.m.f. of the beta-binomial distribution. Therefore, after some algebra, we see that
E X w r = 1 2 + q 2 2 + 2 q μ σ + q 2 μ 2 σ 2 x = 0 n x f X ( x ; α , β ) 1 2 + q 2 2 q σ + 2 q 2 μ σ 2 x = 0 n x r + 1 f X ( x ; α , β ) + q 2 ( 2 + q 2 ) σ 2 x = 0 n x r + 2 f X ( x ; α , β ) ,
and the result is obtained by recognizing the raw moments of the beta-binomial distribution in the above expression.    □
Alternatively, in (6) we can write 1 q ( x μ ) σ 2 = c 2 1 q σ c x 2 , where c = 1 + q μ σ . Then, using the binomial theorem, we have
1 q ( x μ ) σ 2 = c 2 k = 0 2 v k x k , with v k = q k σ k c k .
Thus, we can write (7) as
E X w r = 1 2 + q 2 x = 0 n x r f X ( x ; α , β ) + c 2 k = 0 2 v k x = 0 x r + k f X ( x ; α , β ) = 1 2 + q 2 μ r + c 2 k = 0 2 v k μ r + k , r = 1 , 2 , ,
where μ r is the rth raw moment of the beta-binomial distribution.
Corollary 3.
Let X w BBB ( n , α , β , q ) . Then, the coefficient of variation ( c . v . ( X w ) ) and the Fisher’s skewness coefficient ( β ) of X w are given by
c . v . ( X w ) = μ 2 b μ 3 + c μ 4 a μ 1 b μ 2 + c μ 3 2 a μ 1 b μ 2 + c μ 4 a n d β = a μ 3 b μ 4 + c μ 5 3 a μ 1 b μ 2 + c μ 3 a μ 2 b μ 3 + c μ 4 + 2 a μ 1 b μ 2 + c μ 3 3 a μ 2 b μ 3 + c μ 4 a μ 1 b μ 2 + c μ 3 2 3 / 2 ,
where
μ 1 = Γ α + 1 Γ α + β n Γ α + β + 1 Γ α , μ 2 = Γ α + 1 Γ α + β n n α + n + β α + β + 1 Γ α + β + 1 Γ α , μ 3 = Γ α + 1 Γ α + β n 3 α β n + β 2 + 3 n β + 3 n 2 α + n 2 α 2 + 2 n 2 α β 2 + α 2 + 3 α + 2 α β + β 2 + 3 β Γ α + β + 1 Γ α , μ 4 = Γ α + 1 Γ α + β A n 6 + α 3 + 12 α β + 6 β 2 + 6 α 2 + 3 α β 2 + 3 β α 2 + 11 α + 11 β + β 3 Γ α + β + 1 Γ α , μ 5 = Γ α + 1 Γ α + β B n α + β + 3 α + β + 2 α + β + 1 α + β + 4 Γ α + β + 1 Γ α .
such that a, b and c are as in Proposition 2 and
A = α β + 6 n 3 4 α β 2 + 7 n β 2 + n 3 α 3 + 12 n 2 β + β 3 + 18 α n 2 β + 7 β 2 n α 4 β n α 2 5 β n α + β α 2 + 6 β n 2 α 2 n β β 2 + 6 n 3 α 2 + 11 α n 3 , B = 15 β 3 n + 50 n 2 β 2 + 10 n 4 α 3 + 60 n 3 β + 50 n 4 α 15 n β 2 + 35 n 4 α 2 + n 4 α 4 30 β 2 α 2 n 35 α n 2 β + 25 β 2 n 2 α 2 + 15 β 3 n α 10 β α 3 n 2 + 5 β α 3 n + 10 β n 3 α 3 45 β 2 n α 11 α β 3 5 β n α + 5 β α 2 35 β n 2 α 2 + 60 n 3 α 2 β α 3 β 10 n 2 β + 75 n 2 α β 2 + 110 n 3 α β + β 4 + 11 β 2 α 2 + 24 n 4 5 β 3 .
Figure 3 shows some curves of the coefficient of variation and the coefficient of skewness of the bimodal beta-binomial distribution as a function of q under fixed values for α and β . In the figure, it can be seen that the bimodal beta-binomial distribution (depending on q) can present a greater or lesser relative dispersion (and a greater or lesser skewness level) than the beta-binomial distribution (special case q = 0 ).
Functions in the R programming language for computing the rth moment (7) and for the coefficients of variation and the coefficient of skewness of Corollary 3 are provided in Appendix A.

3. Parameter Estimation

In this section, we discuss the maximum likelihood estimator and conduct a simulation study to evaluate the performance of the estimators.

3.1. Maximum Likelihood Estimation

Given a random sample X 1 , , X m of the random variable X w BBB ( n , α , β , q ) , the log-likelihood function for θ = ( α , β , q ) can be written as
( θ ; x i ) = log i = 1 m f X w ( x i ; α , β , q ) = c + i = 1 m log n x i + i = 1 m log ( x 1 i ) + i = 1 m log Γ ( x i + α ) + i = 1 m log Γ ( n x i + β ) ,
where c = m log 2 + q 2 + m log Γ ( α + β ) m log Γ ( α ) m log Γ ( β ) m log Γ ( α + β + n ) , x 1 i = 1 + 1 q ( x i μ ) / σ 2 and Γ ( a ) = 0 u a 1 e u d u , a > 0 , is the gamma function.
Then, the score functions are given by
( θ ; x i ) α = c 1 2 q 1 + q μ σ i = 1 m x 2 i x 1 i + 2 q 2 σ i = 1 m x i x 2 i x 1 i + i = 1 m Ψ x i + α ,
( θ ; x i ) β = c 2 2 q 1 + q μ σ i = 1 m x 3 i x 1 i + 2 q 2 σ i = 1 m x i x 3 i x 1 i + i = 1 m Ψ ( n x i + β ) ,
( θ ; x i ) q = c 3 + 2 μ σ 2 1 q σ i = 1 m 1 x 1 i 2 σ 1 q μ σ + q σ i = 1 m x i x 1 i + 2 q σ 2 i = 1 m x i 2 x 1 i ,
where c 1 = m Ψ ( α ) + m Ψ ( α + β ) m Ψ ( α + β + n ) , c 2 = m Ψ ( β ) + m Ψ ( α + β ) m Ψ ( α + β + n ) , c 3 = 2 m q / ( 2 + q 2 ) , Ψ ( a ) = log Γ ( a ) / a , with a > 0 , is the digamma function,
x 2 i = α x i μ σ = k 1 i 2 n α 3 β ( α + β + 1 ) ( α + β + n ) 3 1 / 2 and x 2 i = β x i μ σ = k 2 i 2 n α 3 β ( α + β + 1 ) ( α + β + n ) 3 1 / 2 ,
such that k 1 i = α 3 x i + α 3 n 2 x i α 2 n x i α 2 β + 2 n 2 α 2 + 2 n α 2 β + n 2 α β + n α β 2 + α n 2 + n α β α x i n x i α n β + x i α β 2 + α x i β + x i n β + x i β 2 + x i β 3 + x i β 2 n and k 2 i = α 3 x i + α 3 n + n 2 α 2 x i α 2 n α 2 x i + n α 2 + 2 n α 2 β x i α 2 β + n α β 2 α x i β α x i n + 2 n α β + α n 2 + x i α n β + x i α β 2 + x i n β + 2 x i β 2 n + x i β 3 .
Maximum likelihood (ML) estimator θ ^ = ( α ^ , β ^ , q ^ ) of θ = ( α , β , q ) can be obtained by setting (8)–(10) equal to zero and solving the resulting system of equations. However, due to the analytical complexity of these equations, estimates must be obtained using numerical methods.
The standard errors of the ML estimators can be obtained as the square roots of the elements of the diagonal of the matrix
K 1 ( θ ^ ) = 2 ( θ ; x i ) θ θ T | θ = θ ^ 1 ,
where ( θ ; x i ) / θ θ T is the hessian matrix.
Alternatively, ML estimates can be obtained by solving the optimization problem max θ ( θ ; x i ) , subject to α > 0 , β > 0 and q R , where ( θ ; x i ) is as in (7). For this, we recommend the use of the function stat:optim() of the R programming language, which also returns the numeric Hessian function. In particular, we consider the L-BFGS-B method [17], which allows the imposition of box constraints on the parameters. This means that it is possible to specify lower and upper bounds for each parameter, which is very valuable in optimization problems with high dimensions and specific constraints.
An R function for computing (7) is provided in Appendix A.

3.2. Simulation Study

In this section, we perform the simulation study by the acceptance–rejection sampling procedure; see Neumann [18]. We assume that X w is a random variable that follows a bimodal beta-binomial distribution, i.e., X w BBB ( n , α , β , q ) , and we generate 1000 random replications of samples of X w with sample sizes m = 50 , 100, 150, 200 and 300, respectively. We fix the maximum score number n equal to 30, and we define different scenarios setting different values for the parameters α , β , and q. For each scenario and sample size, Table 1 shows the behavior of the ML estimates, which are computed numerically using the optim function of the R programming language. Table 1 reports the mean and the standard deviation (sd) of the ML estimates in each scenario for each sample size. As expected, it can be observed that the average estimates move closer to the true values of the parameters as the sample size increases. Furthermore, it can be seen that the standard deviation decreases towards 0 as the sample size increases.

4. Applications

In this section, two applications are presented to illustrate the utility of the bimodal beta-binomial (BBB) distribution in modeling count data. In each application, the beta-binomial (BB) and McDonald generalized beta-binomial (McGBB) [19] distributions are incorporated into the analysis. The p.m.fs of the McGBB distribution is given by
P ( X = x ) = n x 1 B ( α , β ) j = 0 n x ( 1 ) j n x j B x q + α + j q , β , x = 0 , 1 , , n , α , β , q > 0 ,
where B ( · , · ) is the beta function.
Like the BB distribution, the McGBB distribution performs well in modeling overdispersed binomial data. However, due to a larger parameter dimension, the McGBB distribution may outperform the BB distribution in modeling overdispersed binomial data. Furthermore, it is important to note that the McGBB distribution can model bimodality when the empirical frequency distribution exhibits a bathtub shape, thus making the BBB distribution a natural alternative to the McGBB distribution.
We assessed the quality of the fits using the chi-square goodness-of-fit test and evaluated the comparative performance using the Akaike information criterion (AIC) [20] and the Bayesian information criterion (BIC) [21]. R codes used in this section are provided in Appendix A.
Furthermore, we use the excess mass test proposed in Ameijeiras-Alonso et al. [22] to show the bimodality of the data considered in the first application and the unimodality of the data considered in the second application. For this, we used the modetest function [23] in the R programming language.

4.1. Alcohol Consumption Data

The first data set consists of observations on the number of days on the n = 7 days of two reference weeks (week 1 and week 2), in which 399 individuals consume alcohol (See Table 2). Although there may be an attempt to use the binomial distribution to fit these data, it must be taken into account that the probability of consuming alcohol on a randomly chosen day in a week is variable from one individual to another. Based on the latter, Alanko and Lemmens [4] use the beta-binomial distribution to fit these data. On the other hand, Manoj et al. [19] illustrate that these data present an overdispersion with respect to the binomial distribution and that the McGBB distribution performs better than the BB and Kumaraswamy binomial [24] distributions in fitting these data.
For these data, we test hypothesis H 0 : the data have exactly two modes versus the alternative hypothesis H 1 : the data have more than two modes. For the data from week 1, we obtain an observed statistic equal to 0.021 with a p-value equal to 0.644. For the data from week 2, we obtain an observed statistic value equal to 0.023, with a p-value equal to 0.406. Therefore, with a significance level equal to 0.05, H 0 is not rejected in both weeks; that is, the frequency distributions of the data corresponding to weeks 1 and 2 exhibit bimodal behavior.
Other previous studies with these data can be found in Rodríguez-Avi et al. [25].
Table 2 reports the results obtained when fitting the alcohol consumption data using the BB, McGBB, and BBB distributions. The table shows that the BBB distribution presents the highest p-values in the chi-square goodness-of-fit test and the lowest AIC and BIC values, suggesting that the BBB distribution should be selected among the fitted distributions for modeling the alcohol consumption data.
Figure 4 shows the frequency distribution of the alcohol consumption data (Weeks 1 and 2) and the fitted BB, McGBB, and BBB distributions. In the figure, it can be seen that the frequency distributions of the number of drinking days present two frequency peaks and that the mass values of the BBB distribution are the closest to the empirical frequency values.

4.2. Candidate Assessment Data

In this section, we consider a dataset on candidate performance on an exam consisting of 9 questions. Each question is scored out of a total of 20 points, and when assessing a candidate’s final score, special attention is paid to the total number of questions on which he or she has an “alpha” (“alpha”—scoring at least 15 points on the question). The number of alphas is a rough indication of the quality of the candidate’s exam performance. Therefore, the distribution of alphas across candidates is of interest. A total of 209 candidates attempted questions from this 9-question section, and 326 alphas were awarded in total. Thus, we consider n = 9 (number of trials/questions), where the dichotomous variable on each trial is whether or not the candidate scored an alpha.
For these data, we test the hypothesis H 0 : the data has exactly one mode versus the alternative hypothesis H 1 : the data have more than one mode, obtaining an observed statistic equal to 0.031, with a p-value equal to 0.720. Consequently, with a significance level equal to 0.05, H 0 is not rejected; that is, the frequency distribution of the data exhibits unimodal behavior.
A previous study with these data can be found in Paul [26].
Table 3 reports the results obtained by fitting the number of alphas using the BB, McGBB, and BBB distributions. In the table, it can be seen that the BBB distribution presents the highest p-values in the chi-square goodness-of-fit test and the lowest AIC and BIC values, suggesting that the BBB distribution should be selected among the fitted distributions for modeling the number of alphas.
Figure 5 shows the frequency distribution of the number of alphas and the fitted BB, McGBB, and BBB distributions. In the figure, it can be seen that the frequency distribution of the number of alphas presents a single frequency peak and that the mass values of the BBB distribution are the closest to the empirical frequency values.

5. Final Comments

The beta-binomial (BB) and McDonald’s generalized beta-binomial (McGBB) distributions are discrete probability distributions used for modeling overdispersed binomial data. The McGBB distribution, presenting a larger parameter dimension than the BB distribution (three parameters), is capable of modeling even bimodality in cases where empirical frequency distributions present a bathtub shape. In this article, we propose the bimodal beta-binomial (BBB) distribution as an alternative for modeling overdispersed binomial data, both unimodal and bimodal. The new distribution arises from a weighted version of the BB distribution, where the weight function has the quadratic form proposed by Elal-Olivero [13]. Consequently, the BBB distribution is capable of presenting a flexible probability mass function in terms of shapes: monotonic, unimodal, and even bimodal. The bimodal shape of the BBB distribution is not limited to the bathtub shape (like the McGBB distribution), but the bimodality can be accompanied by various levels of skewness.
We derive the main structural functions of the BBB distribution, such as the p.m.f., the c.d.f., and the raw rth moment. We use the rth moment to describe the behavior of the coefficient of variation and the coefficient of skewness. We observe that the BBB distribution may exhibit a larger relative dispersion and a larger skewness than the BB distribution. We discuss parameter estimation via the maximum likelihood (ML) method. The estimators are not closed-form, so numerical methods are required to obtain the estimates. We develop a simulation study to evaluate the behavior of the ML estimators, in which we observe that the ML method provides acceptable estimates. Finally, we illustrate the utility of the BBB distribution by fitting real data sets. The illustrations show that the BBB distribution can outperform the BB and McGBB distributions in modeling count data that exhibit both unimodality and bimodality.

Author Contributions

Conceptualization, J.R., J.N.-Z. and D.-J.L.; Methodology, J.N.-Z., D.-J.L., J.A. and Y.A.I.; Software, J.A. and Y.A.I.; Validation, J.R., J.N.-Z., D.-J.L., J.A. and Y.A.I.; Formal analysis, J.R., J.N.-Z., D.-J.L., J.A. and Y.A.I.; Investigation, J.R., J.N.-Z., D.-J.L. and J.A.; Writing—review & editing, Y.A.I.; Supervision, J.R. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The original contributions presented in the study are included in the article, further inquiries can be directed to the corresponding author.

Conflicts of Interest

The authors declare no conflict of interest.

Appendix A. R Functions

The R codes used in this article are available at https://github.com/YuriIriarte/BBBdistribution (accessed on 18 September 2024) stored in the following files:
  • BBB-distribution;
    Includes R codes for computing the structural functions of the BBB distribution.
p.m.f. →dBBB();    c.d.f. → pBBB();    rth moment → momBBB()
coefficient of variation →coef.var();   skewness coefficient → skewnessBBB().
2.
BB-McGBB-distribution;
Includes R codes for computing the p.m.f.s of the BB and McGBB distributions.
      BB p.m.f. → dBB();   McGBB p.m.f. → dMcGBB().
3.
Log-likelihood;
Includes R codes for computing the log-likelihood functions to obtain the ML estimators using the optim() function.
      BB log-likelihood → loglikBB()
      McGBB log-likelihood → loglikMcGBB()
      BBB log-likelihood → loglikBBB().
4.
Application-alcohol-week1 (week2);
Includes the data and results obtained in the analysis in Section 4.1.
5.
Application-candidate;
Includes the data and results obtained in the analysis in Section 4.2.

References

  1. Böhning, D.; Dietz, E.; Schlattmann, P.; Mendonca, L.; Kirchner, U. The zero-inflated Poisson model and the decayed, missing and filled teeth index in dental epidemiology. J. R. Stat. Soc. Ser. A Stat. Soc. 1999, 162, 195–209. [Google Scholar] [CrossRef]
  2. Salman, A.K.; Fuchs, M.; Zampatti, D. Assessing risk factors of business failure in manufactoring sector: A count data approach from Sweden. Int. J. Econ. Commer. Manag. 2015, 3, 42–62. [Google Scholar]
  3. Calabria, R.; Guida, M.; Pulcini, G. Reliability analysis of repairable systems from in–service failure count data. Appl. Stoch. Model. Data Anal. 1994, 10, 141–151. [Google Scholar] [CrossRef]
  4. Alanko, T.; Lemmens, P.H. Response effects in consumption surveys: An application of the beta-binomial model to self-reported drinking frequencies. J. Off. Stat. 1996, 12, 253. [Google Scholar]
  5. Wilcox, R.R. A review of the beta-binomial model and its extensions. J. Educ. Stat. 1981, 6, 3–32. [Google Scholar] [CrossRef]
  6. Crowder, M.J. Beta-binomial ANOVA for proportions. Appl. Stat. 1978, 27, 34–37. [Google Scholar] [CrossRef]
  7. Tripathi, R.C.; Gupta, R.C.; Gurland, J. Estimation of parameters in the beta binomial model. Ann. Inst. Stat. Math. 1994, 46, 317–331. [Google Scholar] [CrossRef]
  8. Palm, B.G.; Bayer, F.M.; Cintra, R.J. Signal detection and inference based on the beta binomial autoregressive moving average model. Digit. Signal Process. 2021, 109, 102911. [Google Scholar] [CrossRef]
  9. Chen, H.; Li, Q.; Zhu, F. A covariate-driven beta-binomial integer-valued GARCH model for bounded counts with an application. Metrika 2023, 86, 805–826. [Google Scholar] [CrossRef]
  10. Jansen, K.; Holling, H. Rare events meta-analysis using the Bayesian beta-binomial model. Res. Synth. Methods 2023, 14, 853–873. [Google Scholar] [CrossRef]
  11. Fisher, R.A. The effect of methods of ascertainment upon the estimation of frequencies. Ann. Eugen. 1934, 6, 13–25. [Google Scholar] [CrossRef]
  12. Rao, C.R. On discrete distributions arising out of methods of ascertainment. Sankhyā Indian J. Stat. Ser. A 1965, 27, 311–324. [Google Scholar]
  13. Elal-Olivero, D. Alpha-skew-normal distribution. Proyecciones 2010, 29, 224–240. [Google Scholar] [CrossRef]
  14. Gómez-Déniz, E.; Pérez-Rodríguez, J.V.; Reyes, J.; Gómez, H.W. A bimodal discrete shifted Poisson distribution. a case study of tourists’ length of stay. Symmetry 2020, 12, 442. [Google Scholar] [CrossRef]
  15. Cortés, I.; Reyes, J.; Iriarte, Y.A. A Weighted Skew-Logistic Distribution with Applications to Environmental Data. Mathematics 2024, 12, 1287. [Google Scholar] [CrossRef]
  16. R Core Team. R: A Language and Environment for Statistical Computing; R Foundation for Statistical Computing: Vienna, Austria, 2023. [Google Scholar]
  17. Byrd, R.H.; Lu, P.; Nocedal, J.; Zhu, C. A limited memory algorithm for bound constrained optimization. SIAM J. Sci. Comput. 1995, 16, 1190–1208. [Google Scholar] [CrossRef]
  18. Neumann, V. Various techniques used in connection with random digits. Natl. Bur. Stand. 1951, 12, 36–38. [Google Scholar]
  19. Manoj, C.; Wijekoon, P.; Yapa, R.D. The McDonald generalized beta-binomial distribution: A new binomial mixture distribution and simulation based comparison with its nested distributions in handling overdispersion. Int. J. Stat. Probab. 2013, 2, 24. [Google Scholar] [CrossRef]
  20. Akaike, H. A new look at the statistical model identification. IEEE Trans. Autom. Control 1974, 19, 716–723. [Google Scholar] [CrossRef]
  21. Schwarz, G. Estimating the dimension of a model. Ann. Stat. 1978, 6, 461–464. [Google Scholar] [CrossRef]
  22. Ameijeiras-Alonso, J.; Crujeiras, R.M.; Rodríguez-Casal, A. Mode testing, critical bandwidth and excess mass. Test 2019, 28, 900–919. [Google Scholar] [CrossRef]
  23. Ameijeiras-Alonso, J.; Crujeiras, R.M.; Rodriguez-Casal, A. Multimode: An R package for mode assessment. arXiv 2018, arXiv:1803.00472. [Google Scholar] [CrossRef]
  24. Xiaohu, L.; Yanyan, H.; Xueyan, Z. The Kumaraswamy binomial distribution. Chin. J. Appl. Probab. Stat. 2011, 27, 511–521. [Google Scholar]
  25. Rodríguez-Avi, J.; Conde-Sánchez, A.; Sáez-Castillo, A.; Olmo-Jiménez, M. A generalization of the beta–binomial distribution. J. R. Stat. Soc. Ser. C Appl. Stat. 2007, 56, 51–61. [Google Scholar] [CrossRef]
  26. Paul, S. A three-parameter generalization of the binomial distribution. Hist. Philos. Log. 1985, 14, 1497–1506. [Google Scholar] [CrossRef]
Figure 1. Plots of the p.m.f. of the bimodal beta-binomial distribution with n = 20 and different values of α , β and q.
Figure 1. Plots of the p.m.f. of the bimodal beta-binomial distribution with n = 20 and different values of α , β and q.
Axioms 13 00662 g001
Figure 2. Plots of the c.d.f. of the bimodal beta-binomial distribution with n = 20 , α = 4 , β = 4 and different values of q.
Figure 2. Plots of the c.d.f. of the bimodal beta-binomial distribution with n = 20 , α = 4 , β = 4 and different values of q.
Axioms 13 00662 g002
Figure 3. Plots of the coefficient of variation and the skewness coefficient (as a function of q) of the bimodal beta-binomial distribution with n = 20 and different values of α and β .
Figure 3. Plots of the coefficient of variation and the skewness coefficient (as a function of q) of the bimodal beta-binomial distribution with n = 20 and different values of α and β .
Axioms 13 00662 g003
Figure 4. Frequency distributions of the number of drinking days in weeks 1 and 2 and p.m.f.s for the BB, McGBB, and BBB distributions provided with the ML estimates reported in Table 2.
Figure 4. Frequency distributions of the number of drinking days in weeks 1 and 2 and p.m.f.s for the BB, McGBB, and BBB distributions provided with the ML estimates reported in Table 2.
Axioms 13 00662 g004
Figure 5. Frequency distributions of the number of alphas and p.m.f.s for the BB, McGBB, and BBB distributions provided with the ML estimates reported in Table 3.
Figure 5. Frequency distributions of the number of alphas and p.m.f.s for the BB, McGBB, and BBB distributions provided with the ML estimates reported in Table 3.
Axioms 13 00662 g005
Table 1. Simulation of 1000 replications for the BBB distribution.
Table 1. Simulation of 1000 replications for the BBB distribution.
mn α β q α ^ sd ( α ^ ) β ^ sd ( β ^ ) q ^ sd ( q ^ )
50300.5120.5170.1171.0430.2922.1840.681
100300.5120.5060.0811.0120.1992.0720.404
150300.5120.5050.0661.0040.1602.0620.323
200300.5120.5020.0570.9990.1382.0340.273
300300.5120.5010.0460.9990.1122.0200.219
50300.5210.5330.1462.3220.8791.0320.322
100300.5210.5120.1002.1320.5941.0100.220
150300.5210.5070.0812.0650.4731.0050.176
200300.5210.5040.0702.0480.4131.0050.150
300300.5210.5020.0572.0370.3381.0030.121
50303.0523.1670.7175.3401.3882.1550.620
100303.0523.0680.4845.1410.9312.0750.394
150303.0523.0460.3895.0840.7432.0620.315
200303.0523.0230.3345.0450.6382.0390.268
300303.0523.0150.2715.0300.5172.0260.215
50305.0325.3471.2613.3171.0492.1970.723
100305.0325.1120.8293.1030.6802.0850.442
150305.0325.0720.6683.0570.5472.0660.349
200305.0325.0450.5733.0380.4692.0480.296
300305.0325.0390.4663.0340.3812.0360.237
50301.0231.0150.1632.0290.3233.2170.871
100301.0231.0080.1452.0130.2863.1590.741
150301.0231.0050.1182.0020.2313.1100.575
200301.0231.0010.1022.0010.2003.0640.481
300301.0231.0010.0832.0000.1633.0320.382
50301.0321.0390.2313.1270.7242.1350.574
100301.0321.0120.1593.0400.4922.0530.368
150301.0321.0080.1293.0110.3952.0420.295
200301.0321.0030.1113.0040.3412.0220.251
300301.0321.0020.0903.0030.2782.0160.203
50302.0312.2330.6313.6471.3441.0600.463
100302.0312.0990.4213.2840.8461.0180.288
150302.0312.0600.3423.1770.6811.0070.229
200302.0312.0390.2913.1220.5771.0050.192
300302.0312.0320.2393.0930.4741.0070.153
s d corresponds to the standard deviation for the ML estimates.
Table 2. ML estimates, maximum log-likelihood value, AIC and BIC values, and observed statistic ( χ 2 ), degrees of freedom (DF), and p-value obtained in the chi-square goodness-of-fit tests for the BB, McGBB, and BBB distributions fitted to the alcohol consumption data.
Table 2. ML estimates, maximum log-likelihood value, AIC and BIC values, and observed statistic ( χ 2 ), degrees of freedom (DF), and p-value obtained in the chi-square goodness-of-fit tests for the BB, McGBB, and BBB distributions fitted to the alcohol consumption data.
Number of Drinking DaysObserved Frequency (Week 1)Expected BB Frequency (Week 1)Expected McGBB Frequency (Week 1)Expected BBB Frequency (Week 1)Observed Frequency (Week 2)Expected BB Frequency (Week 2)Expected McGBB Frequency (Week 2)Expected BBB Frequency (Week 2)
04754.6051.2948.394247.9045.9241.62
15442.0045.6741.934742.9045.1348.86
24338.9043.1746.285441.9044.7549.37
34038.5041.6142.654042.5044.5047.03
44040.1040.5239.264944.3044.3543.70
54144.0040.0137.464047.8044.5141.14
63953.1041.8341.114354.9046.5743.28
79587.8094.9094.858476.7083.2683.96
Total399399399399399399399399
χ 2 9.6002.1620.366 9.7004.0041.397
DF 544 544
p-value 0.0860.7060.833 0.0820.4060.986
ML α ^ 0.7220.0281.147 0.8580.0271.354
estimates β ^ 0.5810.1550.325 0.7010.2150.392
q ^ -32.3450.701 -36.0750.732
Log-Likelihood −813.457−809.627−809.329 −821.392−818.402−817.650
AIC 1630.91625.31624.7 1646.81642.81641.3
BIC 1638.91637.21636.6 1654.81654.81653.3
Table 3. ML estimates, maximum log-likelihood value, AIC and BIC values, and observed statistic ( χ 2 ), degrees of freedom (DF), and p-value obtained in the chi-square goodness-of-fit tests for the BB, McGBB, and BBB distributions fitted to the number of alphas.
Table 3. ML estimates, maximum log-likelihood value, AIC and BIC values, and observed statistic ( χ 2 ), degrees of freedom (DF), and p-value obtained in the chi-square goodness-of-fit tests for the BB, McGBB, and BBB distributions fitted to the number of alphas.
Number of AlphasObserved FrequencyExpected BB FrequencyExpected McGBB FrequencyExpected BBB Frequency
06363.6763.4963.41
16749.2350.3766.31
23435.8435.8938.93
31824.8124.3517.05
41116.2415.778.29
589.899.646.18
645.475.434.80
732.632.702.79
811.001.091.05
900.230.280.20
Total209209209209
χ 2 11.1219.6692.457
DF 766
p-value 0.1330.1390.873
ML α ^ 1.05716.5432.465
estimates β ^ 4.3003.7025.921
q ^ -0.1010.942
Log-Likelihood −354.025−353.414−351.319
AIC 712.051712.828708.639
BIC 718.735722.855718.665
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Reyes, J.; Najera-Zuloaga, J.; Lee, D.-J.; Arrué, J.; Iriarte, Y.A. A Bimodal Extension of the Beta-Binomial Distribution with Applications. Axioms 2024, 13, 662. https://doi.org/10.3390/axioms13100662

AMA Style

Reyes J, Najera-Zuloaga J, Lee D-J, Arrué J, Iriarte YA. A Bimodal Extension of the Beta-Binomial Distribution with Applications. Axioms. 2024; 13(10):662. https://doi.org/10.3390/axioms13100662

Chicago/Turabian Style

Reyes, Jimmy, Josu Najera-Zuloaga, Dae-Jin Lee, Jaime Arrué, and Yuri A. Iriarte. 2024. "A Bimodal Extension of the Beta-Binomial Distribution with Applications" Axioms 13, no. 10: 662. https://doi.org/10.3390/axioms13100662

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop