Jennifer's Spa offers various health treatments such as facial, massage, power shower, mineral bath, and sauna....
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Jennifer's Spa offers various health treatments such as facial, massage, power shower, mineral bath, and sauna. The spa incurs a setup cost for each of those services, so that Jennifer would like to estimate the expected overall setup cost for a customer going through the spa. The problem is that each customer varies in their selection of services. For instance, a customer may go for a facial and sauna while another customer may only go for a massage. Jennifer has collected data on the customer movement between spa activities, as summarized in the following table: Relaxation Lounge Facial Massage Power Shower Mineral Bath Sauna Facial 75 Massage Power Shower Mineral Bath 50 25 20 90 Saunal 60 50 Leave Spa 40 20 20 60 80 Total 150 100 110 70 80 80 For example, of 100 customers who did a facial, 60 went to the sauna next and 40 left the spa. Customers always enter the spa and stay first at the relaxation lounge before going to any other activity. Notice that starting at the lounge, the longest sequence of steps before leaving the spa is four: lounge -> mineral bath -> massage -> power shower -> sauna. Also notice that customers always leave after the sauna. To help Jennifer, perform the following tasks: 1. Model this problem as a Markov chain by explicitly providing a one-step transition matrix P. In your model, a state represents the current location of customer going through the spa. Hence, your model must have seven states: lounge, facial, massage, power shower, mineral bath, sauna, and leave spa, and matrix P should have dimensions 7 x 7. A step represents a customer moving from one activity to another activity. 2. Write an R function called "spa.cost" that has one parameter named "setup.cost". The "setup.cost" parameter is a vector of dimension 5 containing the setup costs for each of the five treatments (facial, massage, power shower, mineral bath, and sauna), there is no cost for the lounge or for leaving the spa. The function will compute the expected setup cost per customer of going through the spa when starting from the lounge (Hint. Compute the one-step expected setup cost, the two-step expected setup cost, the three-step expected setup cost, and the four-step expected setup cost, then return the sum of the four numbers). 3. Prepare a Shiny app with five sliders, one for each treatment, to input the setup costs of the treatments. Each slider will range from 0 to 100 in increments of 1, default value is 10. The app should call the "spa.cost" function with the corresponding setup costs for the treatments and display the resulting expected setup cost on an output text box. 4. Report your transition matrix P and copy-paste the R code on your Word file. Jennifer's Spa offers various health treatments such as facial, massage, power shower, mineral bath, and sauna. The spa incurs a setup cost for each of those services, so that Jennifer would like to estimate the expected overall setup cost for a customer going through the spa. The problem is that each customer varies in their selection of services. For instance, a customer may go for a facial and sauna while another customer may only go for a massage. Jennifer has collected data on the customer movement between spa activities, as summarized in the following table: Relaxation Lounge Facial Massage Power Shower Mineral Bath Sauna Facial 75 Massage Power Shower Mineral Bath 50 25 20 90 Saunal 60 50 Leave Spa 40 20 20 60 80 Total 150 100 110 70 80 80 For example, of 100 customers who did a facial, 60 went to the sauna next and 40 left the spa. Customers always enter the spa and stay first at the relaxation lounge before going to any other activity. Notice that starting at the lounge, the longest sequence of steps before leaving the spa is four: lounge -> mineral bath -> massage -> power shower -> sauna. Also notice that customers always leave after the sauna. To help Jennifer, perform the following tasks: 1. Model this problem as a Markov chain by explicitly providing a one-step transition matrix P. In your model, a state represents the current location of customer going through the spa. Hence, your model must have seven states: lounge, facial, massage, power shower, mineral bath, sauna, and leave spa, and matrix P should have dimensions 7 x 7. A step represents a customer moving from one activity to another activity. 2. Write an R function called "spa.cost" that has one parameter named "setup.cost". The "setup.cost" parameter is a vector of dimension 5 containing the setup costs for each of the five treatments (facial, massage, power shower, mineral bath, and sauna), there is no cost for the lounge or for leaving the spa. The function will compute the expected setup cost per customer of going through the spa when starting from the lounge (Hint. Compute the one-step expected setup cost, the two-step expected setup cost, the three-step expected setup cost, and the four-step expected setup cost, then return the sum of the four numbers). 3. Prepare a Shiny app with five sliders, one for each treatment, to input the setup costs of the treatments. Each slider will range from 0 to 100 in increments of 1, default value is 10. The app should call the "spa.cost" function with the corresponding setup costs for the treatments and display the resulting expected setup cost on an output text box. 4. Report your transition matrix P and copy-paste the R code on your Word file.
Expert Answer:
Related Book For
Taxation Of Individuals And Business Entities 2015
ISBN: 9780077862367
6th Edition
Authors: Brian Spilker, Benjamin Ayers, John Robinson, Edmund Outslay, Ronald Worsham, John Barrick, Connie Weaver
Posted Date:
Students also viewed these programming questions
-
Weatherford International The oilfield services industry includes thousands of companies large and small that provide drilling, seismic testing, transportation, and a wide range of other services to...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Research diversity expert Martin Davidson, author of The End of Diversity as We Know It: Why Diversity Efforts Fail and How Leveraging Difference Can Succeed. What is his direction for how you adopt...
-
Prepare the statement of retained earnings of Centerpiece Arrangements for the year ended December 31, 2018. Centerpiece Arrangements has just completed operations for the year ended December 31,...
-
How can you quickly determine the focal length of a converging lens? Will the same method work for a diverging lens?
-
Suppose there are \(n\) stocks. Each of them has a price that is governed by geometric Brownian motion. Each has \(v_{i}=15 \%\) and \(\sigma_{i}=40 \%\). However, these stocks are correlated, and...
-
Obtain the most recent annual report of a publicly traded company, and use the procedure outlined in Section 6.10.3 to estimate the value per common share of the company. Compare this value with the...
-
At the end of 2 0 2 1 , 2 0 2 1 , Samer earned an annual salary of $ 4 0 , 5 0 0 . 4 0 , 5 0 0 . He received the following increases in 2 0 2 2 2 0 2 2 and 2 0 2 3 2 0 2 3 : 2 0 2 2 4 % 2 0 2 2 4 % ...
-
The numbers of cobs produced by 360 maize plants are shown in the following table. a. Calculate the mean and the standard deviation. b. Find the interquartile range and give an example of what it...
-
On 5th August, 2021, SPC Fruits became the first company in Australia to require all onsite visitors to be vaccinated. Using a utilitarian framework, critically assess whether SPCs decision to...
-
Which statement is true about perfect price discrimination? a) It is very common. b) It is illegal. c) The larger the market, the more likely one is to find it. d) None of the above .
-
If the dollar depreciates relative to the Japanese yen, will the Sony DVD player you wanted become more or less expensive? What effect will this have on the number of Sony DVD players that Americans...
-
We became a debtor nation in ________. a) 1975 c) 1985 b) 1980 d) 1990
-
Perfect price discrimination eliminates __________ of the customers consumer surplus. a) all b) most c) some d) none
-
Algeria has a negative trade balance of $7 billion. If it has a positive balance of goods of $10 billion, how much is its balance of services?
-
Chromalox Instruments and Controls, located in LaVergne, Tennessee, is a manufacturer of industrial process controllers, monitors, and industrial and military control panels. Chromalox products are...
-
Determine whether the lines are parallel, perpendicular, or neither. 2x + 3y = -12, 2y - 3x = 8
-
Once they've computed their taxable income, how do taxpayers determine their regular tax liability? What additional steps must taxpayers take to compute their tax liability when they have...
-
On January 1, year 1, Jessica received 10,000 shares of restricted stock from her employer, Rocket Corporation. On that date, the stock price was $10 per share. On receiving the restricted stock,...
-
Tomiko is a 50 percent owner (partner) in the Tanaka partnership. During the year, the partnership reported $1,000 of interest income and $2,000 of dividends. How much of this income must Tomiko...
-
Make an energy diagram for gas B in Figure 20.4. Figure 20.4 When gases of different temperatures are placed in thermal contact, energy is transferred thermally from the hotter to the cooler gas...
-
Suppose you were to play the two film clips shown in Figure 20.7 backward. Would the resulting processes be possible? Figure 20.7 Quasistatic versus non-quasistatic expansion of a cylin- der...
-
(a) What are the SI units of \(Q\) ? (b) For the process depicted in Figure 20.2a, make an energy diagram for each of these systems: (i) water, pot, and flame; (ii) pot and flame; (iii) pot. Figure...
Study smarter with the SolutionInn App