Most music players have a shuffle mode so that songs don’t get played in the listed order. There are two ways this can happen: either pick a music at random after one song ends or pick the next song in some predetermined order. How do we tell if shuffle mode is doing one or the other?
There is a known problem or paradox known as the birthday paradox. In its popular variant, it asks what is the value of n such that in a room of n randomly chosen people, the probability that some pair of persons share the same birthday is > 50%. The shock comes when the number is not 365/2 but a mere 23 people. As a general rule of thumb, the number is approximately 1.2 * sqrt(n) for the probability to be > 50%. So now we can apply this to our music library and consider this thought experiment. Suppose songs are randomly chosen after one ends, and your library has 1000 songs, it would only take on average 38 songs before there is a repetition.
Thus, one can perform the experiment several times to see if after 38 songs whether a repeat is heard and if it happens about half the time, we know that shuffle mode is truly random.