Hi,
I am trying to simulate the following (am a newbie)
On a party a given number of snacks are distributed at random to guests.
Also given the distribution of the number of snacks per guest: e.g. 100 have had 1 snack 75 have had 2 snacks etc.
To be concrete there are 900 snacks and the distribution is 144, 124, 93, 34, 12, 4, 1. (so 1 person had 7 snacks)
The question is how many guests did not receive a snack?
When the number of guests is know, the number of guests that did not get a snack is also known.
There are at least 413 guests.
So I thought that I could use the DiscreteUniform distribution
no_guests = pm.DiscreteUniform('guests',lower=413,upper=1000)
And then use the no_guests as an input for sampling.
But I cannot use this number in an to create an array to tally the number of snacks a certain person receives
with pm.Model() as model:
no_guests = pm.DiscreteUniform('guests',lower=1,upper=1000)
guests = pm.Deterministic(np.zeros(no_guests))
for i in guests:
guests[np.random.randint(0, no_guests)] += 1
How can I build this model?
Regards Hans-Peter