1
$\begingroup$

I have detailed sales data including customer number, SKU, product line, and order date. For marketing purposes, I would like to know the average days between orders both on a per-customer, per product-line basis, as well as on per product-line basis across our entire customer base.

The application is to send promotional materials for target product lines (or SKUs, or some other product attribute) ahead of the customer's expected order date.

My initial intuition was to take the difference in days between each order (per customer, per product line), sum them together, and divide by the total number of orders - 1 (i. e., the number of differences). I also wanted to get an idea of the spread of the data by calculating the standard deviation, and that's where I hit a block.

Since this is frequency data, it's non-normal, and to the best of my understanding, it falls under an exponential distribution. I've read some resources online, but in those cases, the mean $\mu$ is always given or calculated from a given $\lambda$, not calculated from a data set.

Is my approach of simply calculating the arithmetic mean sound? And if so, is that result also my standard deviation?

Any help would be much appreciated.

$\endgroup$

1 Answer 1

0
$\begingroup$

Calculating the mean is sound in this sense: it tells you the mean.

Comparing it with the standard deviation is a quick probe of whether you have an exponential distribution (my purchases of film views on Netflix are probably exponential, but my purchases of toilet paper are not).

Another sensible check is to plot the histogram, with a log scale for the counts: does it look like a straight line? If not, are the errors for quick reorders or slow reorders?

Using an exponential distribution is likely to be an approximation. Maybe it is a good enough approximation for your business purposes.

$\endgroup$
3
  • $\begingroup$ I appreciate the insight on this, and I realize I've been thinking about this wrong. I was under the impression that calculating the mean and standard deviation wasn't going to work since the data appears to be non-normal. Is it fair to say that these calculations over a data set are always valid, and (in addition to plotting) can help establish the distribution / an approximation of the distribution? For example, if this is approximated by an exponential distribution, I should expect the calculated $\sigma$ to be approximately the calculated $\mu$, right? $\endgroup$
    – cisenb
    Commented Aug 20, 2021 at 13:37
  • $\begingroup$ Yes, any distribution has a standard deviation. (Well, to be pedantic, there are some weird distributions where the S.D. is infinite, and if you have one of them then your business is high risk.) $\endgroup$ Commented Aug 31, 2021 at 9:20
  • $\begingroup$ Yes, if "calculated σ to be approximately the calculated μ" is false, then it is not an exponential distribution. The converse does not apply. The general test for "is this sample derived from this distribution" is the Kolmogorov-Smirnov test. The easy eyeball test is to compare a histogram with the PDF of a fitted distribution ... and in this case I suggest plotting the y axis as logs, since this turns an exponential distribution into a straight line. $\endgroup$ Commented Aug 31, 2021 at 9:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.