# Sheldon Ross 10: Exercise 3.57

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 x00!) + (e-x x11!) + (e-x x22!)) dx5 ≅ 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 !!

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.