Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please use R to show the whole process of calculation A coffee cart opens at 7 : 0 0 a . m . , and

please use R to show the whole process of calculation
A coffee cart opens at 7:00 a.m., and they generally try to prepare a batch large enough to accommodate their customers until 10:00 a.m., when the cart closes. The operator only sells 16 oz. servings and each serving costs \$0.50 to prepare, which includes all costs of production, and any dairy/sweetener customers may add. Any coffee that isnt sold before 10:00 a.m. is considered stale and disposed of for no monetary gain. When purchased, the coffee is poured into a ripple cup, which costs an additional \$0.15 per cup. Demand over this period is normally distributed with a mean of 125 and a standard deviation of 35. Each cup retails for \$2.75. The cart operator must also purchase a municipal license, which costs a flat $100 for the three hours. Assume there are no other costs associated with the cart. Develop a R model with 100,000 trials that simulates the daily profit resulting from the preparation of 75,100,120,140,160, and 180 servings of coffee a day.*
1. Write a function that takes as an argument the number of prepared servings in a day and returns a data frame where each row represents a different trial. The returned data frame should include randomly generated numbers for demand. Use these numbers and the information from the problem to calculate the carts total revenue, cost, and profit for each trial as columns in the data frame.*
2. Use the function from part a to determine the carts expected profit if the operator prepares 75,100,120,140,160, and 180 servings. Which option results in the highest expected profit?*
3. Create a histogram that displays the risk profile of profit for the number of servings with the highest expected profit.*please use R to show the whole process of calculation
A coffee cart opens at 7:00 a.m., and they generally try to prepare a batch large enough to accommodate their customers until 10:00 a.m., when the cart closes. The operator only sells 16 oz. servings and each serving costs \$0.50 to prepare, which includes all costs of production, and any dairy/sweetener customers may add. Any coffee that isnt sold before 10:00 a.m. is considered stale and disposed of for no monetary gain. When purchased, the coffee is poured into a ripple cup, which costs an additional \$0.15 per cup. Demand over this period is normally distributed with a mean of 125 and a standard deviation of 35. Each cup retails for \$2.75. The cart operator must also purchase a municipal license, which costs a flat $100 for the three hours. Assume there are no other costs associated with the cart. Develop a R model with 100,000 trials that simulates the daily profit resulting from the preparation of 75,100,120,140,160, and 180 servings of coffee a day.*
1. Write a function that takes as an argument the number of prepared servings in a day and returns a data frame where each row represents a different trial. The returned data frame should include randomly generated numbers for demand. Use these numbers and the information from the problem to calculate the carts total revenue, cost, and profit for each trial as columns in the data frame.*
2. Use the function from part a to determine the carts expected profit if the operator prepares 75,100,120,140,160, and 180 servings. Which option results in the highest expected profit?*
3. Create a histogram that displays the risk profile of profit for the number of servings with the highest expected profit.*

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

Database Concepts

Authors: David Kroenke, David Auer, Scott Vandenberg, Robert Yoder

9th Edition

0135188148, 978-0135188149, 9781642087611

More Books

Students also viewed these Databases questions

Question

3. Keep a list of suggestions.

Answered: 1 week ago