Explaining randomness to a Play Store reviewer
Articles,  Blog

Explaining randomness to a Play Store reviewer

Do you ever feel like you have really bad
luck? And that when a streak of bad luck continues,
maybe things aren’t as random as they seem? One reviewer on a game I made seemed to think
so, so let’s talk about that. Last year, I got really into solitaire games
and I wanted to create my own solitaire app that had all my favorite games, while being
completely ad-free. Half a year and a thousand downloads later,
and someone leaves an interesting review. He says some nice things about the game, but
makes a couple of statements about the randomness: I would like to improve the randomness of
the shuffling. It is frustratingly predictable in its ability
to not be random. In three consecutive deals on Spider (2 suits),
I got 4 black queens, then 3 red 9s, then 4 black 4s. While I understand the idea if bad luck, even
mine isn’t as skewed as my experiences here. I wanted to talk about this, not to defend
the honor of my game’s random number generator, but just because I thought it’s an interesting
demonstration of a misconception many people have about randomness. How I understand what he’s trying to say,
is that he was unlucky and got multiple copies of the same card in one deal. But then it continued two consecutive times,
and if things really were random, that would be too unlikely to happen. Ergo, the randomness is bad. This way of thinking is called the Gambler’s
Fallacy. Even though every deal is completely independant
of each other, the more bad deals you get, the more it feels like you’re overdue for
a good deal. Most people intuitively understand that the
probability of a coin landing heads up is about 50%. They also understand that if you do 1000 throws,
this will mean that each side comes up roughly 500 times. The mistake is believing that this therefore
means that those results of heads and tails will occur with an even distribution. People think this, because they understand
that getting heads has a chance of 50%, therefore getting heads two times in a row has a chance
of 25%. If that happens, you also know that getting
heads three times in a row has a chance of 12,5%. So it’s tempting to think that because you
already got heads two times in a row, there’s now an 87.5% chance of getting tails. But we need to take into account that we’ve
already gotten the first two heads. The 12,5% chance is only true when observing
from the beginning of the probability tree, i.e. when considering the next three throws. When considering just one throw, the probability
for heads to come up is always just 50%. The situation probably isn’t helped by the
fact that we’re talking about cards, where a lot of people have another intuitive understanding. Imagine shuffling a deck of cards and dealing
one card out at a time. The more black cards you get in a row, the
chance of getting a red card does actually go up, since there are now fewer black cards
than red cards remaining in the deck. This however is not the case for dealing new
games. Our reviewer seems to think that after getting
a bad deal two times in a row, it would be unbelievably unlikely to get another bad deal,
even though every deal is completely independant and there’s the same chance of getting a
bad deal every time. The reviewer does however inadvertently have
a point about the game not being completely random. Computers actually can’t do randomness very
well. The cards in the game are indeed shuffled
using a pseudo-random number generator, which means that the computer just uses arithmetic
to generate numbers that appear random. These numbers exhibit the same properties
as random numbers, in that every number comes up with the same probability and is largely
unpredictable. Let me show an example. Say I want to find out which of the 52 cards
to put at the bottom of the deck. The computer actually generates a number between
0 and 2 billion, the highest 32-bit number it can count to. Then, it divides by 52 and gives me the remainder. Let’s say that’s 35, so I put that card
on the bottom. Then, it does some arithmetic to the previous
number, making it into a different number between 0 and 2 billion. This time, we divide by 51 (since we have
one fewer cards to choose from) and take the remainder, 10. Then we put card number 10 in the deck and
so on. So the number 35 lead to 10, but they aren’t
dependant in the way that 35 always leads to 10, or that getting a 10 is now more likely
because we got a 35. Since there are 2 billion numbers, but only
52 cards, there are millions of numbers that can produce 35 as the bottom card, but each
of them lead to a completely different sequence of cards. The shuffling mechanism in the game isn’t
concerned with producing a good or a bad deal for the player. This particular reviewer experienced three
unlikely bad deals in a row, and lumped them together as one type of deal you can get,
and assumed that he was now overdue for a good deal, trying to equate getting 3 bad
deals in a row to getting heads 3 times in a row. In reality, those three deals didn’t even
have the same cards – they were all completely unique deals that just happened to be undesirable
in the game of spider. Who knows – those same decks could have been
really good had they been dealing to the game of klondike instead. In conclusion, things like shuffling cards
and flipping coins are independant of previous outcomes. Therefore, getting one result over and over,
does not mean that that result is now less likely to occur. Similarly, what is “lucky” or “unlucky”
to us as humans, under the rules and games we play, does not in any way affect randomness
and the outcomes it produces. While it’s unlikely to get a deal with 4
identical cards in 2-suit spider, each one of those deals have the exact same probability
as any other possible deal.

One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *