## 1236: "Seashell"

This forum is for the individual discussion thread that goes with each new comic.

Moderators: Moderators General, Prelates, Magistrates

dalcde
Posts: 173
Joined: Fri Apr 06, 2012 5:49 am UTC

### 1236: "Seashell"

Title Text: This is roughly equivalent to 'number of times I've picked up a seashell at the ocean' / 'number of times I've picked up a seashell', which in my case is pretty close to 1, and gets much closer if we're considering only times I didn't put it to my ear.

Is it just me, or has he got it the other way round?

EDIT: The image only. The title text seems to be correct.

Cres
Posts: 67
Joined: Tue Dec 22, 2009 2:14 pm UTC

### Re: 1236: "Seashell"

Yeah P(I picked up a seashell) and P(I'm near the ocean) need to be swapped

Calluin
Posts: 2
Joined: Mon Apr 04, 2011 6:07 pm UTC
Location: Czech Republic
Contact:

### Re: 1236: "Seashell"

I was puzzled by that, too. I think that you just need to swap the P(seashell) and P(ocean), not the conditional probabilities, because you have to calculate the probability of hearing the ocean when picking up seashells

unratito
Posts: 1
Joined: Wed Jul 10, 2013 12:40 pm UTC

### Re: 1236: "Seashell"

You're right. That's Bayes' theorem, and the formula is reversed.

cellocgw
Posts: 2053
Joined: Sat Jun 21, 2008 7:40 pm UTC

### Re: 1236: "Seashell"

Pete Peels P(shells) near the P(shore)
https://app.box.com/witthoftresume
Former OTTer
Vote cellocgw for President 2020. #ScienceintheWhiteHouse http://cellocgw.wordpress.com
"The Planck length is 3.81779e-33 picas." -- keithl
" Earth weighs almost exactly π milliJupiters" -- what-if #146, note 7

keldor
Posts: 80
Joined: Thu Jan 26, 2012 9:18 am UTC

### Re: 1236: "Seashell"

I've picked up seashells, but never at the seashore. Which makes sense, since I've only visited a seashore about twice in my life, and never actually found any shells while there.

Whizbang
The Best Reporter
Posts: 2238
Joined: Fri Apr 06, 2012 7:50 pm UTC
Location: New Hampshire, USA

### Re: 1236: "Seashell"

I get the humor (in a gist-y sort of way. I am not edumacated on statistics and probabilities and whatnot), but the whole point of the seashell is not to listen to the sound of the ocean the moment you pick it up, but to take the shell home with you and listen to the calming white noise when you are nowhere near the ocean.

'Course, cupping your hand does just as well, but the shell, as a physical representation of the sea, makes the experience more real and/or less silly. Though one could argue that putting the exoskeleton of a sea creature to your ear is a bit silly.

rmsgrey
Posts: 3630
Joined: Wed Nov 16, 2011 6:35 pm UTC

### Re: 1236: "Seashell"

I'm confused by the "roughly" in the title-text - P(S|O)*P(O) is exactly P(S&O) (and P(S) is obviously the same as P(S)) so there doesn't seem to be much scope for the two to be slightly different...

orthogon
Posts: 3075
Joined: Thu May 17, 2012 7:52 am UTC
Location: The Airy 1830 ellipsoid

### Re: 1236: "Seashell"

rmsgrey wrote:I'm confused by the "roughly" in the title-text - P(S|O)*P(O) is exactly P(S&O) (and P(S) is obviously the same as P(S)) so there doesn't seem to be much scope for the two to be slightly different...

I had the same thought, but then again the ratio of the number of occurrences is only an estimate of the ratios of the statistical probabilities of the events. Maybe that is what he was getting at?
xtifr wrote:... and orthogon merely sounds undecided.

prof_bart
Posts: 1
Joined: Wed Jul 10, 2013 1:02 pm UTC

### Re: 1236: "Seashell"

Rev. Bayes Says: P(A|B) P(B) = P(B|A) P(A)

[insert link to xkcd comic 386 here.... can't figure out how...]

Wait a minute.... have we just been trolled?

Erminaz
Posts: 1
Joined: Wed Jul 10, 2013 1:34 pm UTC

### Re: 1236: "Seashell"

Bayes' theorem in a nutshell, err... seashell

shababo
Posts: 1
Joined: Wed Jul 10, 2013 1:36 pm UTC

### Re: 1236: "Seashell"

Agreed. He has the prior in the denominator and the evidence in the numerator... should be switched:

$p(\theta | X) = \frac{p(X|\theta)p(theta)}{p(X)}$

...does latex work in here?

Posts: 7
Joined: Wed May 21, 2008 4:52 am UTC

### Re: 1236: "Seashell"

He got Bayes' theorem wrong.

P(B|A) = P(A|B) P(B) /P(A)

P(ocean|shell) = P(shell|ocean) * P(ocean)/P(shell)
Last edited by Viadd on Wed Jul 10, 2013 2:16 pm UTC, edited 1 time in total.

DarkVeracity
Posts: 1
Joined: Wed Jul 10, 2013 1:50 pm UTC

### Re: 1236: "Seashell"

Bayes Theorem is that
$P(A|X) = ( P(X|A) * P(A) ) / ( P(X|A) * P(A) + P(X|~A) * P(~A) )$
Which also equals
$P(X&A) / ( P(X&A) + P(X&~A) )$
Since
$P(X|A) * P(A) = P(X&A)$
By this theorem
$P(I'm near the ocean|I picked up a seashell)$
Should equal
$( P(S|O) * P(O) ) / ( P(S|O) * P(O) + P(S|~O) * P(~O)$

Flammifer
Posts: 3
Joined: Fri Jun 21, 2013 7:43 pm UTC

### Re: 1236: "Seashell"

Dammit, I came here to post that, but got beat to it by everybody ... I still have a lingering suspicion it might be a clever underhanded trick, though a mistake is more likely.

Ann_xkcd
Posts: 5
Joined: Tue Jan 06, 2009 12:25 am UTC

### Re: 1236: "Seashell"

I've been to the seashore lots (living in a coastal town helps), but when does one ever just "find" a seashell like that on the beach? Maybe I just live on the wrong part of the ocean or the wrong ocean. On the contrary, my grandparents had one in their house. Hence lots of listening in a seashell while not at the sea and zero times picking up that type of seashell while at the sea.

Hiferator
Posts: 82
Joined: Fri Feb 15, 2013 8:23 am UTC

### Re: 1236: "Seashell"

rmsgrey wrote:I'm confused by the "roughly" in the title-text - P(S|O)*P(O) is exactly P(S&O) (and P(S) is obviously the same as P(S)) so there doesn't seem to be much scope for the two to be slightly different...

Roughly, because the quantities in the alt text are not propabilities but absolute frequencies resulting in the quotient being a relative frequency. As such it only approximates the probability or (almost surely) converges to it when time or number of experiments aproaches infinity.
orthogon wrote:I had the same thought, but then again the ratio of the number of occurrences is only an estimate of the ratios of the statistical probabilities of the events. Maybe that is what he was getting at?

Exactly.

WolfieMario
Posts: 120
Joined: Fri Jan 28, 2011 10:45 pm UTC
Contact:

### Re: 1236: "Seashell"

It's been corrected; for those who want context, this was the original:

"Sometimes game development isn't about doing what is nice to everyone all the time." - Jens Bergensten

rhomboidal
Posts: 797
Joined: Wed Jun 15, 2011 5:25 pm UTC
Contact:

### Re: 1236: "Seashell"

I've stopped picking up seashells because of the probability there's a cone snail inside them. Thanks, math.

statismensch
Posts: 2
Joined: Wed Jul 10, 2013 4:57 pm UTC

### Re: 1236: "Seashell"

As a statistician who uses Bayesian methods, I have to disagree with the caption in the comic:

"Statistically speaking, if you pick up a seashell and don't hold it to your ear, you can probably hear the ocean."

I think this is a misunderstanding of Bayes rule. Let's consider the corrected version of the equation in the comic,

P(near ocean | seashell) ~ p(seashell | near ocean) * P(near ocean),

where "~" means proportional to. (I'm treating "seashell", the known quantity, as constant, and "near ocean", the unknown quantity, as stochastic.) If you're likely to be far away from the ocean to begin with, then P(near ocean | seashell) will be controlled mostly by your low prior probability, P(near ocean). If you're extremely unlikely to be near the ocean to begin with, then it won't make a difference whether you pick up the shell or not. P(near ocean | seashell) will still be low because your prior belief of being far away is so strong.

Doctors have a similar problem testing for rare diseases. Let's say I test positive for the Siberian Swazi-flu (a rare condition that I'm making up). My posterior probability of having the disease is

P(sick | +) ~ P(+ | sick) P(sick)

Since the disease is so rare, P(sick) is extremely low, and so the chances of my having the disease are still low even though I tested positive. Epidemiologists think about this sort of thing a lot.

drkslvr
Posts: 205
Joined: Wed Mar 09, 2011 8:59 pm UTC

### Re: 1236: "Seashell"

keldor wrote:I've picked up seashells, but never at the seashore.... Not many seas in Colorado.

Same for Kansas. I think I'm most likely to find a sea shell at Hobby Lobby, maybe?
Help a paralyzed kitten get surgery! Fundly.com/Help-Link-Walk-Again

statismensch
Posts: 2
Joined: Wed Jul 10, 2013 4:57 pm UTC

### Re: 1236: "Seashell"

Sorry about the repeat post. I'm new.
Last edited by statismensch on Thu Jul 11, 2013 4:04 pm UTC, edited 1 time in total.

cream wobbly
Posts: 170
Joined: Mon Aug 03, 2009 3:07 pm UTC

### Re: 1236: "Seashell"

keldor wrote:I've picked up seashells, but never at the seashore. Which makes sense, since I've only visited a seashore about twice in my life, and never actually found any shells while there.

He said oceans. Seas are different. But hey, not many oceans in Arizona either.

Only this morning, I picked up a seashell from the floor of my son's school. We also have a terrarium fitted out for a scraggly and entertaining bunch of decapods. They like to fling rejected shells around, which means I get to pick them up. Also, back when I lived in England, I used to pick up sea shells from the beach. This was on the North Sea. No ocean in sight.

I think to correct the expression, the following need to be integrated: P(domicile is located <60 minutes' journey from an ocean), P(has children), P(has hermit crabs), and perhaps change "ocean" to "saltwater".

Klear
Posts: 1965
Joined: Sun Jun 13, 2010 8:43 am UTC
Location: Prague

### Re: 1236: "Seashell"

Hmm.. yeah... I've never been at an ocean, and I don't think I'm alone.

grafzero
Posts: 6
Joined: Mon Sep 17, 2012 9:47 am UTC

### Re: 1236: "Seashell"

Calculations should take under consideration current level of ocean drain

greymatters
Posts: 3
Joined: Thu May 03, 2012 1:53 am UTC

### Re: 1236: "Seashell"

Better title for this comic: "Bays" Theorem

The Moomin
Posts: 358
Joined: Wed Oct 13, 2010 6:59 am UTC
Location: Yorkshire

### Re: 1236: "Seashell"

So he moved the P around with the seashell?

I choose the right one.
I'm alive because the cats are alive.
The cats are alive because I'm alive.
Specious.

Posts: 10258
Joined: Sun Sep 12, 2010 4:44 am UTC
Location: Oregon Coast: 97444

### Re: 1236: "Seashell"

Ann_xkcd wrote:I've been to the seashore lots (living in a coastal town helps), but when does one ever just "find" a seashell like that on the beach? Maybe I just live on the wrong part of the ocean or the wrong ocean. On the contrary, my grandparents had one in their house. Hence lots of listening in a seashell while not at the sea and zero times picking up that type of seashell while at the sea.

Yep. You live by the Wrong part of the water.
Those things need warm water.

Do you want to know why?
I can't remember.
Those large shells are destroyed by the Rough Northern Waters.

It is nice to hear The Sea.
I first heard the Sea in a Sea Shell.
http://www.howstuffworks.com/question556.htm
Life is, just, an exchange of electrons; It is up to us to give it meaning.

We are all in The Gutter.
Some of us see The Gutter.
Some of us see The Stars.
by mr. Oscar Wilde.

Those that want to Know; Know.
Those that do not Know; Don't tell them.
They do terrible things to people that Tell Them.

Klear
Posts: 1965
Joined: Sun Jun 13, 2010 8:43 am UTC
Location: Prague

### Re: 1236: "Seashell"

I think Randall doesn't know how to use three seashells...

Posts: 18
Joined: Thu Aug 11, 2011 3:40 am UTC

### Re: 1236: "Seashell"

Is it just me, or has Randall been invoking the Bayes a lot lately?

statismensch wrote:I think this is a misunderstanding of Bayes rule. Let's consider the corrected version of the equation in the comic,

P(near ocean | seashell) ~ p(seashell | near ocean) * P(near ocean),

where "~" means proportional to. (I'm treating "seashell", the known quantity, as constant, and "near ocean", the unknown quantity, as stochastic.) If you're likely to be far away from the ocean to begin with, then P(near ocean | seashell) will be controlled mostly by your low prior probability, P(near ocean). If you're extremely unlikely to be near the ocean to begin with, then it won't make a difference whether you pick up the shell or not. P(near ocean | seashell) will still be low because your prior belief of being far away is so strong.

Wait, where did P(seashell) go? You can't just drop it, it depends on P(near ocean)! I think we can agree that everyone sees about the same number of non-ocean seashells, at children's museums and stuff. However, people who live near (seashell-strewn) beaches see a lot more ocean seashells than people who don't, so their total number of seashells is much higher, and for them any given seashell is very likely to be an ocean seashell. I think this is true of Randall, since he lives in Massachusetts and seems to like beaches.

Your argument does make sense for people who mostly (or always) see non-ocean seashells. I personally encounter shells big enough to listen to so rarely that I'm not sure I can weigh in, though I think one of my elementary school teachers had one and my school wasn't on a beach, so I guess I was in the "mostly non-ocean seashells" group while I was in her class.

statismensch wrote:Doctors have a similar problem testing for rare diseases. Let's say I test positive for the Siberian Swazi-flu (a rare condition that I'm making up). My posterior probability of having the disease is

P(sick | +) ~ P(+ | sick) P(sick)

Since the disease is so rare, P(sick) is extremely low, and so the chances of my having the disease are still low even though I tested positive. Epidemiologists think about this sort of thing a lot.

You could apply similar logic here if testing positive is also extremely rare, and P(+ | sick) is reasonably sized. You can make up for even a small P(+ | sick) if P(+) is small enough, but such a test would not be very useful . Of course, practically speaking I bet it's really hard to develop a good test for diseases that are seen rarely, just because you don't have many opportunities to study it...?

greymatters wrote:Better title for this comic: "Bays" Theorem

[sniff] God bless you, sir...god bless you.

tyler.daniels
Posts: 3
Joined: Wed Nov 23, 2011 8:32 am UTC

### Re: 1236: "Seashell"

garaden wrote:Wait, where did P(seashell) go? You can't just drop it, it depends on P(near ocean)!

He treated P(seashell) as a constant and changed his equation to "is proportional to". It works mathematically.

Posts: 18
Joined: Thu Aug 11, 2011 3:40 am UTC

### Re: 1236: "Seashell"

tyler.daniels wrote:
garaden wrote:Wait, where did P(seashell) go? You can't just drop it, it depends on P(near ocean)!

He treated P(seashell) as a constant and changed his equation to "is proportional to". It works mathematically.

Sure, I agree that algebraically it's a perfectly fine thing to do But in terms of probability theory it doesn't make much sense. Now that I think about it, the problem isn't really that he decided P(S) was constant; sometimes you can do that without running into trouble. The trouble is, if the ratio P(S|O)/P(S) is at least as big as P(O) is small, then P(O) is no longer dominating and P(O|S) can become quite a bit larger than P(O) (up to 1, actually). By dropping P(S) and leaving P(S|O) to fend off P(O) all on its lonesome, it certainly looks like P(O|S) can be no bigger than P(O), which is not the case.

Thing is, probabilities aren't like physics equations. You don't need to know the exact ratio of force to electric field strength to understand the Lorentz force, because if you pick different units you'll get a different ratio, so it's the proportionality that actually matters (though why coulombs etc. are so friggin' huge is beyond me). But with probabilities, the difference between a ratio being >1 or <1 is the difference between evidence and counter-evidence. The information hiding in the proportionality squiggle is REALLY important!

statistical purist
Posts: 1
Joined: Fri Jul 12, 2013 10:59 am UTC

### Re: 1236: "Seashell"

The events A: "I am near the ocean" and B: "I picked up a seashell" are likely not independants, so the real formula should be:
P(A|B) = P(A and B)/P(B).

In the case of A and B being independant, then:
P(A and B) = P(A|B)P(B) = P(B|A)P(A).

Of course in practice, all events are considered independants (otherwise it is too complicated to compute). Often it works rather well, but when it does not, this could lead to dire consequences like the sub-primes crisis.

orthogon
Posts: 3075
Joined: Thu May 17, 2012 7:52 am UTC
Location: The Airy 1830 ellipsoid

### Re: 1236: "Seashell"

statistical purist wrote:The events A: "I am near the ocean" and B: "I picked up a seashell" are likely not independants, so the real formula should be:
P(A|B) = P(A and B)/P(B).

In the case of A and B being independant, then:
P(A and B) = P(A|B)P(B) = P(B|A)P(A).

Of course in practice, all events are considered independants (otherwise it is too complicated to compute). Often it works rather well, but when it does not, this could lead to dire consequences like the sub-primes crisis.

Hang on a minute. Your first equation, which you say is generally true, is equivalent to the first equality in your second equation, P(A and B) = P(A|B) P(B), which you say is true only for independent events. You can get from one to the other simply by multiplying both sides by P(B). (The case where P(B)=0 is a bit pathological, I admit, but I don't think that concerns us here).

Perhaps what you are getting at is that if A and B are independent, then P(A|B) = P(A); in other words whether B occurs or not has no bearing on the probability of A, so the conditional probability equals the marginal probability. From this we get the famous result that P(A and B) = P(A|B)P(B) = P(A)P(B) if A and B are independent.

PS Welcome to the forum!
xtifr wrote:... and orthogon merely sounds undecided.

Posts: 18
Joined: Thu Aug 11, 2011 3:40 am UTC

### Re: 1236: "Seashell"

statistical purist wrote:Of course in practice, all events are considered independants (otherwise it is too complicated to compute). Often it works rather well, but when it does not, this could lead to dire consequences like the sub-primes crisis.

...yeah. "Most major investment banks, strongly correlated to the housing market by accident? Preposterous!" KABOOM. "Whoops."

Statistically speaking, if you accidentally the economy but have a golden parachute, you can probably hear the ocean. :-/

arthurd006_5
Posts: 98
Joined: Mon Oct 18, 2010 9:49 am UTC

### Re: 1236: "Seashell"

garaden wrote:... why coulombs etc. are so friggin' huge is beyond me...

Because it's set sensibly for current electricity (an ampere-second); and current electricity is very different from static electricity.

Kit.
Posts: 1117
Joined: Thu Jun 16, 2011 5:14 pm UTC

### Re: 1236: "Seashell"

arthurd006_5 wrote:
garaden wrote:... why coulombs etc. are so friggin' huge is beyond me...

Because it's set sensibly for current electricity (an ampere-second); and current electricity is very different from static electricity.

Just to put the things into a "proper" perspective: my mobile phone's battery is rated @1200 mA*h, that's 4320 coulombs.

Posts: 18
Joined: Thu Aug 11, 2011 3:40 am UTC

### Re: 1236: "Seashell"

Kit. wrote:
arthurd006_5 wrote:
garaden wrote:... why coulombs etc. are so friggin' huge is beyond me...

Because it's set sensibly for current electricity (an ampere-second); and current electricity is very different from static electricity.

Just to put the things into a "proper" perspective: my mobile phone's battery is rated @1200 mA*h, that's 4320 coulombs.

Good point; I was definitely thinking about capacitors when I felt like 1 C was ludicrously big. That said, I think I would have preferred it to be an order of magnitude or three lower, and then we wouldn't have to e.g. rate batteries with milliamp-hours. It'd be nice if household currents could be expressed in the base unit rather than needing fractions of it.

Posts: 10258
Joined: Sun Sep 12, 2010 4:44 am UTC
Location: Oregon Coast: 97444

### Re: 1236: "Seashell"

Off Topic:

Not anything to do with math here.
The Sea Shell is left behind, also.
http://www.spiritsite.com/writing/annlin/part2.shtml

Do you think P(sea shell) are welks?

http://www.sciencenews.org/view/generic ... ll_Spirals
oh. The Golden Ratio is not so gold after all.

Spoiler:
1/3+1/3+1/3=pretty.
That may, still, be true.
Our eyes are built to break the visual field into Top, Middle, Bottom.

http://www.maa.org/features/lifebytv.html
About Math for our Liberal Artists.
Life is, just, an exchange of electrons; It is up to us to give it meaning.

We are all in The Gutter.
Some of us see The Gutter.
Some of us see The Stars.
by mr. Oscar Wilde.

Those that want to Know; Know.
Those that do not Know; Don't tell them.
They do terrible things to people that Tell Them.

Kit.
Posts: 1117
Joined: Thu Jun 16, 2011 5:14 pm UTC

### Re: 1236: "Seashell"

garaden wrote:I was definitely thinking about capacitors when I felt like 1 C was ludicrously big.

I guess it depends on how you define "ludicrously". I remember making a 12 V * 0.4 F capacitance box for some semiconductor lab testing. It was quite heavy, but still portable.

garaden wrote:That said, I think I would have preferred it to be an order of magnitude or three lower, and then we wouldn't have to e.g. rate batteries with milliamp-hours. It'd be nice if household currents could be expressed in the base unit rather than needing fractions of it.

That could backfire as well. Look what happened to [kilo]calories. The 1200 mA*h can be written as 1.2 A*h anyway.

Besides, the current system is pretty suitable for household currents, if you look at European circuit breakers' standard ratings. "16A" at a circuit breaker doesn't look as scary as "16kA" would.