Distribution sales

65 Views Asked by At

I have some data about the sales of a product and I want to determine what kind of distribution they have in order to use that in a stock simulation process.Knowing the kind of distribution the sales have, for example Poisson, I will use it as a demand distribution and will be able to generate random numbers using that distributin and see at the end what the manager must choose for the stock to be enough, but not too much. My data looks like this: Day 1-30 Day 2-28 Day 3-27 Day 4-33 Day 5-26 Day 6-29 Day 7-27 Day 8-32 Day 9-33 Day 10-34

Does anone know how could I do this?

1

There are 1 best solutions below

0
On

You don't seem to have enough data to discern how to model your daily sales. In particular, even though speculation based on only ten observations is very risky, I would guess that your daily sales are not Poisson.

One characteristic of a Poisson distribution is that the mean and variance are numerically equal. Consequently, samples from a Poisson distribution often have $\bar X \approx S^2,$ but for your data the sample mean is about 30 and the sample variance is about 8.5.$

x = c(30, 28, 27, 33, 26, 29, 27, 32, 33, 34)
mean(x);  var(x)
## 29.9
## 8.544444

All ten observations lie within the interval $[26,34].$ Perhaps for the short term, the manager can plan on inventory for about 30-34 sales, to meet demand most days without overshooting by a huge amount. If sales are subject to fluctuations (maybe depending on advertising or season), your short-term strategy might be to plan for the maximum daily sales during the last two weeks but never less than the average daily sales for the last month. [Exact details of the best strategy would depend on balancing the cost of having to many items in stock against the cost of having too few.]

As you accumulate more data, you may be able to find a more useful model.

As a direct answer to your proposal to model sales by a Poisson distribution, if that proves to be reasonable over the long term: A value from an exact Poisson computation might be more useful than using simulation. For example, if sales were Poisson with mean 30, then an inventory of 37 items would be enough 90% of the time:

qpois(.9, 30)    # Poisson quantile function, enough 90% of days
## 37
1- ppois(37, 30) # Check: probability 37 not enough, 8.9%
## 0.08901299

[Computations from R statistical software, where ppois is a Poisson cumulative distribution function (CDF) and qpois is it's inverse. Because the distribution is discrete, taking only integer values, quantiles are 'rounded up' to ensure at least the probability requested.]