**The Question**

**A**'s,

**B**'s,

**C**'s, and

**D**'s.

**ABA**,

**CDDAB**,

**DACBDBADDBD**are examples. These strings might be generated by rolling a 4-sided die, or they might be the answers to a multiple-choice test. If I were to roll

**ABCDABCD**, I would be very surprised. Likewise if the test answers were

**CCCCCCCC**, I would be similarly puzzled. Can I measure the unusual-ness of these two strings? What random strings are the most random?

From one point of view, this seems a silly question. There are exactly $4^n$ possible strings of length $n$. Each string occurs equally infrequently: 1 in $4^n$ times. However, if I look at another level, I would expect to have about equal distribution of each letter. For this reason, I will use the word "structuredness" instead of the word "random" when referring to the property I am investigating.

**ABCDABCDABCD**. Our approach attempts to take into account the structure of $S$ at all levels. Fix an alphabet ("A" to "Z") of size $a$ and let $S$ be a string of length $n$ and $k\le n$ an integer. By a substring of $S$ we mean letters that occur, in succession, within the string $S$. For each $1\le k\le n$, we define $d_k$ as follows in an attempt to measure how structured the length-$k$ substrings of $S$ are.

Let $\sigma$ represent any of the $a^k$ strings of length $k$. Let $\sigma(S)$ equal the number of times $\sigma$ occurs as a substring of $S$. Define $d_k = d_k (S)$ as $$d_k=\sum_{\sigma = \textbf{AA}\cdots\textbf{A}}^{\textbf{DD}\cdots\textbf{D}} \sigma(S)^2,$$

where the sum is over all strings of length $k$. To incorporate the a measure of $S$'s structuredness at every level, we define $$d=\sum_{k=1}^{n} d_k.$$

**ABCDABCD**and $T=$

**ADBBCADC**, each of length eight. Note that in each string all letters occur with equal frequency.

$d_1(S)=2^2+2^2+2^2+2^2=16$ $d_2(S)=2^2+2^2+2^2+1^2=13$ $d_3(S)=2^2+2^2+1^2+1^2=10$ $d_4(S)=2^2+1^2+1^2+1^2=7$ $d_5(S)=1^2+1^2+1^2+1^2=4$ $d_6(S)=1^2+1^2+1^2=3$ $d_7(S)=1^2+1^2=2$ $d_8(S)=1^2=1$ | $d_1(T)=2^2+2^2+2^2+2^2=16$ $d_2(T)=2^2+1^2+1^2+1^2+1^2+1^2=9$ $d_3(T)=1^2+1^2+1^2+1^2+1^2+1^2=6$ $d_4(T)=1^2+1^2+1^2+1^2+1^2=5$ $d_5(T)=1^2+1^2+1^2+1^2=4$ $d_6(T)=1^2+1^2+1^2=3$ $d_7(T)=1^2+1^2=2$ $d_8(T)=1^2=1$ |

Note that this definition of $d$ makes no reference to the alphabet from which the letters are selected. The same calculations would apply if our alphabet contained one hundred letters. This flexibility greatly aids in calculation.

**Putting**

*d*to Use*relative*

*structuredness*(r.s.) $x=x(S)$ of $S$ as the percentage of other strings with lower $d$-values plus half the percentage of strings with equal $d$-values. Notice that $0\le x\le 1$. Relative structuredness gives a measure of how a string stacks up against same-length strings according to the $d$-value calculation. 0 being most unstructured, 1 being a string of all 1's, and 0.5 being what you would expect a random collection of strings to have. The most even collection - exactly one copy of each distinct string - will have relative structuredness of 0.5.

I selected only win-loss records that had an even number of wins & losses, since I wanted to compare them more easily with the home-away records which have an even number of home and away games. Likewise for the binary strings.

**Hypothesis**

- I expect the win-loss records to be close to a 0.5 relative structuredness.
- I expect the home-away schedule to have a high relative structuredness, since I expect that teams will not have more than three home games or three away games in a row..
- If they are truly random, I expect the random strings to have relative structuredness even closer to 0.5 than the win loss records have.

**What We Found**

The win-loss records has relative structuredness = 0.406

The home-away schedule has relative structuredness = 0.718

The random strings have relative structuredness = 0.244

The win-loss and home-away relative structuredness agree with my hypothesis, but I was surprised .to see the low score from the random strings.

**Data**

**Miami Dolphins 2014**

WLLWLWWWLWLWLLWL

d - value: 334

r.s.: 0.500

**SF 49ers 2014**

WLLWWWLLWWWLLLLW

d - value: 342

r.s.: 0.598

**NY Jets 2013**

WLWLWLWLWLLLWLWW

d - value: 400

r.s.: 0.906

**Dallas Cowboys 2013**

WLWLLWWLWLWWLLWL

d - value: 328

r.s.: 0.400

**Pittsburgh Steelers 2012**

LWLWLWWWWLLWLLLW

d - value: 308

r.s.: 0.042

**NY Jets 2011**

WWLLLWWWLLWWWLLL

d - value: 344

r.s.: 0.619

**Chicago Bears 2011**

WLLWLWWWWWLLLLLW

d - value: 312

r.s.: 0.111

**Jacksonville Jaguars 2010**

WLLWWLLWWWLWWLLL

d - value: 322

r.s.: 0.285

**Tennessee Titans 2009**

LLLLLLWWWWWLWWLW

d - value: 332

r.s.: 0.467

**Carolina Panthers 2009**

LLLWWLWLWLLWLWWW

d - value: 312

r.s.: 0.111

Average r.s.: 0.406

**Miami Dolphins 2014**

HAHAHAAHAHAAHAHH

d - value: 394

r.s.: 0.893

**SF 49ers 2014**

AHAHHAAHAAHHAAHH

d - value: 334

r.s.: 0.500

**NY Jets 2013**

HAHAAHHAHAAHHAHA

d - value: 380

r.s.: 0.845

**Dallas Cowboys 2013**

HAHAHHAAHAAHAHAH

d - value: 354

r.s.: 0.716

**Pittsburgh Steelers 2012**

AHAHAAHAHHAAHAHH

d - value: 350

r.s.: 0.683

**NY Jets 2011**

HHAAAHHAHAHAHAHA

d - value: 372

r.s.: 0.721

**Chicago Bears 2011**

HAHHAHAAHAHHAHAA

d - value: 356

r.s.: 0.732

**Jacksonville Jaguars 2010**

HAHHAHAAHHAAHAHA

d - value: 328

r.s.: 0.400

**Tennessee Titans 2009**

AHAAHAHAHAHAHHHA

d - value: 386

r.s.: 0.867

**Carolina Panthers 2009**

HAAHAHAAHHAHAHAH

d - value: 356

r.s.: 0.732

Average r.s.: 0.718

**String 1**

0101000011111001

d - value: 306

r.s.: 0.024

**String 2**

0100000101011111

d - value: 316

r.s.: 0.173

**String 3**

1101101100100010

d - value: 322

r.s.: 0.285

**String 4**

1000001101111100

d - value: 318

r.s.: 0.208

**String 5**

0111000111010001

d - value: 314

r.s.: 0.143

**String 6**

1011000111011000

d - value: 328

r.s.: 0.400

**String 7**

1111100101001000

d - value: 320

r.s.: 0.246

**String 8**

0101011000101110

d - value: 322

r.s.: 0.285

**String 9**

1111010000010101

d - value: 316

r.s.: 0.173

**String 10**

1001100110101001

d - value: 334

r.s.: 0.500

Average r.s.: 0.244