I'm looking to measure the degree to which values in a column or list are ordered or pseudo-randomly aligned. In essence I'm trying to distinguish the following scenarios.

Say we have a "sex" column filled with 50 "M" and 50 "F" values.

Examples of "order":

  • If the data was sorted we would observe: F, F, F, .. M, M, M or vice versa.
  • Similarly, there can be predictable patterns like: F, M, F, M, F, M or F, F, M, M, F, F, M, M

Examples of randomness / randomly assigned positions to the values:

  • Any kind of white noise pattern.
  • 2
    $\begingroup$ Maybe the test statistic of the runs test Wiki could be a candidate. $\endgroup$ – Michael M Apr 17 at 9:12
  • $\begingroup$ Thank you for your suggestion. $\endgroup$ – Andreas Apr 17 at 9:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.