I want to actually see if I can test your abilities with randomness, if you can do me something, do me a favour.
So, you know, flipping a coin: heads or tails? Alright, so I want you to be a
coin flipper in your mind and I want you to flip a coin in your mind randomly 20 times and
write down the result here, but don't show me.
You've done 20? Okay. Now, I don't want to see.
But, what's going to happen is I'm gonna try and make money off your list.
So what I'm gonna do is I'm gonna give you a bunch of pennies and you don't have to pay me back,
they're yours. And these are mine. I
bet to play and if I win you give me that amount and if I lose you keep that amount,
all right? So I'm just going to put a penny down,
there's one penny riding on this.
Okay. So my first prediction is that you flipped a head. - (Brady: Yes) - Yes!
So Brady says head. So, I'm gonna take one of your coins from your stack,
okay, I gave them to you anyway, so you shouldn't be too
miffed. Put another coin in. Okay, I'm gonna predict tails. - (Brady: No) - Oooh
So you've said head. Okay next I'm going to predict tails. - (Brady: No)
Not tails. Next I'm going to predict tails and I'm going to bet
20 dollars...
...that I'm right. What did you - what was it, heads or tails? - (Brady: It was tails)
You owe me 20 bucks. - (Brady: Okay. I don't remember agreeing to that)
So I'm just gonna put that aside. All right, shall we keep playing?
I'm gonna bet another coin, just remember you owe me 20 US, I want it in US if that's okay? Okay, I'm gonna bet another coin.
I'm gonna predict tails. - (Brady: Yeah) - It is tails? Okay tails it is. Alright, so I get another coin there.
I'm going to predict heads. I'm going to predict tails.
Tails it is.
So that was another coin from you. Heads?
(Brady: No)
No, okay, so you get to keep that. Tails? - (Brady: No mate, it's a head)
It's a head so you get that. Heads? Heads it is.
Alright, so I get another coin from you. This is turning out
alright. You remember you've got the 20 to give me? - (Brady: Yeah, yeah) - Okay. I'm gonna predict
tails? - (Brady: Yeah) - It is a tail.
- (Yeah) - So I get another coin from you. Heads? - (Yeah)
It is a head. Okay, I'm gonna predict a tail. Is it a tail? - (Brady: No) - Tail? - (Yep)
Okay, I'm going to predict a head? - (No)
Okay, you get that coin. I'm gonna predict another head. - (Yep)
It was a head so I get a coin from you. Tail? - (Yep) - Was a tail. And I predict another tail? - (No)
It's a head. So I'm going to predict a head. - (Correct) - Last one, umm
For a hundred bucks: tail.
(Brady: ...Yeah) - It is a tail? - (Yeah)
YES!
(Brady: That was expensive) - That was expensive, you should have listened to the way I said this. You've done something fantastic for me,
you have been really bad at creating random sequences. As I can see here
the longest run that you've had is right at the beginning,
it was three heads, and then you've pretty much alternated between tails and heads, tails and heads; the most
run that you've had of tails or heads is two in a row. And you showed a pattern there.
This demonstrate something called the Gambler's Fallacy. The gambler's fallacy is, says that
what's happened before
has an impact of what will happen next. If we were using a coin, every time you flip it there's an equal probability
that you're going to get a head or a tail. Now a lot of people think well, how does that work?
Because you know, you're flipping coins,
surely it's not very likely to have, you know, five heads in a row, six heads in a row.
But this is the nature of randomness,
randomness is very lumpy, right? And lumpiness means that you do get streaks, which is part of the gambler's
lexicon, you know, there's like, we have a gambling streak. So you actually have not produced a very good random sequence.
(Brady: I didn't put enough long streaks in)
He didn't put enough streaks in, no. This, this is actually - would be termed homogeneous.
Because it's actually quite mixed. The number of ways that we can have twenty heads or tails,
the number of permutations we can have, is pretty big. So we can basically get a head or a tail in each position and
there's 20 positions.
So the total number of permutations, not combinations, like fixed order, is 2 to the power
20. And that turns out to be
1,048,576.
Because you've done a permutation
which has a maximum
streak of either three heads or three tails, you only had one little tiny streak right at the beginning, which was quite interesting.
That is a subset of every single permutation.
But this is actually representative of the way you think, and not just you Brady,
a lot of people think exactly like you. If they were to do random they think mixed up, right?
That's what people think. But random isn't mixed up, it - random is,
well it's random.
In actual fact
it has a
different nature to the idea of being mixed up. Because if it was evenly mixed up, as I've just shown I've made a lot of
money off you, you end up being predictable. And randomness is unpredictable. So
I've actually crunched the numbers and I can tell you how many permutations
have a maximum of three heads or three tails as a streak:
242,830.
So you can see that's a much smaller number than this. And an actual fact it turns out to be
23.2%
of
all possible permutations.
It's less than 1/4. So out of all the possible permutations you can have, the pool that you would choose from,
okay, only is you're only getting one in four.
So can see just by that logic alone why this,
well, it's not random.
All right? - (Brady: Of course, Simon, I wasn't consciously limiting myself to streaks of three.)
(I guess my brain was somehow.) - Well, that's a natural thing to do, because we think streaks are
unlikely. We tend to think very small mindedly.
So if you were just dealing with say four in a row,
Having four heads or four tails in a row
is actually in the minority. Because there's only one way you can get four heads in a row, and only one way you can get
four tails in a row. But we did 20 and
so straight after you did four heads or four tails,
imagine if after that you did head tails, head tails, head tails. There's a whole heap of different permutations
you can get, which at the beginning have four heads or four tails.
Now that's part of how randomness works, is the fact that, sure, if you're dealing with a small sample
you can expect things to be quite mixed up, but that's because there's not many permutations.
Head, tail, head, tail, tail, head, tail, head is actually, you know, in the same ballpark number as
big streaks. But when you're dealing with very long streaks
then you could have head, head, head, head, head, head, head, and then you've still got all the
permutations left to go, which is still a huge number. It's not just in that position;
you could get a streak of six heads in a row or six tails in a row at any point and,
and, and if you do that you end up with a whole bunch of permutations
which have a streak of six heads or a streak of six tails. I've done this with school kids plenty of times and
what has happened, in my empirical evidence,
all right, is that you do have kids putting in a streak of four heads or four tails but only once.
They'll only do a maximum of once. So I actually crunched the numbers and I wanted to work out if,
how many, how many permutations of 20 heads or tails where you had a maximum of three heads or three tails and, and just one
streak of four. It's basically what you've done, plus you also allow four heads or four tails. Now- - (Brady: Only once?)
Only once. That's basically all of this plus one streak of
four heads or four tails. I really had to crunch the numbers for this, I'm telling you.
So the total number is
478,520. And that corresponds to
45.6% of all permutations.
(Brady: Oh that's bigger than I expected!)
It is bigger but it's still less than half. So this is kind of the limit of what you're normally
mathematically literate
person
thinks about randomness. They actually, over, over twenty
flips of heads or tails will actually cut out half of all permutations as possibilities.
Now half is pretty significant when we're talking about probability, right? It's like, half.
You'd actually get rounded down.
(Brady: So you're telling me that over half of all the times I do this, with a coin, I will have a streak of four twice, twice or a streak of five or-?) - Exactly, exactly.
More streaks of four in a row and longer streaks. It's because I've chosen quite a lengthy number of flips,
so we've done twenty. If it's 16
it doesn't work as much. The nature of randomness really presents itself in the length of the number of flips. The way we can think
about it is how
predictable is your sequence? Really all you need to know is, is there a way that you can write your
sequence down of heads and tails?
Is there a way to do it
that it's simpler? And if there is some sort of order or pattern to it, then you can actually make it simpler.
But if your sequence is actually very complicated
it's actually harder to write it any smaller than it is. And there is a way of categorising
a random sequence by saying, the easiest way to write this sequence down is just write it. The DNA sequence
which makes up me and
the fabulous person you are Brady, is actually a near random sequence. Because the DNA sequence contains so much information
it actually in a way contains lots of patterns.
So the way you can think of randomness is it's something that actually has patterns on patterns on patterns on patterns.
And that actually fits in very much with the way gamblers think where they say, oh, I can see a pattern here,
I can predict what's going to happen next.
But that's, that's just randomness at work.
Randomness shows patterns, but there's no logic to it. It's not following rules of science or physics or anything,
it's the way randomness is.
(Brady: Do you know how- I just wish, if I'd just made that last one a head I would have won.) - Yeah
(If I'd just made the last one a head!)
(And it wouldn't- and it still would have just been a streak of three)
Yeah, well, 'cause- - (Brady: You were lucky, you were just lucky.)
No, well, because you proved to me that, that you weren't gonna do it again.
I think- - (Brady: I'd done it once before!)
You started! You started big. This is basically, you did,
this is like a Hollywood script. You start with a big action sequence at the beginning and then it becomes formulaic.
(Brady: Bit like this video?)
Thanks
Well, today's episode sponsor Brilliant is full of courses and quizzes and puzzles and lots of them touch on the Gambler's Fallacy,
randomness, probability in all sorts of ways.
And this is just a small smattering of the great bounty of stuff
you're gonna find on the site, which I'm sure you've heard me talk about before. It's amazing for mathematics
but there's also loads of science and computer science on there as well.
Lots of it's free, but you can also get a premium membership that unlocks all sorts of other goodies.
I know some of you are doing that already
but here's something you might not have thought of: buying someone else a Brilliant membership as a gift.
It's so easy, with just a few clicks you're giving someone you care about hours, days, maybe years of fun,
education,
entertainment. It's so had coming up with thoughtful and original gifts for people these days,
someone in your life might really like this. Really clever, a little bit different.
Go to brilliant.org/numberphile,
follow the easy links to a gift subscription and feed the brain of someone you care about.
(Brady: Alright, anything else?) Simon: Yeah, where's my money?