# Combining two or more probability distributions with an upper limit

I have calculated probability distributions of a product’s consumption for males and females in a single member household. Next, I would like to apply those distributions to households that contain more than one member for e.g. household occupied by one male and two females or one male and one female. How can I code in stan to merge two or more probability distributions such that, the sum is less than total amount bought by the household.

My data looks like:

Household Member3 Gender1 Gender2 Gender3 ProbDist1 ProbDist2 ProbDist3 TotalAmountBought
1 3 Male Male Female N(3.2,0.3) N(3.2,0.3) N(2.1,0.5) 4
2 2 Male Male N(3.2,0.3) N(3.2,0.3) 2
3 2 Male Female N(3.2,0.3) N(2.1,0.5) 3

My upper limit of summing the probability distributions is defined by the TotalAmountBought.

Generatively, what you have is a kind of additive mixture model where you know the mixture ratios (number of men and women).

I don’t understand why there are distributions in your data—that’s not what we’d call data. But I’ll just take that last column.

Normal distributions don’t make sense if the data is positive count data. You want somehting geared to count data like Poisson or more generally, negative binomial.

Then you need to marginalize over what all the different household members bought. That’s going to be really complicated to code if you have an unbounded number of possible household members. So instead what you can do is just use a single Poisson or negative binomial and model the variation of the mean based on the number of men and women.