When a variable is binary, it sure seems like its distribution is totally characterized by the probability of being in one group: the variable takes one value with probability $p$ and the other value with probability $1-p$. This is essentially a Bernoulli distribution.
But...
There is a beta-binomial distribution, which says that there are $n$ trials (flips of a coin) of a Bernoulli random variable, where each Bernoulli has a a probability $p$ that is drawn from a beta distribution. Thus, the parameters of a beta-binomial distribution are not $n$ and $p$ like the binomial but $n$ (still) as well as the $a$ and $b$ of a beta distribution.
Beta-binomial distributions on $n$ trials can give distributions that simply cannot be achieved by binomial distributions, so the beta-binomial is different from the usual binomial. When we restrict the beta-binomial to be on only one trial, do we get anything useful that is not captured by the usual Bernoulli probability parameter?
That's just one idea. There are all kinds of other distributions one can put on $[0,1]$ that are not beta distributions but are valid distributions from which Bernoulli probability parameters can be drawn. When we have multiple trials of a Bernoulli, I definitely get why more than just binomial is in play. Is this useful for just one Bernoulli trial, however?
I am thinking of a situation where we have $iid$ data like $0,1,0,0,1,0,1,1,1,0$. Sure, it seems like that is Bernoulli$(0.5)$, but could it be beta-Bernoulli$(a,b)$ for some values of $a$ and $b$ that are parameters of a beta distribution?
(Really, I want to consider this in a logistic-ish regression where the outcome is binary and the conditional distribution is modeled. With just one trial, though, I am not sure how the modeling would go. Ultimately, there is a probability of an event happening or not and then the event happens with that probability...or does it?)
EDIT
Simulating in R, it sure seems like there is not a difference.
library(ggplot2)
set.seed(2023)
N <- 10000
R <- 10000
a <- 1/3
b <- 1
p_bernoulli <- p_betabernoulli <- rep(NA, R)
for (i in 1:R){
p <- rbeta(N, a, b)
p_betabernoulli[i] <- mean(rbinom(N, 1, p))
p_bernoulli[i] <- mean(rbinom(N, 1, a/(a + b)))
if (i %% 75 == 0 | i < 5){
print(paste(
i/R*100,
"% Complete",
sep = ""
))
}
}
d0 <- data.frame(
p = p_bernoulli,
Distribution = "Bernoulli"
)
d1 <- data.frame(
p = p_betabernoulli,
Distribution = "Beta-Bernoulli"
)
d <- rbind(d0, d1)
ggplot(d, aes(x = p, fill = Distribution)) +
geom_density(alpha = 0.25)
