Simulation of beta-binomial distribution

Click For Summary

Discussion Overview

The discussion revolves around the simulation of the beta-binomial distribution and its applicability when the success probabilities of Bernoulli trials are not constant but follow a beta distribution. Participants explore the implications of using the beta-binomial distribution versus the Poisson's binomial distribution in this context, particularly in relation to simulation results.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • Fryderyk C. describes a scenario where the number of successes in N Bernoulli trials is modeled, noting that when success probabilities vary, the Poisson's binomial distribution is applicable.
  • Fryderyk C. asserts that when the probabilities follow a beta distribution, the resulting PMF should align with the beta-binomial distribution, but simulation results do not support this.
  • Some participants question whether Fryderyk C. is correctly implementing the simulation, particularly regarding the generation of varying probabilities for each trial.
  • Fryderyk C. clarifies that the probabilities are constant across iterations, which they speculate might be the reason for the mismatch with the beta-binomial distribution.
  • One participant suggests using a probability generating function to handle the situation where each "thing" has different probabilities, regardless of their distribution.
  • Another participant argues that knowing the probabilities of success makes the scenario fit the Poisson-binomial distribution more appropriately than the beta-binomial distribution.

Areas of Agreement / Disagreement

Participants express differing views on the applicability of the beta-binomial versus the Poisson's binomial distribution in this context. There is no consensus on the correct approach or the reasons for the simulation results not fitting the expected distributions.

Contextual Notes

Participants note that the constancy of the success probabilities across iterations may influence the distribution fitting, but the implications of this are not fully resolved. The discussion also highlights the complexity of modeling with varying probabilities and the potential limitations of the beta-binomial distribution in this scenario.

fchopin
Messages
10
Reaction score
0
Hi all!

I'm trying to solve the following problem.

The number of successes in a sequence of N yes/no experiments (i.e., N Bernoulli trials), each of which yields success with probability p, is given by the well-known binomial distribution. This is true if the success probability p is constant and the same for all the N trials.

However, when the probability of success, p, is different for each trial, p_1, p_2, ..., p_N, then the number of successes does not follow a binomial distribution, but a Poisson's binomial distribution instead:

wikipedia--> /Poisson_binomial_distribution

I understand that the Poisson's binomial distribution is valid for any set of probabilities p_1, p_2, ..., p_N.

In my problem, I know that the probabilities p_1, p_2, ..., p_N follow a beta distribution. I found out that, in such a case, the resulting PMF of the number of successes in N trials is given by the beta-binomial distribution:

wikipedia --> /Beta-binomial_distribution

However, I have been playing a bit with some simulation and it seems that this distribution does not fit the resulting PMF. I'm attaching a Matlab file that makes some simulation and generates the PMFs.

What am I doing wrong? Is it possible to exploit the knowledge that the p_1, p_2, ..., p_N follow a beta distribution to simply the general Poison's binomial case? What is the PMF that I need?

Many thanks in advance!

Fryderyk C.
 

Attachments

Physics news on Phys.org
I don't know matlab. Did you draw a new value of p on each bernoulli trial? You comment says you intended to, but I don't see where this happened inside your loop on t.
 
Thanks for quick reply.

Basically my problem is that I have a set of N "things" I observe at different time instants t, and I know the success/failure probabilities for each "thing". What I need is the probability to observe k successes in each observation of the N "things".

So I first generate a vector p with N beta-distributed random numbers --> p = betarnd(a,b,1,N), which remains always the same.

Then I use the same set of probabilities p = p_1, p_2,...,p_N in every iteration of the loop on t.

In the problem I'm studying, the N values of p are known and constant. I thought this might be the reason why the beta-binomial distribution doesn't fit. However, I tried drawing different values of p in every iteration of the loop on t and the result doesn't fit the beta-binomial distribution either. In this case, even the Poisson's binomial distribution doesn't fit! Any ideas? Thanks!
 
fchopin said:
Thanks for quick reply.

Basically my problem is that I have a set of N "things" I observe at different time instants t, and I know the success/failure probabilities for each "thing". What I need is the probability to observe k successes in each observation of the N "things".

So I first generate a vector p with N beta-distributed random numbers --> p = betarnd(a,b,1,N), which remains always the same.

Then I use the same set of probabilities p = p_1, p_2,...,p_N in every iteration of the loop on t.

In the problem I'm studying, the N values of p are known and constant. I thought this might be the reason why the beta-binomial distribution doesn't fit. However, I tried drawing different values of p in every iteration of the loop on t and the result doesn't fit the beta-binomial distribution either. In this case, even the Poisson's binomial distribution doesn't fit! Any ideas? Thanks!

If you have independent events for each 'thing' but the probabilities for each thing is different, then you can use what is called a probability generating function to generate the distribution even if each thing has a different probability.

http://en.wikipedia.org/wiki/Probability-generating_function
 
fchopin said:
Thanks for quick reply.

Basically my problem is that I have a set of N "things" I observe at different time instants t, and I know the success/failure probabilities for each "thing". What I need is the probability to observe k successes in each observation of the N "things".

So I first generate a vector p with N beta-distributed random numbers --> p = betarnd(a,b,1,N), which remains always the same.

Then I use the same set of probabilities p = p_1, p_2,...,p_N in every iteration of the loop on t.

In the problem I'm studying, the N values of p are known and constant. I thought this might be the reason why the beta-binomial distribution doesn't fit. However, I tried drawing different values of p in every iteration of the loop on t and the result doesn't fit the beta-binomial distribution either. In this case, even the Poisson's binomial distribution doesn't fit! Any ideas? Thanks!

I don't think your description fits the Beta-Binomial distribution but rather the Poisson-Binomial distribution, the moment you know the probability of success of your event within a period t it is irrelevant if you know it because X follows a Beta distribution or any other, the fact is that you know it.
 
Last edited:

Similar threads

  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 14 ·
Replies
14
Views
6K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
2
Views
1K
  • · Replies 0 ·
Replies
0
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K