Amira knows that the time it takes her to commute to work is approximately normally distributed with a mean of 45 minutes and a standard deviation of 3 minutes. What time must she leave home in the morning so that she is 95% sure of arriving at work by 9.00am?
Assume that random variable denotes a time that Amira needs to arive at work.
We need to find such a minimum number that . We remind that the density fo the normal distribution with parameters and is: . Thus, . The latter yields in case . We used the following code in Anaconda to get the result:
from scipy import integrate
import numpy as np
import math
func = lambda x:(1/(3*math.sqrt(2)*math.sqrt(math.pi)))*math.exp(-1/2*((x-45)/3)*((x-45)/3))
e = integrate.quad(func, -np.inf, 49.94)
print(e)
We subsituted different values in the command to get the result
Thus, it is enough to leave at 8.10 (more precisely, at 8.10 and 6 seconds) to arrive at work till 9.00am.
Comments