**Question:** The number of storms in the upcoming rainy season is Poisson distributed but with a parameter value that is uniformly distributed over (0, 5). That is, Λ is uniformly distributed over (0, 5), and given that Λ = λ, the number of storms is Poisson with mean λ. Find the probability there are at least three storms this season.

**Analytical Solution**

This can be obtained by conditioning on Λ which itself varies as a uniform normal distribution.

P{X≥3} = 1 – P{X≤2}

⇒ P{X≥3} = 1 – ( P{ X=0|Λ=λ } P{ Λ=λ } + P{ X=1|Λ=λ } P{ Λ=λ } + P{ X=0|Λ=λ } P{ Λ=λ } )

⇒ P{X≥3} = 1 – ∫ ((^{e-x x0}⁄_{0!}) + (^{e-x x1}⁄_{1!}) + (^{e-x x2}⁄_{2!})) ^{dx}⁄_{5} ≅ 0.434364

**Simulation Solution**

I have coded the same and for a particular instance of million iterations the proportion of the cases where there have been at least three storms per season turned out to be = 0.434085 which is pretty close to our estimated value. The code for the simulation is provided below.

**Code**

Module[ {storms := RandomVariate[PoissonDistribution[RandomReal[{0, 5}]]], days = 1000000}, storms = Table[storms, days]; Divide[Length[Select[storms, # >= 3 &]], days] // N ]

End of the post !!

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.