How to estimating purchase amount to achieve servicelevel

  • Context: Undergrad 
  • Thread starter Thread starter einar.naess
  • Start date Start date
Click For Summary
SUMMARY

This discussion focuses on estimating the purchase amount required to maintain stock levels for at least 40 sales days with a 98% confidence level. The analysis is based on historical sales data, specifically the average and variance of items sold per valid sales day over a 10-week period. The algorithm involves calculating the average (Sav) and standard deviation (Sstdev) of the total sales over the desired period, utilizing the normal distribution to determine the necessary purchase quantity (X) using the formula X = Sav + 2 * Sstdev. Excel functions such as "Normdist" and "Norminv" are recommended for calculating probabilities.

PREREQUISITES
  • Understanding of statistical concepts such as average, variance, and standard deviation.
  • Familiarity with the normal distribution and its properties.
  • Basic knowledge of SQL for implementing the algorithm.
  • Proficiency in Excel, specifically with functions like "Normdist" and "Norminv".
NEXT STEPS
  • Research how to implement statistical calculations in SQL for stock analysis.
  • Learn about the normal distribution and how to use statistical tables for probability calculations.
  • Explore advanced Excel techniques for statistical analysis, focusing on the "Normdist" and "Norminv" functions.
  • Study algorithms for inventory management and stock level optimization.
USEFUL FOR

Data analysts, inventory managers, and anyone involved in stock management and purchasing decisions who seeks to optimize inventory levels based on sales data.

einar.naess
Messages
2
Reaction score
0
I'm writing some code to do stockitem analysis and provide estimates to purchaser. My source data is actual sold items per valid salesday grouped by week. Let's say week 1-10 have the following sales numbers per valid sales day: 10,11,15,13,7,6,19,8,12,13 (actual numbers are decimal). *) Out of this its easy to calculate average, variance and standard deviation. For now, let's say that stock level today is 100 items. My purchase will arrive in 3 salesdays from today. How many items do I have to purchase to be 98% sure that my stock will last at least 40 salesdays from now?

The solution is going to be written in SQL. I don't need the SQL code, but the algorithm for the calculation would do.

*)
Usually every week has 5 salesdays, but a few weeks every year has less. Due to transportation reasons special days every week peeks on sales. This would cause unneccessary variaton, so therefore i make this "average" per week.

Best regards
Einar Naess
 
Physics news on Phys.org
The number of items sold over 40 days is a random variable (the S variable).
This random variable is the sum of 40 random variables (the v variables).
You have data allowing you to evaluate the average and variance for the v variables.
From this you can calculate the average and variance for the S variable,
as well as its standard deviation.

You can assume that S is a gaussian variable, see textbooks for explanations.
Using a statistical table you can decide to buy X item for the 40 days in order to avoid a shortage with a probability level of at least 98% (use cumulated probabilties for the normal distribution). If you have Excel you can read about the "Normdist" function or the "Norminv" function to get the number you need.

If Sav is the average of S and Sstdev is the standard deviation of S, then you need to buy at least X = Sav + 2 Sstdev item (approximatively). For the decimal, check the tables or excel.

I hope I understood your question exactly, but I hope that it gives you at least a good direction.
 
Last edited:
Thanks for your answer. Still have not solved my problem.

The percentage is a parameter, just like days. It can be any decent percentage, usually between 50% and just below 100%. I need to write the algorithm where percentage, days, average, variance and stddev are parameters (if they are all needed).

Tried help in Excel but found no good answer to what I'm looking for.

Best regards
Einar Naess
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
6
Views
1K
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 9 ·
Replies
9
Views
2K
Replies
1
Views
2K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 1 ·
Replies
1
Views
11K
Replies
4
Views
2K