Can you solve the frog riddle? - Derek Abbott
8,406,307 Views
18,245 Questions Answered
Let’s Begin…
You’re stranded in a rainforest, and you’ve eaten a poisonous mushroom. To save your life, you need an antidote excreted by a certain species of frog. Unfortunately, only the female frog produces the antidote. The male and female look identical, but the male frog has a distinctive croak. Derek Abbott shows how to use conditional probability to make sure you lick the right frog and get out alive.
Create and share a new lesson based on this one.
About TED-Ed Animations
TED-Ed Animations feature the words and ideas of educators brought to life by professional animators. Are you an educator or animator interested in creating a TED-Ed Animation? Nominate yourself here »
Meet The Creators
- Educator Derek Abbott
- Script Editor Alex Gendler
- Director Outis
- Narrator Addison Anderson
Aleksandr Kupriianov
Lesson in progress
The answer is not 50% even for the single frog. The answer highly depends on the conditional probability of croacking if the frog is male. No paradoxes, there probability is the same for all three cases: when one frog is silent, when we have two frogs and hear exactly one sound (but don't see frogs) and when we have two frogs and see which frog makes sound. The mistake is made in the picture, where option "female/female" disappears after a sound, and options "male/male", "male/female", "female/male" are unchanged. In fact, the probability of the rest options decrease non-proportionally.
In the video, the conditional probability that the male frog makes sound is not used at all. Let us denote it Q. Let us denote probability of male frog M. Then there are three mutually exclusive options: Female=(1-M), Silent=M*(1-Q) (silent male) and Sounding=M*Q (sounding male). For one frog, the probability that the frog does not make sound: Female+Silent. Absolute probability that we are saved: Female. Conditional probability that we are saved, if we lick the silent frog: Female/(Female+Silent)=)=(1-M)/(1-M+M*Q). Note, that it's always greater than 50%, if there are 50% male and 50% female.
Comments are closed on this discussion.
Theo Morris Clarke
Theo Morris Clarke
Lesson in progress
Nice! I think in the video they mis-apply Bayes' rule and ignore the probability of croaking
Julius Jacobsen
Lesson in progress
in response to A. S. Show comment
Floored is programmer-speak for "rounded down to nearest integer".
The way I interpreted what you described is that accumulated fractions of croaks are only audible when they reach a certain threshold, so not hearing a croak doesn't mean that there are no croaks. In that case there are distributions that make the back more preferable. Although I messed it up in my post above; the condition is "2*k(1) is larger than k(1/2)", not less.
But now I think that this was maybe not what you had in mind. If the frog in front produces exactly 0 croaks, not just less than 1, then the probability in the back can't be better.
A. S.
Lesson in progress
in response to Julius Jacobsen Show comment
I might not understand your notation/set-up well (what is "floored" number of croaks?), but instead of half-croaks, assume they are full croaks and you wait until you hear 2 from the back and non from the front. Let the probability of a single Male making k croaks in the period of observation be p(k). Then posterior odd of MM:MF = (2p(0)p(2)+p(1)p(1))/(2p(2))>p(0)/1 = posterior odds of M:F with equality only if p(1)=0 (which would return us 1 (double) croak scenario).
So no, waiting for multiple croaks from the back will ALWAYS disadvantage the back in relative terms since new "in the middle" options are created (1:1 as opposed to 2:0 and 0:2)
Julius Jacobsen
Lesson in progress
in response to A. S. Show comment
Ah, OK. I see now. But I never intended that the listener would hear the rounded down number of croaks, in my mind they would be able to distinguish between 1, 1+1/2 and 2 croaks etc. They just happen to hear exactly 1 croak in total from the back and 0 from the front.
Let's assume for ease of calculation that male frogs can make 0, 1/2 or 1 croaks with probabilities k(1) k(1/2) and k(2). Let's also assume that male to female ratio is 1:1. If the traveler hears the floored number of croaks then
P(~2M|1C) = 1/(1 + k(0) + k(1/2)²/2*k(1))
and P(F|~>=1C) = 1/(1 + k(0) + k(1/2)) if I haven't made a mistake. I had to write ~>= because this forum breaks if you type a "less than" sign which is stupid.
There are possible distributions that make the front less preferable than the back. (When 2*k(1) is less than k(1/2)). Not sure if that transfers to the continuous case.
A. S.
Lesson in progress
in response to Julius Jacobsen Show comment
You mentioned half-croaks - in which case the initial analysis breaks down and 1 full croak (2 half-croaks) bias us towards MM more making the front preferable. I took it to the extreme to consider continuous, infinitesimal croaking that registers as a "croak" when it add up to "1 croak" in which case this bias (There are more males in the back than in the front) become completely obvious.
Julius Jacobsen
Lesson in progress
in response to A. S. Show comment
Sorry, but I fail to see what this has to do with anything.
A. S.
Lesson in progress
in response to Julius Jacobsen Show comment
Take it to the extreme - instead of emitting a discrete croak at t with some (fixed) intensity, each male continuously emits (fixed) croaking noise which gets accumulated on your side and gets registered as "croak" at some threshhold. Then hearing a "croak" from the back and not from the front means there are more males in the back than in the front - so you should definitely go forward.
Julius Jacobsen
Lesson in progress
in response to Aleksandr Kupriianov Show comment
OK, I think I get it. In all possible universes there is exactly one frog that croaks once, and exactly zero frogs that croak more than once, because there is only really one way to build (1) out of (0,1,2,3,4...), barring multiples of zero. If the two frogs were able to each make a half-croak or make negative anti-croaks, then this would no longer hold true. Likewise, this is the reason why the distribution suddenly starts to matter with 2 croaks or more, it's because there are multiple ways to build (2).
I still think that's a pretty subtle point and I'm amazed that you just intuitively grokked that.
A. S.
Lesson in progress
in response to Julius Jacobsen Show comment
Yes, that was worded poorly. If you wait in silence after a single croak, ratio of Front-to-Back odds will stay at $1$ while both will change monotonically. The emphasis should have been on *1* croak only.
But this brings up an interesting point that if the croaking intensity is high enough relative to the rate at which your condition deteriorates, it makes sense to wait until the second croak and go in the direction opposite to it. Alternatively (if this is life-or-death kind of situation with cliff drop-off), you should wait listening until the very last minute before committing to a direction (modulo frogs possibly leaving, you having to actually catch them, etc).
Julius Jacobsen
Lesson in progress
in response to A. S. Show comment
You say the reason that it works is because I decide the instant I hear the croak but that is not true. If the time of my decision is independent of the time that I hear the croak it will still lead to the same results. If I listen for croaks for 1 minute and hear the first and only croak after 20 seconds, the probabilities will be exactly as described in the thread.