<s>[INST] How to measure the streakedness of numerical data? Would anyone know how to use C/C++ to calculate the streakedness of data? The definition of streakedness is how many deviations away from the mean(i.e running average a numerical data streak. Thank you for your help.
[EDIT] From our company's chief software architect, here is the requirement for a statistical measure. Could someone please define a statistical formula based onour architect's definition of data streakedness? -- February 19th 2013 8:45 AM
Equal numbers are a streak. $1,2,3,3,3,4,5$ has a streak of $7$.
Case A: $1,2,3,4,5,6,7,8,9,10,11,12,13$ has a longest streak of $13$.
Case B: $1,2,3,4,5,6,7,3,8,9,10,11,12$ has a longest streak of $7$, a second smaller streak of $6$.
Case C: $1,2,3,4,5,6,7,1,2,3,4,5,6$ has a longest streak of $7$, and a second smaller streak of $6$.
Case D: $1,2,3,4,5,6,7,1,2,3,1,2,1$ has a longest streak of $7$, a second smaller streak of $3$, and a third smallest streak of $2$
Case E: $1,2,3,4,5,6,7,6,5,4,1,2,3$ has a longest streak of $7$, and a second smaller streak of $3$.
Case F: $1,2,3,4,5,6,7,6,5,4,3,2,1$ has a longest streak of $7$, and no smaller streaks.
The cases A – F are ordered in ‘most sorted to least sorted’, but all have the same length longest streak. Using the averages of streak length is not appropriate: [/INST] $\text{Average} = 13/1 = 13$
B: $\text{Average} = (7+6)/2 = 6.5$
C: $\text{Average} = (7+6)/2 = 6.5$
D: $\text{Average} = (7+3+2)/3 = 4$
E: $\text{Average} = (7+3)/2 = 5$
F: $\text{Average} = 7/1 = 7$
Factoring in non-streaks (counting them as 1’s):</s>