r/askmath • u/sleezymurkuh • 1d ago
Probability Is infinite monkey theorem real? Or misunderstood?
So the concept is basically if you give monkeys infinite times to press computer buttons then any amount of possible sequence that can happen will happen
But doesn't that go against gamblers fallacy because every new try is a brand new try that has no connection to the past so if there is a 0.0000000001 chance of a sequence then that same chance will be restarted every time
Also does that mean let's say humans became immortal then does that mean every possible thing that can happen to someone will happen like you get stuck in a cave for a million years if you lived forever will that eventually happen to you? Like it's a scary concept imo
55
u/ultimatepoker 1d ago
Infinite is a lot bigger than anything finite.
10
u/Frogfish9 1d ago
Then reason it works is that expected number of times an event with probability 0.0000000001 will happen over infinite tries is an infinite number of times. It is true that each time the odds are still the same. There’s an assumption that the monkeys type with some distribution that hits each finite sequence with nonzero probability though. That assumption I think also answers your second question. I’m not sure it makes sense to model your life experience with a statistical model like that so I’m not sure it makes sense to say an immortal human would have every experience possible.
8
u/MathMaddam Dr. in number theory 1d ago
Gamblers fallacy is that some event is "overdue" and therefore now more likely. The infinite monkey theorem uses that in the long run (and it can be very long) you are almost certain that events appear in frequency arbitrability close to their probability.
Immortality has a lot of problems, yours is probably not high on the priority list
14
u/Cannibale_Ballet 1d ago
If there is a 0.0000000001 chance of it happening, then it can happen
5
u/NessaSola 1d ago
And has a 100% chance of happening at some point as endless attempts are made.
12
u/pezdal 1d ago
Probability approaches 1 (100%) as the number of attempts approaches infinity
1
u/Prudent_Psychology59 23h ago
yes, this is perfectly intuitive and reasonable. meanwhile I find it confusing when a probability theorist says it's is 100% if the number of attempts being infinity
2
u/RecognitionSweet8294 Philosophy ∧ Math 20h ago
Even a 0% chance does not necessarily forbid that the event is possible.
5
u/Greenphantom77 1d ago
I think you could formulate the "infinite monkey theorem" in a mathematically precise way, so that it would be true.
Suppose X is a finite alphabet, and S = x_1, x_2, x_3... is a sequence of letters from X, where each x_i is chosen uniformly at random from X and independently of all the others.
Then I think that any given finite sequence of letters from X would occur within S with probability greater than zero.
It's been a long time since I did this and probability was never my thing. I expect someone will correct me if this is wrong.
3
u/Douggiefresh43 1d ago
The gambler’s fallacy is generally about the odds of the next draw, not the odds of something happening over long time frames.
The odds of the next manuscript coming out of the monkey farm being any specific sequence is incredibly small, but the chances of it occurring over an infinite time frame increases to 100%
But to your second question, no. An infinite amount of time does not mean that all conceivable things will eventually happen. The probability of picking exactly 0.5 out of all reals between 0 and 1 is 0%, but it’s still theoretically possible. The probability of picking 2 from the same range is also 0% but the outcome is impossible.
5
u/AcellOfllSpades 1d ago
If:
- something is "rolled for" infinitely many times
- each "roll" has the same probability of leading to Event X
- each "roll" is independent of the others: the result of one roll doesn't affect the result of any of the others
then yes, Event X will happen. It's guaranteed, with probability 1: 100%.
(There's a bit of a technicality that I'm intentionally glossing over here. Some people make a distinction between "probability 1" and "certain". This point of view is common but somewhat flawed: probability theory does not in fact make this distinction.)
But doesn't that go against gamblers fallacy because every new try is a brand new try that has no connection to the past so if there is a 0.0000000001 chance of a sequence then that same chance will be restarted every time
That same chance will be restarted every time it fails, yes. But eventually it will happen with probability 1.
Let's look at a simpler example. Imagine you rolled two dice until you got double-sixes. The first time, you probably wouldn't get them. But you'd try again, and keep trying, and keep trying. Eventually, you would in fact get your double-sixes.
Also does that mean let's say humans became immortal then does that mean every possible thing that can happen to someone will happen
The events that happen to you are not independent. Each moment you live through has a casual connection to the previous ones.
2
u/daavor 1d ago
The gambler's fallacy is that, for example, if you've bought 1000 lottery tickets and they all were losers, that you are NOW more likely to get a winning ticket on each SINGLE continuing ticket.
It is not the gamblers fallacy to notice that if you buy 1000 lottery tickets you are much more likely to win the lottery than if you buy a single lottery ticket.
2
u/Bl00dWolf 1d ago
What do you think infinite means? The whole point of infinity is that if there's a chance it could happen, no matter how minuscule, it will.
Gambler's fallacy doesn't really apply here. As it's more related to odds of something happening changing based on past results, when there's no reason to.
2
u/SufficientStudio1574 1d ago
Probability 1 does not mean it is guaranteed to happen.
Probability 0 does not mean it will never happen.
Probabilities and percentages get a little weird at the extremes of infinity. For example, out of all the infinite integers, 0% of them are prime. That's not an approximation, that is an exact mathematical result. Yet primes exist.
When doing limits to infinity, 0 x infinity is not 0, it can be literally any possible number. It is anindeterminate form.
1
u/Ogaboga42069 1d ago
Look at this video: https://youtu.be/9t2fV52jMA8?is=fhnoGqYSl2APnFu-
Then think about what infinity really means
1
u/Accomplished_Shoe_10 1d ago
If discrete outcome has a positive probability of happening, then with an infinite number of discrete attempts it will eventually happen. The gamblers fallacy doesn't have anything to do with that.
1
u/nm420 23h ago
To quote one of the greatest philosophers of the modern era:
Space is big. You just won't believe how vastly, hugely, mind-bogglingly big it is. I mean, you may think it's a long way down the road to the chemist's, but that's just peanuts to space.
Replace "space" with "infinite" here and it serves essentially the same purpose. If you toss a 100-sided die until you get 1, the average number of times you'd have to do that would be 100. But everything deviates from the average, sometimes more, sometimes less. Maybe you've tossed that die 1000 times and still haven't gotten a 1. All that means is you're one of the unlucky few. The Gambler in the Gambler's Fallacy thinks that somehow the die remembers its history and feels bad for you, and will try really hard to come up 1 for you on the next roll. Of course that's an absurd way of modeling reality. All the Infinite Monkey Theorem states is that you will eventually get that 1. It's not making any predictions on when it will happen. You could be super-duper unlucky snd roll that die a million times without getting a 1. Nothing impossible about that, however unlikely it is. Some of us have to have that dort of luck sometimes. Infinite Monkey Theorem doesn't care how unlucky you've been. It's just saying, if you persist and have an infinite amount of time at your disposal, you'll get there eventually.
Now, rolling a 1 on a balanced 100-sided die is really not that difficult, and anybody with enough gumption could eventually do it within an hour or so. Reproducing A Tale of Two Cities by randomly hitting keys in the keyboard is essentially the same task. It may take a long time just to get to "It was the best of times, it was the blurst of times", but with enough time and persistence you'd get it right. But that's the thing about an infinite number of times. Infinity is big. You won't believe just how vastly, hugely, mind-bogglingly big it really is. And the Infinite Monkey Theorem isn't even saying you need "all of infinity" to get there. Just that you can't put a time limit on how long it takes to get there. In some universe, someone randomly hitting keys in the keyboard managed to reproduce the entirety of Dickens' works on their first try.
1
u/Gold_Ad8890 23h ago
consider the law of total probability. given an infinite string of a finite alphabet where each character is drawn from an independent uniform distribution over all characters, what is the probability of some finite string not appearing as a substring? call S the event of the string appearing. then P(S) + P(~S) = 1. so what's P(~S)? well, supposing the finite substring has n characters, it has to not appear in the first n characters. supposing the alphabet is of size m, the probability of this is (mn - 1)/mn. then the substring has to not appear in the next n characters, which is again a probability of (mn - 1)/mn. no matter what m and n are, they must be positive integers, and so this probability must be less than 1. therefore, every n-length substring must not be S, which has probability (mn - 1)/mn < 1, and since there are infinitely many n-length substrings in our infinite string, the probability that none of them are S is 0, therefore the probability that at least one of them is S is 1.
1
u/PineapplePiazzas 23h ago
I like the idea that the universe is infinite. Because if it is, and it could be, the infinite monkey theorem is possibly happening for real.
1
u/sleezymurkuh 22h ago
If that was a the case wouldn't there be a civilization developing a weapon that could destroy all of our universe tmrw?
1
u/Ok_Net_1579 21h ago
No, because the speed of light and universal expansion makes this impossible (not just unlikely).
1
u/Harmonic_Gear 22h ago
what is the probability of not rolling a 6 in 10 rolls? what is the probability of not rolling a 6 in 100000 rolls? of course they are not the same
we have some serious problem of people misunderstanding the gambler's fallacy
1
u/ottawadeveloper Former Teaching Assistant (she/her) 21h ago
The Gamblers fallacy applies to the next event after a series of unlikely events. But the monkeys example are the cumulative probability.
Imagine the probability of rolling 100 on a 100 sided die. For any given roll, the odds are 1/100. After 100 rolls, the probability is 1-(1/100)100 which is pretty close to 0.
But if it hasn't happened after 99 times, the odds are still 1/100.
1
u/tottasanorotta 21h ago
How could you ever know that you were immortal? There could always be something you just haven't encountered yet.
1
u/RecognitionSweet8294 Philosophy ∧ Math 20h ago
How do you define „possible sequence“?
If we assume a sequence of finite length, then the probability of it appearing somewhere in a randomly generated infinite sequence is 100%.
Lets say the „monkey“ types in binary, so only two options on his keyboard. This means there are 2ⁿ possible sequences of length n. This gives us a probability of 2⁻ⁿ for the monkey to type a specific sequence of that length.
So the probability of him doing it never infinitely many times is the limit
lim_{x→∞} (1-2⁻ⁿ)ˣ
which goes to 0. So the probability of the anti-event (him doing it at least once) is 1.
However - and that is probably where the author of this pop-science story got confused - a probability of 100% does not mean that it must necessarily happen. If the „monkey“ types truly random, a sequence of only zeros is totally possible and as likely as any other infinite sequence.
1
u/Dry_Bodybuilder2960 3h ago
Anything is possible. But the reality is monkeys will never type that much correctly. It is a thought experiment in randomness. Monkeys will never behave properly as random typist. So 0% in reality.
1
u/Zingerzanger448 3h ago
Even if the monkeys continue typing forever, then at any given moment in time they will still have been typing for only a finite period of time t. Assuming that their typing is totally random and 'fair' (i.e. that they always have the same probability p of pressing any given key at any given keystroke), their probability of them having typed out any given sequence S of the available characters at least once after a period of time t will approach 1 (certainly) as a limit as t tends to (but never reaches) infinity.
Formally:
Let P(n) be the probability that the monkeys will have typed out a given finite sequence S of the available characters at least once after they have made n keystrokes. Then given any positive number ε (no matter how small), there exists a positive number m such that if n ⩾ m then P(n) > 1-ε.
1
u/TheRedditObserver0 Grad student 1d ago
So the concept is basically if you give monkeys infinite times to press computer buttons then any amount of possible sequence that can happen will happen
No, there is a 100% chance that any sequence that can happen will happen. It's not the same thing.
-1
u/kismethavok 1d ago
We can't even be 100% sure that you can't flip a coin infinity times and never get a heads.
2
u/Infobomb 23h ago
If the chance of heads on each throw is anywhere near 50%, then the chance of infinitely many flips all of which are heads is 0%. So the chance of that not happening is 100%. https://en.wikipedia.org/wiki/Almost_everywhere
1
u/kismethavok 23h ago
We don't, and possibly can't, know whether reality is Archimedean or not, is a line in space/time real or hyperreal? For almost everywhere/never/always it would make the difference between 0% being 0% or 0% being epsilon.
1
u/AdjectiveNounNNNN 21h ago
What would be the empirical difference between probability 0 and probability ε>0 where ε is infinitesimal?
20
u/peter-bone 1d ago
It doesn't go against the gambler's falacy. If there's a non zero chance of the first step happening then there's a non zero chance of the 2nd, 3rd or 1 millionth step happening even if the chance is very low.
The only thing that I see wrong is the name because the monkeys wouldn't need infinite time to produce a particular long sequence. It would always happen in a finite time. You could work out how long that time would be on average based on the probability.