Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

answer all the parts for question 1 in MATLAB. please write the matlab code for this problem In this homework, you will be submitting both

image text in transcribed

image text in transcribed

answer all the parts for question 1 in MATLAB. please write the matlab code for this problem

In this homework, you will be submitting both a single .m script and a single published PDF. You should write all of your answers in a single .m script, and then submit your m file as well as a published PDF. This means you will submit two (2) files for homework 8. Each new problem, should be a new section in your script. Your code should contain sufficient comments to explain what your code is doing. 8 outlet orders pounds ordered pounds of tomatoes each day from the arm. The grocery outlet owner buys the tomatoes from a farm for $220/pound and sells it to customers for $4.10/pound. This grocery outlet is famous for its fresh vegetables, so at the end of the day, the owner gets rid of any tomatoes that were not sold and sells them to a Tomato paste factory. If what is left is less than 30 pounds, the factory buys them at $ 1.80 /pound and if it's more than or equal to 30 pounds, the factory takes them only for $1/pound (i.e. in both cases the owner loses money for each left tomatoes pounds). The demand of tomatoes is given by Demand pounds per day, where Demand has a Gaussian distribution with mean 225 pounds and a standard deviation of 12 pounds. In this problem you are required to calculate how many pounds of tomatoes (pounds ordered) the outlet owner should buy from the farm to maximize its expected daily net profit. a) Write down an expression for the daily net profit, P. as a function of pounds ordered and Demand. b) To find the pounds ordered that maximizes the expected daily return, you have to try different values of pounds ordered in an appropriate range and with an appropriate step. For each value of pounds ordered, generate 1000 realizations of the random number Demand. For each realization, calculate the net profit using the expression you wrote in part a). Estimate the expected (average) net profit for each value of pounds ordered c) Write to the screen the optimal value of pounds ordered that maximized the expected net profit from your parts a) and b). Plot the expected profit versus each value of pounds ordered with a line color of blue ) Using linear interpolation, approximate the data of expected profits ves 9:03 AM

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

Graph Databases

Authors: Ian Robinson, Jim Webber, Emil Eifrem

1st Edition

1449356265, 978-1449356262

More Books

Students also viewed these Databases questions

Question

How do Dimensional Database Models differ from Relational Models?

Answered: 1 week ago

Question

What type of processing do Relational Databases support?

Answered: 1 week ago

Question

Describe several aggregation operators.

Answered: 1 week ago