Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

4) (1.5 pts each) Submit your R code to solve the following problem: A new carwash opens, which allows customers to drive in then spend

image text in transcribed
4) (1.5 pts each) Submit your R code to solve the following problem: A new carwash opens, which allows customers to drive in then spend as long as they want washing their own car using materials provided by the company. The carwash charges a dollar a minute for the first 20 minutes the customer is there, then $0.80 per minute thereafter. They round to the nearest minute. (Hint: use the ifelse function to model this). Since it's run by savvy business people, the carwash closely monitors their first 250 customers to determine the behavior of the average customer and understand whether their business will be profitable. The data they find is in the attached file. The company wants to fit a distribution to both the time customers spend washing their car and the variable costs of the customers, accounting for correlation. For time spent, they use a gamma distribution, shifted to the right by five. For variable costs , they use a normal distribution. After fitting the distributions, the company wants to use a Monte Carlo simulation with 10,000 trials to make inferences about the profit they'll make from a customer. a) What is the Spearman correlation between time spent and variable cost? b) What estimates do you come up with for the shape and rate of the gamma distribution and the mean and standard deviation of the normal distribution? (Hint: subtract 5 from time spent before fitting the gamma distribution.) c) What K-S statistic do you observe for each fit? Do you consider the fit of the distributions to be good? Why? (Note: for questions d-g, if you don't succeed in fitting the distributions or finding the fitted parameters, use the historical data itself to answer the following questions. You will lose 2 points for failing to randomly generate correlated data.) d) For a given customer, what mean profit does the carwash observe? (Hint: don't forget to add the 5 minutes back to time spent when randomly generating time spent.) e) Provide a 95% confidence interval for the mean of profit. f) For a given customer, how likely is the company to observe a profit of at least $20? g) Create a histogram for the profit from a given customer

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Real Analysis On Intervals

Authors: A D R Choudary, Constantin P Niculescu

1st Edition

8132221486, 9788132221487

More Books

Students also viewed these Mathematics questions

Question

Name and describe the major steps in developing a new product.

Answered: 1 week ago

Question

=+b) State the hypotheses.

Answered: 1 week ago

Question

=+6. Select the one that would work best for this client.

Answered: 1 week ago