RE: Math question

From: Emlyn O'regan (oregan.emlyn@healthsolve.com.au)
Date: Mon Oct 28 2002 - 18:31:23 MST


A question for LDC, a probability-competent individual, out of curiosity;

It took me about 20 minutes to code up and trivially test my brute-force
solution, and 40 seconds to do the run which got the final answer. How long
did the calculations below take you to do? I am guessing that this is
everyday stuff for you (remind me never to play cards for money with you),
so I figure it didn't take too long. Our answers came out close enough that
I'd call the two solutions equivalent (although I'd say 2-1 odds on a head
is a little more marginal).

Emlyn

> -----Original Message-----
> From: Lee Daniel Crocker [mailto:lee@piclab.com]
> Sent: Tuesday, 29 October 2002 11:29
> To: extropians@extropy.org
> Subject: Re: Math question
>
>
> > (Eliezer S. Yudkowsky <sentience@pobox.com>):
> > Suppose that we flip a fair coin 20 times, and that a
> biased sampling
> > procedure then randomly selects 5 coinflips from the set of
> coinflips that
> > came up heads and reports on those coinflips; if there
> aren't 5 coinflips
> > that came up heads, the biased sampling procedure reports
> all available
> > heads and enough randomly selected tails to make up the gap.
> >
> > Suppose the biased sampling procedure reports that the
> first, sixth,
> > eleventh, fifteenth, and eighteenth flips came up heads.
> Is there a
> > simple general formula for calculating the probability that
> any given
> > other coinflip came up tails? Clearly the probability is
> greater than
> > 50%, but by how much?
>
> I don't know if this qualifies as an "easy way" to figure it out,
> but here's the answer:
>
> Probability 1/2 makes the calculating the binomial distribution a
> little simpler, so the number of ways the 20 flips can result in
> exactly N heads is 20! / (N! * (20 - N!), so that's 1 way to get
> no heads, 20 ways to get 1, 190 ways to get 2, 1140 ways to get 3,
> 4845 ways to get 4, etc. Adding those 5 outcomes, which are the
> ones where your sample produces at least one tail and the probability
> of a remaining coing being a tail is therefore certainty, you get
> 6196/1048576 (the denominator here is 2^20), or a little less than
> 0.6 % as the cases that aren't interesting. That leaves 99.4% of
> the cases where your biased selector has chosen 5 heads.
>
> So, for each of these cases (N=5...N=20), calculate the probability
> that a single chosen remaining coin is a tail; this will be just
> (20 - N) / 15. For N=5, P=1 (because there were exactly five heads,
> so the probability of a reminaining coing being a tail is 1), for
> N=6, it's 14/15, etc., to N=20, where P=0 (all heads).
>
> Now write that probability (1, 14/15, 13/15....) next to the previous
> numbers you calculated in step 1 (15504, 38760, ...) Multiply them
> across, and divide by (1048576-6196). Then add the whole column.
> The number I get get is 0.66407..., so you should take the "head"
> bet if you're offered 2-to-1.
>
> Note: the hardest part of this for me wasn't figuring out how to do
> it or calculating the binomials, but having to keep scratching out
> "52" all the time...
>
> --
> Lee Daniel Crocker <lee@piclab.com> <http://www.piclab.com/lee/>
> "All inventions or works of authorship original to me, herein
> and past,
> are placed irrevocably in the public domain, and may be used
> or modified
> for any purpose, without permission, attribution, or
> notification."--LDC
>

***************************************************************************
Confidentiality: The contents of this email are confidential and are
intended only for the named recipient. If the reader of this e-mail is not
the intended recipient you are hereby notified that any use, reproduction,
disclosure or distribution of the information contained in the e-mail is
prohibited. If you have received this e-mail in error, please reply to us
immediately and delete the document.
Viruses: Any loss/damage incurred by using this material is not the sender's
responsibility. Our entire liability will be limited to resupplying the
material. No warranty is made that this material is free from computer virus
or other defect.



This archive was generated by hypermail 2.1.5 : Sat Nov 02 2002 - 09:17:50 MST