2
$\begingroup$

I have some legacy code that is doing some stats that I can't figure out. It's taking the maximum value of a data set, and subtracting the average of the data set. I've tried looking into what this is doing (i.e. is it measuring some deviation?) but haven't been able to come up with an answer. Anyone know what this formula is actually measuring?

Thanks.

$\endgroup$
11
  • 7
    $\begingroup$ You can supply precisely no context? You should try asking upstream of those who provided the code. Otherwise replies are likely to be disappointing: maximum - average is just that. It doesn't seem to arise often for intrinsically statistical reasons. It could be one of several ways of measuring how good (or how bad) a maximum is in relative terms. (If no one knows why this is being used, what is the point of calculating it?) $\endgroup$
    – Nick Cox
    Commented Oct 6, 2014 at 17:44
  • $\begingroup$ What other information would be useful? The individuals who worked on the code no longer work at my company, so there isn't anyone to ask. That's why I'm trying to evaluate if this calculation means anything. $\endgroup$
    – mlam13
    Commented Oct 6, 2014 at 17:57
  • 1
    $\begingroup$ Maximum minus average is too general to be tied to a specific statistical procedure. So you have to think about the data on which it is applied. What the average means here? Does it have any meaningful business interpretation? The maximum? Does the distance between them may mean something business wise? Is this distance used somehow down the road on this legacy code? $\endgroup$ Commented Oct 6, 2014 at 18:02
  • 4
    $\begingroup$ What kind of data is it applied to? Sales, viscosity of rubber, weight of rats, file downloads.... We don't know what field you are in unless you tell us. Your workplace situation is beyond the scope of this forum but my last question stands.... $\endgroup$
    – Nick Cox
    Commented Oct 6, 2014 at 18:02
  • 1
    $\begingroup$ Purpose is key. A metric like that exists in JEDEC for determining whether a solderballs coplanarity is an outlier. The three sub-members of the (infinite) family of coplanarity outlier measures are LMS (maximum tail-to-mean distance) and Global (range). Though they look alike they are fundamentally different creatures and will have sensitivity onset at different coplanarity outlier values. $\endgroup$ Commented Oct 6, 2014 at 19:36

2 Answers 2

1
$\begingroup$

This is a heuristic for approximating skewness of the long-tail in non-negative valued distributions.

You'll find it relevant for latency, time-to-resolve, and any log-normal distributions. With only non-negative values, and an assumed minimum of zero, the observed maximum is also the range of the sample set.

  • If the average is closer to zero than to the maximum it indicates positive skew with a longer (fatter) tail on the right of the distribution.

  • If the average is closer to the maximum it indicates negative skew with the long tail on the left of the distribution.

Of course it might also be that the developer that printed that legacy code just needed a thumb rule metric to guess if the wheels are falling off the bus, and this was good enough. :)

Long tail metrics are generally interested in the long right tail. The bigger the difference between maximum and average, the longer the right tail. Bigger values are worse.

$\endgroup$
0
$\begingroup$

This wouldn't be in a Supply Chain context, by chance? Because the classic Safety Stock formula is (maximum daily sales x maximum lead time) – (average daily sales x average lead time).

$\endgroup$

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