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