Problem
Let's say you have virtual cases in a video game, and each case has one of four distinct items inside. Let's say the items are:
- $A$ with general probability $0.4$
- $B$ with general probability $0.3$
- $C$ with general probability $0.2$
- $D$ with general probability $0.1$
However, there is rumor that these cases are programmed so that you are less likely to obtain duplicate items, as in, when opening a lot of cases, if you open $B$ in one case, for example, the probability of opening $B$ on the very next case is less than what it was originally, $0.3$
I was wondering how I would be able to test that rumor using a hypothesis test.
My guess / Attempt
Seeing as how $A$ is the most common item, I would use that one for my hypothesis test and test
$$H_0: P(A_k) = P(A_k | A_{k-1})$$
That is, the probability of opening $A$ on the $k^{th}$ case is the same as the probability of opening $A$ on the $k^{th}$ case given we just opened $A$ the case before
Is this a good / viable way to test what I want? And how would I proceed from here after gathering data? Would it be similar to testing for a population proportion?
Thanks for any help given
Some inspiration from the answer posted at Stat.Stackexchange
The Runs Test was suggested, and after doing some research I learned about the extension of the runs test to $k$ categories instead of being binary (we are not restricted to "+" and "-" )
The expected number of runs is :
$$\mu_r = \frac{n(n+1) - \sum{n_i^2}}{n}$$ For $i$ going from $1$ to $k$ and $n_i$ is the number of times category $i$ appears in the sequence.
The variance is $$\sigma_r^2 = \frac{\sum{n_i^2} \left( \sum{n_i^2}+ n(n+1) \right) -2n\sum{n_i^3} - n^3}{n^2(n-1)}$$
The source of this formula was found at NCSS Analysis Of Runs (pdf)