The News-Vendor Problem: Discrete Demand Case  

Last Sunday, I came across very interesting articles and applications of the News-vendor problem and decided to write R code to automate various cases of the same. Here is a start.

In the simplest category of the News-vendor problem, such as the one outlined in this article by Prof. Evan L. Porteus, the demand is assumed to be discrete. The professor explains how the optimal amount to be ordered is the one that yields the highest expected return, which can be calculated by marginal analysis.

Here is a snippet function written in R, that automates marginal analysis for the discrete demand case of the News-vendor problem:

Code1.png

Here is how Tyler’s data looks like:

data2.png

Let’s run this function for Tyler’s case and see what the output looks like.

output2.png

The optimal solution from the DiscreteNewsVendorA function gives the solution as expected!

Sanket

 
22
Kudos
 
22
Kudos

Now read this

Iris Data-set : Discriminant Analysis bit by bit using R

Linear Discriminant Analysis is a useful dimensionality reduction technique with varied applications in pattern classification and machine learning. In this post, I will try to do an R replica of the Python implementation by Sebastian... Continue →