Question
Instructions Two mechanics are changing oil filters for the arriving customers. The service time has an Exponential distribution with mean 12 minutes for the first
Instructions
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 thefastermechanic is 0.8.
(a) Use simulation togenerate10000 service times andestimatethe mean service time for you.
(b) Summarize your data with the code hist(x, probability = TRUE) and mean(x), where x is your simulated data. Add two vertical lines indicating the simulated mean and the theoretical mean. The graph you just plotted is called a density histogram.
(c) Comment on your findings.
Requirement:Make a shiny app that implements the above details.
The project should include
a) a title
b) author and date
c) the original description of the problem
d) at least part of simulated data
e) summary graphs/tables
f) a discussion
Submission:Submit your work through https://www.shinyapps.io/
Hint:
- An intro to mixture distributions: https://en.wikipedia.org/wiki/Mixture_distribution
- You should generate say 10000 values some from the quicker mechanic and some from the slower one depending on the chance.
- The histogram should look like the theoretical distribution of the service time random variable.
- A discussion can be made about the comparison between the simulated and the theoretical results. The theoretical mean can be calculated by weighting the two mean times with weights being the probabilities. If you want, ask me about a derivation of the theoretical mean.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started