# Uncertain Demand Forecasting and Inventory Optimizing for Short-life-cycle Products

**Data Apple » R Blogs in English**, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)

Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

For short-life-cycle products such as newspapers and fashion, it is important to match the supply with the demand. However, sometimes we order too little from supplier and sometimes we order too much due to the uncertain demand. We would lose sales and customers would be unsatisfied if ordering too little or we would let the inventory left over at the end of the season if ordering too much. To reduce the mismatch between demand and supply, on the one hand, we need to improve the demand forecasting; on the other hand, we need to optimize the inventory management with an appropriate service level.

In this article, a fashion company ABC, is preparing for the inventory of a new design product, Cool-7, for the upcoming season. We will use the approach of expert judgment in conjunction with the A/F ratio for demand forecasting, and use the Newsvendor model for optimizing the inventory management. R language is used for the statistical computing where needed.

**Demand Forecasting**

Since Cool-7 is a new product, there is no direct historical data for reference. ABC Company formed a committee, which consists of experts from Marketing, Sales, and Channels etc, to forecast the demand for Cool-7 in the coming summer season.

The initial demand forecasted by the committee is 3500. Is the number reliable?

We need to further consider the committee’s bias (optimistic, pessimistic, etc) and estimation error by the forecast and actual demands of other types of products in the past. Click here to download the fabricated forecast and actual demand data, and then explore the data.

> #read the dataset from .csv file

> df <- read.csv(file.choose(),header=T)

>

> #list each data column name and the first six lines of the dataset

> head(df)

Product Forecast Actual.Demand A.F.Ratio (A/F Ratio)

1 P1 1600 1261 0.79

2 P2 2200 2890 1.31

3 P3 3500 3172 0.91

4 P4 1200 895 0.75

5 P5 1800 2500 1.39

6 P6 3000 2330 0.78

Where, the A/F ratio = Actual Demand / Forecast.

># get the mean and standard deviation of A/F Ratio

> mean(df$A.F.Ratio)

[1] 1.0425

> sd(df$A.F.Ratio)

[1] 0.2646721

We will adjust the initial forecast according to the A/F ratio mean as follows.

Adjust forecast = initial forecast * A/F ratio mean

Adjust forecast = 3500 * 1.0425 = 3649, we can also call it the expected actual demand statistically.

The standard deviation of actual demand is, 3500 * 0.2647 = 926.

**Inventory Optimizing **

Fashion is a kind of short-life-cycle product and usually can only order once before the sales season. To avoid order too much or order too less, we can use Newsvendor model to calculate how many units ABC Company needs to order from the fashion producer, so that the inventory can be optimized considering both the overage cost and underage cost.

Assume the demand has a normal distribution, the retail price is $150 per unit, purchasing price is $100, and the discounted price of leftover products is $70. We can calculate the Overage cost (*C*_{o}) and the Underage cost (*C*_{u}) respectively:-

*C*_{o} = 100 – 70 = 30

*C*_{u} = 150 – 100 = 50

According to Newsvendor model, the optimal service level for Cool – 7 is,

*C*_{u} / (*C*_{u} + *C*_{o} ) = 50 / 80 = 0.625

Given the demand has a mean of 3649 and a standard deviation of 926, what is the order quantity Q* that achieves the optimal service level of 0.625? ^{1}

Q* = mean demand+ Z * demand standard deviation,

Where,

Mean demand = 3649;

Demand standard deviation = 926;

Z is the inverse of the standard normal cumulative distribution of the service level.

# get ‘z’

> qnorm(0.625)

[1] 0.3186394

So, Q* = 3649 + 926 * 0.31864 = 3944. ABC Company should order 3944 units from the producer.

**References:**

- HKUST Prof. Albert Ha’s lecture slides of the Operation Management course;
- http://en.wikipedia.org/wiki/Newsvendor_model
- www.utdallas.edu/~metin/Or6302/Folios/omnewsvendor.ppt

Author: Jack Han. All rights reserved. 转载须以超链接形式标明文章原始出处和作者信息

9,272 total views, 32 views today

**leave a comment**for the author, please follow the link and comment on their blog:

**Data Apple » R Blogs in English**.

R-bloggers.com offers

**daily e-mail updates**about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.

Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.