| New Reply |
Simulation of beta-binomial distribution |
Share Thread | Thread Tools |
| May4-12, 11:06 AM | #1 |
|
|
Simulation of beta-binomial distribution
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. |
| May4-12, 04:10 PM | #2 |
|
Recognitions:
|
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.
|
| May5-12, 02:56 AM | #3 |
|
|
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! |
| May5-12, 03:04 AM | #4 |
|
|
Simulation of beta-binomial distributionhttp://en.wikipedia.org/wiki/Probabi...ating_function |
| May9-12, 03:44 PM | #5 |
|
|
|
| New Reply |
| Thread Tools | |
Similar Threads for: Simulation of beta-binomial distribution
|
||||
| Thread | Forum | Replies | ||
| Casio fx-9860G - calculating binomial coefficients and binomial distribution | General Math | 3 | ||
| Relationship binomial distribution and central limit theorem + poission distribution | Set Theory, Logic, Probability, Statistics | 1 | ||
| How is the negative binomial the inverse of the binomial distribution? | Set Theory, Logic, Probability, Statistics | 1 | ||
| Nuclear Simulation- Beta Decay ?? | High Energy, Nuclear, Particle Physics | 8 | ||
| Derivation of the probability distribution function of a binomial distribution | General Math | 2 | ||