Question: code the following in any programming language: A supermarket plans to sell Halloween special pumpkin pie on Halloween Day. The supermarket buys the special pumpkin

code the following in any programming language:

code the following in any programming language: A supermarket plans to sell

A supermarket plans to sell Halloween special pumpkin pie on Halloween Day. The supermarket buys the special pumpkin pies from a local bakery factory for $4 each. And it plans to sell for $12 each on Halloween Day. The supermarket expects that the demand for the special pumpkin pie on Halloween Day will be normally distributed with a mean of 300 pies with a standard deviation of 30 pies. Any special pumpkin pies left unsold on Halloween Day will be sold at \$2 to a discounted grocery store. (a) (10 points) What is the optimal order quantity according to the newsvendor model? (Don't round your solution to an integer.) (b) ( 10 points) Let Q denote your solution from part (a). Simulate 10000 realizations of this scenario and report the supermarket's average profit if they order (i) Q* pies, (ii) Q*-25 pies, and (iii) Q+25 pies. Which of these order quantities gives the highest profit on average? (That is: use a programming language to generate 10000 samples from the distribution given above. For each of the samples, calculate the supermarket's profit (revenue minus order cost) if they ordered (i) Q* pies, (ii) Q25 pies, and (iii) Q+25 pies. Finally, calculate the average profit (across the 10000 realizations) associated with each of the three different order quantities.) (c) (10 points) Suppose that the supermarket is underestimating the demand, and that the real demand is normally distributed with a mean of 360 pies and a standard deviation of 30 pies. Let Q* denote your solution from part (a). With the new demand distribution, simulate 10000 realizations of the scenario and report the supermarket's average profit if they order (i) Q* gallons, (ii) Q*-25 pies, and (iii) Q*+25 pies. With this new demand distribution, which of these order quantities gives the highest profit on average? Is this what you expected, and why

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!