Average of random variables from two Poisson distributions?
Show older comments
I'm lost with a very simple question of finding the average of random variables from two Poisson distributions. I know that if X ~ Pois(L1) and Y ~ Pois(L2), then X+Y ~ Pois(L1+L2).
I have a queue open for nine hours daily with an average of four persons in it every given minute for seven hours and an average of 20 persons in it every given minute for two hours. So I can't simply pair the X from four persons per minute with Y from 20 persons per minute. I suppose I could pair two hours of X ~ Pois(4) and two hours of Y ~ Pois(20) and simulate 240 samples with poissrnd(24) to get the number of persons in the queue for each minute of 4/9 hours but I don't know what would I do with the remaining five hours of X ~ Pois(4)? Maybe I could pair four hours of X ~ Pois(4) with four hours of Z = X+Y ~ Pois(24) and simulate 480 samples with poissrnd(28) but that would leave me one remaining hour of X ~ Pois(4). Would it be correct to take 480 samples with poissrnd(28) and then simply add 60 samples with poissrnd(4)?
After finding out how to simulate the samples I take the average of them. The question is, how do I simulate the random samples representing the number of people in the queue during the day with this information? Is mean( 480*poissrnd(28) + 60*poissrnd(4) ) what I am looking for? Assumption is, that Poisson distribution is the right one for the job so I'll use that.
7 Comments
Jeff Miller
on 5 Nov 2022
Why don't you simulate 7*60 values from Pois(4) and 2*60 values from Pois(20), then take the average of those 9*60 values?
Torsten
on 5 Nov 2022
And the average distribution is Pois(7/9 * 4 + 2/9 * 20) ?
Jeff Miller
on 6 Nov 2022
Well, the mean of the 9*60 values is definitely 7/9*4+2/9*20. I'm not sure what "average distribution" refers to in this context. The distribution of the 9*60 values is a mixture distribution with that mean, but the mixture itself isn't Poisson (i.e., it is bimodal with modes at about 4 and 20).
But if you simulate 7*60 values from Pois(4) and 2*60 values from Pois(20), then take the average of those 9*60 values, you get a random variable Z that can be computed as
Z = 1/9 * (X1 + X2 + X3 + X4 + X5 + X6 + X7 + Y1 + Y2)
where the Xi ~ Pois(4) and the Yi ~ Pois(20), so Z ~ 1/9 * Pois(7*4 + 2*20) ?
Jeff Miller
on 6 Nov 2022
If Z is the average you have written, it need not be an integer so it can't be Poisson. Anyway, the average of these 540 random values will be very nearly normal (central limit theorem).
Jonne Klockars
on 6 Nov 2022
Accepted Answer
More Answers (0)
Categories
Find more on Univariate Discrete Distributions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!