system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How does the "shuffle" feature on my iPod work?

Sometimes I get chunks of songs from the same artists or same albums too.  Does this have something to do with how the shuffle works?
gpt
If it's actually shuffle, it should just be random. However, just because it's random doesn't mean you won't get chunks of songs from the same artists/albums. Actually it means the opposite.

I won't go into the math behind this, but statisticians sometimes do what's called a runs test to figure out if a set of data is random or not. Take for example a situation where someone claims to have flipped a coin 100 times, and wrote down the results. If he didn't flip the same side twice in a row anywhere in those 100 times, it's likely he's lying and just wrote down the numbers systematically, without flipping any coin. It's just as likely as if he had written down 50 heads in a row, then 50 tails.

The same holds true for the shuffle feature on an iPod. Getting the same artist several times in a row every so often is actually evidence that it *is* truly random.

Now, one more point, something called confirmation bias. It might seem like you get the same artist a lot more often than you should, but this is because that's what's called an event, while when it works properly it's a non-event, because that's just normal operation. The human brain is wired to recognize and distinctly remember events, while non-events aren't even noticed, let alone remembered. For this reason, even if the runs only happen a few times a week, you might say it happens "constantly" or "all the time", even though it obviously doesn't.