Question

Two mechanics are changing oil filters for the arriving customers. The service time has an Exponential...

Two mechanics are changing oil filters for the arriving customers.
The service time has an Exponential distribution with mean 12 minutes for the first mechanic,
and mean 3 minutes for the second mechanic. When you arrive to have your oil filter changed,
your probability of being served by the faster mechanic is 0.8.
Use simulation to generate 10000 service times and estimate the mean service time for you.

Using R code

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Let the service time for first mechanic be X_1 and the service time for first mechanic be X_2.

Then X1~ Exp( 1/12), X2~ Exp(A = 1/3)

The resulting service time is X_2 with probability 0.8 and X_1 with probability 0.2.

The R code for simulating 10,000 resultant service times X and finding the mean is given below.

set.seed(7657)
N <- 10000
X <- array(dim=N)
for(i in 1:N)
{
u <- runif(1)
if(u<0.8)
{
X[i] <- rexp(1,rate=1/3)
}
else
{
X[i] <- rexp(1,rate=1/12)
}
}
mean(X)

The mean service time is 4816 minutes

Add a comment
Know the answer?
Add Answer to:
Two mechanics are changing oil filters for the arriving customers. The service time has an Exponential...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT