Is the binomial distribution appropriate?

59 Views Asked by At

Say there's a group of p monkeys.

Some of the monkeys, a total of yp (where 0<y<1), each has an amount x of banana-cake to give away, which they will distribute generously to the whole rest of the group. Each one does this by dividing the x banana-cake into n slices, and chucking each slice at random into the group of all other monkeys. Each does this n times, until all their x banana-cake has been distributed. (Some lucky monkeys might receive several slices of cake.) Once all the banana-cake has been distributed, the monkeys all sit around happily until, tragically, a total dp of the monkeys (where 0<d<1) is brutally slaughtered by a horde of marauding hippopotamuses.

I'd be interested to know what the expected distribution of monkeys with different amounts of banana-cake is after all this has taken place. How many monkeys have, say, x bits of banana-cake, how many have x/2, etc.

I believe I'd need to use the binomial distribution, but am not quite sure how. Could anyone enlighten me?

1

There are 1 best solutions below

1
On BEST ANSWER

Not an answer, but a comment can't be properly made to display block code, so here's a little MATLAB script to murder thousands of innocent (virtual) monkeys and look at the distribution, you monster:

function stats = q1427076(N, monkeys, cakes, kills, slices)
    stats = zeros(cakes * slices - 1, 1);
    for i=1:N
        x = zeros(monkeys,1);
        for c=1:cakes
            m = randi(monkeys-1,slices,1); % we won't take a slice of our own cake, will we?
            m(m >= c) = m(m >= c) + 1;
            x(m) = x(m) + 1; % Give it to a buddy
        end
        for k=1:kills
            x(randi(length(x))) = []; % You monster.
        end
        for s=1:length(x)
            stats(x(s) + 1) = stats(x(s) + 1) + 1; % Keep the record
        end
    end
    stats = stats / N / (monkeys-kills); % Make it a PDF
end

Where $\text{monkeys} = p$, $\text{cakes} = yp$, $\text{kills} = dp$ and $\text{slices} = n$. $N$ is the number of times to conduct the experiment. Bigger is better but slower.