Probability Simulation

65 Views Asked by At

I was able to solve A but not sure about how to go about with the simulation.

let Xi = total number of times travelled via bus

x2 = total time to travel via car

prob it rains 20%

0.2 E(35+x1) + 80/100 E(x2) 0.2(40) + 0.8(30) = 32....please check as I am not sure and also assist with how to go about the simulation on python. Thank you

Suppose Alice takes the bus to work when the weather is clear, and drives her car to work when it is raining. The probability of rain is 20%. The wait time for the bus follows an exponential distribution with an average wait time of 5 minutes. Once the bus arrives it always takes 35 minutes to get to work. When Alice drives to work, her commute time is normally distributed with a mean of 30 and standard deviation of 5.

(a) What is the theoretical mean of Alices commute time?

(b) Use simulations to estimate the mean and variance of Alices commute time.

(c) Estimate by simulation the probability that the bus trip, including the wait, is longer than the car trip.