Sheldon Ross 10: Example 3.11 (The Expectation of the Sum of a Random Number of Random Variables)

Question: Suppose that the expected number of accidents per week at an industrial plant is four. Suppose also that the numbers of workers injured in each accident are independent random variables with a common mean of 2. Assume also that the number of workers injured in each accident is independent of the number of accidents that occur. What is the expected number of injuries during a week?

Solution: In summary, the expected number of injuries during the week would be simply

E [Accidents / Week] * E [Injuries / Accident] = 4 * 2 = 8

This happens to be the case because of the independence of the events. If there is a correlation between these two random variables, then there will be a conditional dependence of one variable upon the value of the other variable. A dependency scenario for this example would be saying that the number of injuries is a function of the number of accidents times a random variable.


  • Modeling wise, we will choose the Poisson distribution
    • the number of Accidents per week: with λ = 4
    • the number of Injuries per accident: with λ = 2
  • Note that the simulation of this is very straightforward as outlined in the code
  • The distributions shown below can be understood as follows
    • The first distribution one shows the number of accidents per week
    • The second distribution in the chart shows the number of injuries per accident
    • The third distribution shows the mean accidents per total number of injuries per week
  • The means of the respective distributions are shown on their tops


Module[{numberOfAccidents =
    RandomVariate[PoissonDistribution[4], 10000], accidents},
  accidents =
      RandomVariate[PoissonDistribution[2], #] & /@ numberOfAccidents;
  DistributionChart[{numberOfAccidents, Flatten@accidents,
    Total /@ accidents}, ChartElementFunction -> "Density",
    ChartStyle -> Red, ImageSize -> 788,
    ChartLabels ->
        Placed[{{N@Mean@numberOfAccidents, N@Mean@Flatten@accidents,
          N@Mean@(Total /@ accidents)}, {"Accidents/Week",
          "Injuries/Accident", "Injuries/week"}}, {Above, Below}]]

End of the post