Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #14536 > unrolled thread

Re: Toughest Probability Question

Started bypete <pfiland@mindspring.com>
First post2011-12-12 19:29 -0500
Last post2011-12-13 21:52 -0500
Articles 20 on this page of 41 — 15 participants

Back to article view | Back to comp.lang.c

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Toughest Probability Question pete <pfiland@mindspring.com> - 2011-12-12 19:29 -0500
    Re: Toughest Probability Question Seebs <usenet-nospam@seebs.net> - 2011-12-13 04:46 +0000
      Re: Toughest Probability Question Geoff <geoff@invalid.invalid> - 2011-12-12 22:19 -0800
        Re: Toughest Probability Question Seebs <usenet-nospam@seebs.net> - 2011-12-13 09:19 +0000
          Re: Toughest Probability Question "BartC" <bc@freeuk.com> - 2011-12-13 13:43 +0000
            Re: Toughest Probability Question Keith Thompson <kst-u@mib.org> - 2011-12-13 10:27 -0800
              Re: Toughest Probability Question "BartC" <bc@freeuk.com> - 2011-12-13 19:52 +0000
                Re: Toughest Probability Question Seebs <usenet-nospam@seebs.net> - 2011-12-13 20:06 +0000
                Re: Toughest Probability Question Keith Thompson <kst-u@mib.org> - 2011-12-13 12:14 -0800
                  Re: Toughest Probability Question "BartC" <bc@freeuk.com> - 2011-12-13 23:34 +0000
                    Re: Toughest Probability Question Seebs <usenet-nospam@seebs.net> - 2011-12-14 00:24 +0000
            Re: Toughest Probability Question Seebs <usenet-nospam@seebs.net> - 2011-12-13 19:27 +0000
              Re: Toughest Probability Question "BartC" <bc@freeuk.com> - 2011-12-13 23:56 +0000
                Re: Toughest Probability Question Seebs <usenet-nospam@seebs.net> - 2011-12-14 00:24 +0000
                  Re: Toughest Probability Question "BartC" <bc@freeuk.com> - 2011-12-14 12:12 +0000
                    Re: Toughest Probability Question Seebs <usenet-nospam@seebs.net> - 2011-12-14 17:47 +0000
                      Re: Toughest Probability Question gordonb.qunma@burditt.org (Gordon Burditt) - 2011-12-15 08:22 -0600
                        Re: Toughest Probability Question Robert Wessel <robertwessel2@yahoo.com> - 2011-12-15 14:41 -0600
                      Re: Toughest Probability Question superpollo <superpollo@tznvy.pbz> - 2011-12-15 19:14 +0100
                    Re: Toughest Probability Question Keith Thompson <kst-u@mib.org> - 2011-12-14 13:12 -0800
                    Re: Toughest Probability Question Willem <willem@toad.stack.nl> - 2011-12-14 21:53 +0000
                      Re: Toughest Probability Question "BartC" <bc@freeuk.com> - 2011-12-14 22:35 +0000
                        Re: Toughest Probability Question Willem <willem@toad.stack.nl> - 2011-12-15 09:07 +0000
                          Re: Toughest Probability Question Geoff <geoff@invalid.invalid> - 2011-12-15 02:07 -0800
                            Re: Toughest Probability Question Keith Thompson <kst-u@mib.org> - 2011-12-15 12:13 -0800
                              Re: Toughest Probability Question Geoff <geoff@invalid.invalid> - 2011-12-15 13:03 -0800
                                Re: Toughest Probability Question Seebs <usenet-nospam@seebs.net> - 2011-12-15 21:36 +0000
                Re: Toughest Probability Question Geoff <geoff@invalid.invalid> - 2011-12-13 16:35 -0800
                  Re: Toughest Probability Question Seebs <usenet-nospam@seebs.net> - 2011-12-14 01:20 +0000
                Re: Toughest Probability Question Keith Thompson <kst-u@mib.org> - 2011-12-13 16:44 -0800
                  Re: Toughest Probability Question Seebs <usenet-nospam@seebs.net> - 2011-12-14 01:20 +0000
                    Re: Toughest Probability Question James Dow Allen <jdallen2000@yahoo.com> - 2011-12-15 02:33 -0800
                      Re: Toughest Probability Question gwowen <gwowen@gmail.com> - 2011-12-15 05:38 -0800
                        Re: Toughest Probability Question Thad Smith <ThadSmith@acm.org> - 2011-12-18 23:34 -0700
                  Re: Toughest Probability Question Bill Reid <hormelfree@gmail.com> - 2011-12-14 07:07 -0800
      Re: Toughest Probability Question Kaz Kylheku <kaz@kylheku.com> - 2011-12-13 06:55 +0000
        Re: Toughest Probability Question Seebs <usenet-nospam@seebs.net> - 2011-12-13 09:19 +0000
      Re: Toughest Probability Question pete <pfiland@mindspring.com> - 2011-12-13 12:15 -0500
        Re: Toughest Probability Question pete <pfiland@mindspring.com> - 2011-12-13 13:20 -0500
          Re: Toughest Probability Question Peter Nilsson <airia@acay.com.au> - 2011-12-13 18:15 -0800
            Re: Toughest Probability Question pete <pfiland@mindspring.com> - 2011-12-13 21:52 -0500

Page 2 of 3 — ← Prev page 1 [2] 3  Next page →


#14608

FromWillem <willem@toad.stack.nl>
Date2011-12-14 21:53 +0000
Message-ID<slrnjei6n5.bv6.willem@toad.stack.nl>
In reply to#14600
BartC wrote:
) So if you're at a party with some 60 people, I believe even you would take 
) on a bet against someone who didn't think anyone would share a birthday. (I 
) believe the theoretical probability is about 99%; someone who hasn't thought 
) it about it too carefully, and might be also be drunk, might think it was 
) 16%).

Note that the original question was something like:
When can you be *certain* that the chance is above 50% ?


Here's a probability question for you:

Suppose you pick a restaurant that seats exactly 23 people.  It's so
popular that every evening, it is full (with 23 people).

For every evening of an entire year, you interview the 23 people that are
there that evening, and you note if there are two that have the same
birthday.

So now you have 365 cases of a group of 23 people.  You would say that in
about half of those cases, there would be a double birthday, right?

Now here's the question: In the given scenario, what is the probability
that there was a double birthday in less than 150 cases?


SaSW, Willem
-- 
Disclaimer: I am in no way responsible for any of the statements
            made in the above text. For all I know I might be
            drugged or something..
            No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT

[toc] | [prev] | [next] | [standalone]


#14612

From"BartC" <bc@freeuk.com>
Date2011-12-14 22:35 +0000
Message-ID<jcb8cg$qie$1@dont-email.me>
In reply to#14608

"Willem" <willem@toad.stack.nl> wrote in message
news:slrnjei6n5.bv6.willem@toad.stack.nl...
> BartC wrote:
> ) So if you're at a party with some 60 people, I believe even you would
> take
> ) on a bet against someone who didn't think anyone would share a birthday.
> (I
> ) believe the theoretical probability is about 99%; someone who hasn't
> thought
> ) it about it too carefully, and might be also be drunk, might think it
> was
> ) 16%).
>
> Note that the original question was something like:
> When can you be *certain* that the chance is above 50% ?
>
>
> Here's a probability question for you:
>
> Suppose you pick a restaurant that seats exactly 23 people.  It's so
> popular that every evening, it is full (with 23 people).
>
> For every evening of an entire year, you interview the 23 people that are
> there that evening, and you note if there are two that have the same
> birthday.
>
> So now you have 365 cases of a group of 23 people.  You would say that in
> about half of those cases, there would be a double birthday, right?
>
> Now here's the question: In the given scenario, what is the probability
> that there was a double birthday in less than 150 cases?

I've no idea how to work these things out myself. But I've done a rough
simulation, and in 10,000 years, there were only 4 years where there was a
double birthday on less than 150 nights, and none on less that 140. So
roughly 0.04%.

Now I suppose you're going to say there was something funny about the
restaurant, that it's used exclusively by people with the same birthday, or
all different, or there's something that's going to be contrary to the
theoretical probabilities.

-- 
Bartc 

[toc] | [prev] | [next] | [standalone]


#14617

FromWillem <willem@toad.stack.nl>
Date2011-12-15 09:07 +0000
Message-ID<slrnjeje67.an6.willem@toad.stack.nl>
In reply to#14612
BartC wrote:
) I've no idea how to work these things out myself. But I've done a rough
) simulation, and in 10,000 years, there were only 4 years where there was a
) double birthday on less than 150 nights, and none on less that 140. So
) roughly 0.04%.
)
) Now I suppose you're going to say there was something funny about the
) restaurant, that it's used exclusively by people with the same birthday, or
) all different, or there's something that's going to be contrary to the
) theoretical probabilities.

I'll just say that you proved that even with a random distribution, you
can't be *certain* that the outcome of a given number of experiments will
be the number you expected by probability calculus.


SaSW, Willem
-- 
Disclaimer: I am in no way responsible for any of the statements
            made in the above text. For all I know I might be
            drugged or something..
            No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT

[toc] | [prev] | [next] | [standalone]


#14618

FromGeoff <geoff@invalid.invalid>
Date2011-12-15 02:07 -0800
Message-ID<a2hje7hcofpbk6gked01uo404rmc0dj5sv@4ax.com>
In reply to#14617
On Thu, 15 Dec 2011 09:07:19 +0000 (UTC), Willem
<willem@toad.stack.nl> wrote:

>BartC wrote:
>) I've no idea how to work these things out myself. But I've done a rough
>) simulation, and in 10,000 years, there were only 4 years where there was a
>) double birthday on less than 150 nights, and none on less that 140. So
>) roughly 0.04%.
>)
>) Now I suppose you're going to say there was something funny about the
>) restaurant, that it's used exclusively by people with the same birthday, or
>) all different, or there's something that's going to be contrary to the
>) theoretical probabilities.
>
>I'll just say that you proved that even with a random distribution, you
>can't be *certain* that the outcome of a given number of experiments will
>be the number you expected by probability calculus.
>
>

It's been said more than once in this topic. The certainty is applied
to the estimate of the probability, not to the actual outcome of any
number of experiments. You can be certain the probability is greater
than 50% at 23. 

You cannot be certain that any experiment will behave exactly that
way. The influence of skew on this calculation is not enough to alter
the calculus, leap year or rigging the source, the probability of the
outcome will still be greater than 50% whether it's 50.04% or 50.7%.
The dominant terms are the number of days in a year and the integer
number of people in the gathering.

The probability of a coin toss coming up heads on a fair coin is 1/2
and you can be certain of that calculation, but it is entirely
possible that you can get 10 tails out of 10 tosses and it doesn't
alter the probability of the next toss coming up heads.

Geeze, you guys are thick.

[toc] | [prev] | [next] | [standalone]


#14636

FromKeith Thompson <kst-u@mib.org>
Date2011-12-15 12:13 -0800
Message-ID<lnliqd61bh.fsf@nuthaus.mib.org>
In reply to#14618
Geoff <geoff@invalid.invalid> writes:
[...]
> It's been said more than once in this topic. The certainty is applied
> to the estimate of the probability, not to the actual outcome of any
> number of experiments. You can be certain the probability is greater
> than 50% at 23. 

How can you be *certain* of that with no information about
the distribution of birthdays?  (Unless you're assuming that a
non-uniform distribution is more likely to be biased in favor of
shared birthdays than against them; that might be a reasonable
point, but I suspect it's not the one you're making.)

[...]

> The probability of a coin toss coming up heads on a fair coin is 1/2
> and you can be certain of that calculation,
[...]

Yes, *if* you're given the premise that the coin is fair.  In the
original statement of the problem we're discussing, no such
assumption was made.

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
    Will write code for food.
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

[toc] | [prev] | [next] | [standalone]


#14639

FromGeoff <geoff@invalid.invalid>
Date2011-12-15 13:03 -0800
Message-ID<e5mke7dmg0h5ibvr7fvfoepe8vgeuu5tvs@4ax.com>
In reply to#14636
On Thu, 15 Dec 2011 12:13:06 -0800, Keith Thompson <kst-u@mib.org>
wrote:

>Geoff <geoff@invalid.invalid> writes:
>[...]
>> It's been said more than once in this topic. The certainty is applied
>> to the estimate of the probability, not to the actual outcome of any
>> number of experiments. You can be certain the probability is greater
>> than 50% at 23. 
>
>How can you be *certain* of that with no information about
>the distribution of birthdays?  (Unless you're assuming that a
>non-uniform distribution is more likely to be biased in favor of
>shared birthdays than against them; that might be a reasonable
>point, but I suspect it's not the one you're making.)
>

You can choose exceptional cases all day long but the most probable
case is the random assemblage case. Because in the classic Birthday
Problem the basic assumption is a randomly selected group or as more
classically introduced case, a class of students, where the
probability of two birthdays being the same might actually be
enhanced.

You are estimating the *probability* of the outcome, not calculating
the actual outcome in any particular case. 

The problem deals with a finite sample of a human population where
every human present *must* have a birthday and there is a finite set
of days in the year.

>[...]
>
>> The probability of a coin toss coming up heads on a fair coin is 1/2
>> and you can be certain of that calculation,
>[...]
>
>Yes, *if* you're given the premise that the coin is fair.  In the
>original statement of the problem we're discussing, no such
>assumption was made.

... and there was no logical basis for deciding the assumption was not
made. You have assumed a negative where no information was provided.
Therefore a bias is introduced where no information supporting it
existed.

All of the assertions that the assumption was not made ignore the fact
that this is a classic problem introduced in exactly this way in basic
statistics and probability courses. I can remember this one from 1973
so it's not new and was always introduced as being estimated from a
random distribution. Even the classic analyses ignore leap years.

Even if you introduce leap years, at 23 people, the probability
becomes 50.69% instead of the classic 50.73% making it a certainty
that the *probability* of a match is greater than 50% regardless of
the outcome in any particular experiment. In fact, to negate the
probability you have to *choose* a sample deliberately, as in the case
of the NTBAC, and *choice* is not *probability*.

I the isolated case of the OP, the background information with respect
to random selection of the sample is lacking but it is still
recognizable as the birthday problem for which there is a classic
solution. 

[toc] | [prev] | [next] | [standalone]


#14640

FromSeebs <usenet-nospam@seebs.net>
Date2011-12-15 21:36 +0000
Message-ID<slrnjekq2k.2nar.usenet-nospam@guild.seebs.net>
In reply to#14639
On 2011-12-15, Geoff <geoff@invalid.invalid> wrote:
> On Thu, 15 Dec 2011 12:13:06 -0800, Keith Thompson <kst-u@mib.org>
> wrote:
>>How can you be *certain* of that with no information about
>>the distribution of birthdays?  (Unless you're assuming that a
>>non-uniform distribution is more likely to be biased in favor of
>>shared birthdays than against them; that might be a reasonable
>>point, but I suspect it's not the one you're making.)

> You can choose exceptional cases all day long but the most probable
> case is the random assemblage case.

Yes.

But the problem doesn't say "what do you think is the *likely* number
of people you need to reach a given probability", but "what number of
people are necessary for you to be *certain* of the probability".

If I have not taken sampling errors into effect, I am not *certain* of
the probability.

> Because in the classic Birthday
> Problem the basic assumption

Assumptions are not a kind of certainty.

> You are estimating the *probability* of the outcome, not calculating
> the actual outcome in any particular case. 

Right.  But the probability varies with the group from which the sample
was obtained!

> ... and there was no logical basis for deciding the assumption was not
> made. You have assumed a negative where no information was provided.

Failing to assume a condition is not the same thing as assuming a "negative".

You're assuming that the people are from a random sample.  Keith and I
are not making that assumption.  We're also not making the assumption that
they *aren't* from a random sample.  We're pointing out that you can't
be *certain* of the probability unless either you make assumptions about the
sample, or you have either 1 person or at least 367.  In any other case,
a probability estimate is going to rely on assumptions.

> All of the assertions that the assumption was not made ignore the fact
> that this is a classic problem introduced in exactly this way in basic
> statistics and probability courses.

I've never previously seen the wording with "be *certain* that the
probability is..." before.

	http://en.wikipedia.org/wiki/Birthday_problem

No reference to certainty.

So it is introduced in a *similar* way, but not in *exactly* this way.  And
that inexactitude is why I think the word "certain" could be reasonably taken
to be significant.

If the question were "before the probability is...", I'd agree, but it's
"before you can be certain that the probability is...", and that's a very
big qualifier.

> I the isolated case of the OP, the background information with respect
> to random selection of the sample is lacking but it is still
> recognizable as the birthday problem for which there is a classic
> solution. 

Well, that's the thing.  You're adding in information not provided as
part of the problem.

If someone gives you a badly-specified project, do you think the right
response is to recognize that it's similar to a well-known problem and solve
that without even considering the possibility that the subtle differences
in the specification are evidence that there's something unusual going
on?  I don't.  I always ask.

-s
-- 
Copyright 2011, all wrongs reversed.  Peter Seebach / usenet-nospam@seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
I am not speaking for my employer, although they do rent some of my opinions.

[toc] | [prev] | [next] | [standalone]


#14590

FromGeoff <geoff@invalid.invalid>
Date2011-12-13 16:35 -0800
Message-ID<62qfe7lnevljjcsq11dnnd3t33e0hhgiks@4ax.com>
In reply to#14586
On Tue, 13 Dec 2011 23:56:59 -0000, "BartC" <bc@freeuk.com> wrote:

>"Seebs" <usenet-nospam@seebs.net> wrote in message 
>news:slrnjef9k1.30f0.usenet-nospam@guild.seebs.net...
>> On 2011-12-13, BartC <bc@freeuk.com> wrote:
>
>>> and note the word "chance". With 23 people, the chance IS greater than 
>>> 50%,
>>> for certain.
>
>> Since it is obviously possible to come up with a sample space *selected 
>> for*
>> lack of duplicate birthdays, it is easy to have a room containing 366
>> people selected from a sample such that, no matter which 366 people you
>> pick, the chances are 0% that any have the same birthday, because if 
>> they'd
>> had the same birthday as another member of the sample, they wouldn't have
>> been in the sample.
>>
>> To be *certain* of a chance is not just to do the math with common
>> assumptions.
>
>So what *is* the probability that out of a group of 23 people, at least two 
>will share a birthday? Or any group of people smaller than 367? And how 
>certain are you of that figure?

To answer that question you must first calculate the probability that
the No Two Birthdays Alike Club (NTBAC) exists and then calculate the
probability that 23 members of it would be congregated for this
experiment.

The fact of the matter is that since the problem was expressed in the
category of probability and statistics and the implicit assumption is
that the congregation is a random sample of the general population of
"people" the special case need not be considered. Seebs is merely
trying to score points against what he admitted at the outset was a
spammer.

The probability equation applicable to the question won't change. The
correct answer is you can be certain the probability that any two
people in a gathering of 23 people or more will have the same birthday
is greater than 50% because the equation holds true regardless of the
outlying probability that your sample is skewed. The probability of
the NTBAC existing would merely add another term to the equation and
since the probability of the existence of the NTBAC is vanishingly
small it's influence on the problem is near zero. 

It's important to note that the certainty is applied to the
probability being greater than 50%, not to the probability of there
actually being a birthday match. The vanishingly small probability
that you have a congregation of a subset of the NTBAC would only make
the number 24 instead of 23, at best.
 
Pr = 1-(365!)/(365^n (365-n)!) * (1 - Ps)
where  
Pr is probability at least two with the same birthday
n is number of people
Ps is probability of sample being NTBAC members (skewed)
Ps is vanishingly small

[toc] | [prev] | [next] | [standalone]


#14593

FromSeebs <usenet-nospam@seebs.net>
Date2011-12-14 01:20 +0000
Message-ID<slrnjefu78.ach.usenet-nospam@guild.seebs.net>
In reply to#14590
On 2011-12-14, Geoff <geoff@invalid.invalid> wrote:
> Seebs is merely
> trying to score points against what he admitted at the outset was a
> spammer.

Not really; just pointing out that the way the question is phrased admits
a different interpretation of what the question is.  In particular, "certain"
is a rather strong claim.

> It's important to note that the certainty is applied to the
> probability being greater than 50%, not to the probability of there
> actually being a birthday match. The vanishingly small probability
> that you have a congregation of a subset of the NTBAC would only make
> the number 24 instead of 23, at best.

That depends on what you mean by "certain".  I would interpret it as meaning
"probability exactly unity".  In which case, the theoretical possibility
that the NTBAC exists is sufficient to make it "uncertain".  :)

-s
-- 
Copyright 2011, all wrongs reversed.  Peter Seebach / usenet-nospam@seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
I am not speaking for my employer, although they do rent some of my opinions.

[toc] | [prev] | [next] | [standalone]


#14591

FromKeith Thompson <kst-u@mib.org>
Date2011-12-13 16:44 -0800
Message-ID<lnaa6w6kyu.fsf@nuthaus.mib.org>
In reply to#14586
"BartC" <bc@freeuk.com> writes:
> "Seebs" <usenet-nospam@seebs.net> wrote in message 
> news:slrnjef9k1.30f0.usenet-nospam@guild.seebs.net...
>> On 2011-12-13, BartC <bc@freeuk.com> wrote:
>>> and note the word "chance". With 23 people, the chance IS greater than 
>>> 50%,
>>> for certain.
>
>> Since it is obviously possible to come up with a sample space *selected 
>> for*
>> lack of duplicate birthdays, it is easy to have a room containing 366
>> people selected from a sample such that, no matter which 366 people you
>> pick, the chances are 0% that any have the same birthday, because if 
>> they'd
>> had the same birthday as another member of the sample, they wouldn't have
>> been in the sample.
>>
>> To be *certain* of a chance is not just to do the math with common
>> assumptions.
>
> So what *is* the probability that out of a group of 23 people, at least two 
> will share a birthday? Or any group of people smaller than 367? And how 
> certain are you of that figure?

There is insufficient information to answer the question without
making further assumptions, in particular without knowing how the
23 people were selected.

If I were actually asked this question (say, in the course of a
job interview), I'd make any such assumptions explicit: "Assuming
that their birthdays are randomly distributed, and ignoring leap
years ...".  I might also discuss alternative answers; for example,
the probability is 100% if you have two people selected to have
the same birthday, and 0% if you have 366 people selected to have
distinct birthdays.

A random uniform distribution is no more valid than any other
distribution, and there are plenty of real-world circumstances in
which a uniform distribution is highly unlikely.

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
    Will write code for food.
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

[toc] | [prev] | [next] | [standalone]


#14592

FromSeebs <usenet-nospam@seebs.net>
Date2011-12-14 01:20 +0000
Message-ID<slrnjefueb.ach.usenet-nospam@guild.seebs.net>
In reply to#14591
On 2011-12-14, Keith Thompson <kst-u@mib.org> wrote:
> A random uniform distribution is no more valid than any other
> distribution, and there are plenty of real-world circumstances in
> which a uniform distribution is highly unlikely.

Consider, for instance, the distribution of digits in numbers.  A lot of
people are aware that the distributions of first digits are uneven; for
instance, if you took a list of "the populations of all cities in an
almanac", you would find that the first digits 1-4 were more heavily
represented than 5-9 by a fair margin.  On the other hand, if you looked
in the tens place of the same numbers, you'd probably find a very even
distribution of 0-9.

Now consider the question of the overall distribution of digits in a
large body of material.  Say, every digit anywhere in said almanac.
It should be obvious that some digits will be more common than others,
with 0 significantly less common than 1.

... Now, given that:  Take the pool of all the digits in a given almanac,
including repeated copies as separate entries in the pool.  Select two of
those digits at random.  What is the probability that they're the same?
It's not 1/10.

Real world sets are, quite often, NOT random.  In fact, random sets are
sort of an anomaly.  :)

-s
-- 
Copyright 2011, all wrongs reversed.  Peter Seebach / usenet-nospam@seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
I am not speaking for my employer, although they do rent some of my opinions.

[toc] | [prev] | [next] | [standalone]


#14619

FromJames Dow Allen <jdallen2000@yahoo.com>
Date2011-12-15 02:33 -0800
Message-ID<784b5cd3-7f5d-499a-9950-1e444abffca4@18g2000prn.googlegroups.com>
In reply to#14592
It's often overlooked that probability fundamentally
involves *ignorance* (ignoring some interpretations
of quantum mechanics).  For example, suppose I bet on the
Pass Line at a Craps Table and roll two dice.
Alice can see only a Five and will judge that my Passing is
very likely (6 or 2 on the other die win at once).
Bob can see only an Ace and judges Pass unlikely
(1 or 2 on the other die lose at once).  Carl and Donna
see neither and both dice respectively, and state other
probabilities.  All are correct -- all reflect their respective
ignorances.

Thus a question about the "certainty" of a probability
is poorly phrased.

On Dec 14, 8:20 am, Seebs <usenet-nos...@seebs.net> wrote:
> ... if you took a list of "the populations of all cities in an
> almanac", you would find that the first digits 1-4 were more heavily
> represented than 5-9 by a fair margin.

This is called Benford's law.

> On the other hand, if you looked
> in the tens place of the same numbers, you'd probably find a very even
> distribution of 0-9.

Nitpick:  '0' will be, by far, the most common ten's digit.
The published population of Casablanca is 3,027,000;
of Rangoon 4,350,000; Singapore 5,183,700, and so on.

James Dow Allen

[toc] | [prev] | [next] | [standalone]


#14626

Fromgwowen <gwowen@gmail.com>
Date2011-12-15 05:38 -0800
Message-ID<af51265f-1b6b-48d0-a132-38f66883de0a@y12g2000vba.googlegroups.com>
In reply to#14619
On Dec 15, 10:33 am, James Dow Allen <jdallen2...@yahoo.com> wrote:
> It's often overlooked that probability fundamentally
> involves *ignorance*

Or, alternatively, information. And even then, all you're describing
is the notion of conditional probability - that one's estimate of
probability is based on one's a priori information.

The probability of a given event is fundamentally the same for
everyone, but one's estimate of that probability is based on one's own
information.

P(win at craps betting on the pass line) does NOT vary (given fair
dice, etc).
P(win at craps betting on the pass line | information known by A,B,C,D
etc) *does* vary when the level of information varies.

[toc] | [prev] | [next] | [standalone]


#14741

FromThad Smith <ThadSmith@acm.org>
Date2011-12-18 23:34 -0700
Message-ID<jcmlta$5v2$1@speranza.aioe.org>
In reply to#14626
On 12/15/2011 6:38 AM, gwowen wrote:
> On Dec 15, 10:33 am, James Dow Allen<jdallen2...@yahoo.com>  wrote:
>> It's often overlooked that probability fundamentally
>> involves *ignorance*
...
> The probability of a given event is fundamentally the same for
> everyone, but one's estimate of that probability is based on one's own
> information.

Then the probability of having matching birthdays _in a given group_ is either 1 
or 0, depending on the actual birthdays.  To be certain it is greater than 50%, 
one must know the birthdays or know that there are enough people to guarantee it.

I agree with James that the question is poorly worded.  If the question were 
instead "How many randomly selected people must be gathered together in a room 
before there is a greater than 50/50 chance that at least two of
them have the same birthday?", the answer would be different.

Thad

[toc] | [prev] | [next] | [standalone]


#14601

FromBill Reid <hormelfree@gmail.com>
Date2011-12-14 07:07 -0800
Message-ID<aefa0884-5b06-49b1-9ead-51d6e7dad892@z12g2000yqm.googlegroups.com>
In reply to#14591
On Dec 13, 4:44 pm, Keith Thompson <ks...@mib.org> wrote:
> "BartC" <b...@freeuk.com> writes:
> > "Seebs" <usenet-nos...@seebs.net> wrote in message
> >news:slrnjef9k1.30f0.usenet-nospam@guild.seebs.net...
> >> On 2011-12-13, BartC <b...@freeuk.com> wrote:
> >>> and note the word "chance". With 23 people, the chance IS greater than
> >>> 50%,
> >>> for certain.
>
> >> Since it is obviously possible to come up with a sample space *selected
> >> for*
> >> lack of duplicate birthdays, it is easy to have a room containing 366
> >> people selected from a sample such that, no matter which 366 people you
> >> pick, the chances are 0% that any have the same birthday, because if
> >> they'd
> >> had the same birthday as another member of the sample, they wouldn't have
> >> been in the sample.
>
> >> To be *certain* of a chance is not just to do the math with common
> >> assumptions.
>
> > So what *is* the probability that out of a group of 23 people, at least two
> > will share a birthday? Or any group of people smaller than 367? And how
> > certain are you of that figure?
>
> There is insufficient information to answer the question without
> making further assumptions, in particular without knowing how the
> 23 people were selected.
>
The actual problem with you answering this question is that you
don't know how to solve it...

> If I were actually asked this question (say, in the course of a
> job interview), I'd make any such assumptions explicit: "Assuming
> that their birthdays are randomly distributed, and ignoring leap
> years ...".

To obfuscate the simple fact you don't know how to solve the
problem...your life strategy is "if you can't dazzle them with
brilliance,
baffle them with BS"...

> I might also discuss alternative answers; for example,
> the probability is 100% if you have two people selected to have
> the same birthday, and 0% if you have 366 people selected to have
> distinct birthdays.
>
Since the word "chance" was in the question, obviously the
question was how to perform stochastic calculations on an
assumed random distribution.  Since you don't know how to do
that, you waste the interviewer's time, just like you waste
the readers of this group's time...

> A random uniform distribution is no more valid than any other
> distribution, and there are plenty of real-world circumstances in
> which a uniform distribution is highly unlikely.
>
What is the chance that a comp.lang.c regular will waste
everybody's time by not answering a simple question but rather
re-iterate the return value of main()?  Hint: it is the same
chance that any two randomly-selected US race horses will
share the exact same official birthday...

> Keith Thompson (The_Other_Keith) ks...@mib.org  <http://www.ghoti.net/~kst>
>     Will write code for food.

Liar.  You will argue the chrome off a trailer hitch for food, and
maybe in the past there was a special place and enough spare money
to pay you to do that, and who knows, maybe in the future there will
continue to be some type of welfare system to support people like
you.
But just like the word "chance", the common-sense interpretation of
the word "code" implies that the "code" will do something useful
for mankind, and I honestly don't believe you have the capability
to perform useful work.

---
William Ernest Reid

[toc] | [prev] | [next] | [standalone]


#14545

FromKaz Kylheku <kaz@kylheku.com>
Date2011-12-13 06:55 +0000
Message-ID<20111212222727.210@kylheku.com>
In reply to#14540
On 2011-12-13, Seebs <usenet-nospam@seebs.net> wrote:
> On 2011-12-13, pete <pfiland@mindspring.com> wrote:
>> divya bisht wrote:
>>> How many people must be gathered together in a room, before you can be
>>> certain that there is a greater than 50/50 chance that at least two of
>>> them have the same birthday?
>
>>> Discuss Solution in link below
>
>> The probability that 23 random birthdays are all different is 0.492703
>
> So?
>
> First off, I'm not sure why so many people respond to the spammer.  Secondly,
> consider the wording:  Not before you would reasonably *assume* that there
> is a greater than 50/50 chance, but until you can be *certain* that there is a
> greater than 50/50 chance.
>
> The answer, of course, is 367.  With 366 people in a room, while it seems
> *extremely likely* that the chances are >50% that two share a birthday, that
> is not the case if it is the annual gathering of the No Two Birthdays Alike
> club.  The question does not promise that the people will be randomly
> selected with regards to birthdays.

This kind of assumption is reasonable for this type of academic puzzle problem.

"People in a room", not qualified in a way, is easily recognizeable
"exam-speak" denoting a "random sample from a population".

Any bias in the selection of the people introduces more information into the
problem, and therefore makes the solution harder.

If the examiner posing this problem to you wanted you to work harder, he would
supply more information.

I.e. "don't make it harder than it is." If a key assumption is not stated which
you think should be, just write it down and proceed.  Assume that the coin
being tossed is fair, that the people in the room are randomly selected, that
events are independent even if the question forgot to say, etc. If you think
a key assumption should have been made explicit, write it down and keep going.
If you're wrong, you may still get partial marks.

Examsmanship is not exactly the same thing as real-world problem solving,
where you are usually right to avoid jumping to conclusions and investigate to
get as much information as you can, if you have time.

[toc] | [prev] | [next] | [standalone]


#14551

FromSeebs <usenet-nospam@seebs.net>
Date2011-12-13 09:19 +0000
Message-ID<slrnjee4v8.2irh.usenet-nospam@guild.seebs.net>
In reply to#14545
On 2011-12-13, Kaz Kylheku <kaz@kylheku.com> wrote:
> This kind of assumption is reasonable for this type of academic
> puzzle problem.

That's quite likely, but...

> "People in a room", not qualified in a way, is easily recognizeable
> "exam-speak" denoting a "random sample from a population".

Yes.  But it's not what the questioner asked, and one of the things I look
for when I poke at brain teasers is people who question the "obvious"
assumptions -- as after all, that's one of the things that makes for a
good brain teaser.

I had a great deal of fun once with a very elaborate liars-and-truth-tellers
puzzle.  The question was "Can you, by asking a single non-compound question
of one person, find out reliably which path is safe?"

The answer, of course, was "no."

> Any bias in the selection of the people introduces more information into the
> problem, and therefore makes the solution harder.

Or possibly makes it completely trivial.  :)

> Examsmanship is not exactly the same thing as real-world problem solving,
> where you are usually right to avoid jumping to conclusions and investigate to
> get as much information as you can, if you have time.

Yes.  And neither is the same as answering brain teasers.  :)

-s
-- 
Copyright 2011, all wrongs reversed.  Peter Seebach / usenet-nospam@seebs.net
http://www.seebs.net/log/ <-- lawsuits, religion, and funny pictures
http://en.wikipedia.org/wiki/Fair_Game_(Scientology) <-- get educated!
I am not speaking for my employer, although they do rent some of my opinions.

[toc] | [prev] | [next] | [standalone]


#14561

Frompete <pfiland@mindspring.com>
Date2011-12-13 12:15 -0500
Message-ID<4EE78837.2A2C@mindspring.com>
In reply to#14540
Seebs wrote:
> 
> On 2011-12-13, pete <pfiland@mindspring.com> wrote:
> > divya bisht wrote:
> >> How many people must be gathered together in a room,
> >> before you can be
> >> certain that there is a greater than 50/50 chance
> >> that at least two of
> >> them have the same birthday?
> 
> >> Discuss Solution in link below
> 
> > The probability that 23 random birthdays are all different is 0.492703
> 
> So?

I made a mistake in the program.

This line:

    printf("The probability that %d "
        "random birthdays are all different is %f\n", 
        people, probability);

should have been written as:

    printf("The probability that %d "
        "random birthdays are all different is %f\n", 
        people, 1.0 - probability);

and the output should have been :

 The probability that 23 random birthdays are all different is 0.507297

intstead.

-- 
pete

[toc] | [prev] | [next] | [standalone]


#14564

Frompete <pfiland@mindspring.com>
Date2011-12-13 13:20 -0500
Message-ID<4EE79757.5BD4@mindspring.com>
In reply to#14561
pete wrote:
> 
> Seebs wrote:
> >
> > On 2011-12-13, pete <pfiland@mindspring.com> wrote:
> > > divya bisht wrote:
> > >> How many people must be gathered together in a room,
> > >> before you can be
> > >> certain that there is a greater than 50/50 chance
> > >> that at least two of
> > >> them have the same birthday?
> >
> > >> Discuss Solution in link below
> >
> > > The probability that 23 random birthdays are all different is 0.492703
> >
> > So?
> 
> I made a mistake in the program.

I had it right the first time, 
but I rewrote the whole thing anyway.

/* BEGIN output from new.c */

The probability that out of 23 random birthdays,
that at least two are the same is 0.507297

/* END output from new.c */


/* BEGIN new.c */

#include <stdio.h>

#define YEAR                365  /* 366 */
#define PROB_SOME_SAME      0.5
#define PROB_ALL_DIFFERENT  (1 - PROB_SOME_SAME)

int 
main(void)
{
    int days = YEAR;
    double probability = 1;
    int people = 1;
    puts("\n/* BEGIN output from new.c */\n");
    do {
        ++people;
        --days;
        probability *= 1.0 * days / YEAR;
    } while(probability > PROB_ALL_DIFFERENT);
    printf("The probability that out of %d "
        "random birthdays,\n"
        "that at least two are the same is %f\n", 
        people, 1 - probability);
    puts("\n/* END output from new.c */");
    return 0;
}

/* END new.c */


-- 
pete

[toc] | [prev] | [next] | [standalone]


#14594

FromPeter Nilsson <airia@acay.com.au>
Date2011-12-13 18:15 -0800
Message-ID<19bfb44b-e01d-4a35-910c-783738ee2fa4@d17g2000prl.googlegroups.com>
In reply to#14564
> pete wrote:
> I had it right the first time,
> but I rewrote the whole thing anyway.
> ...
> #define YEAR                365  /* 366 */

To nitpick, this is limiting people to those only born in non
leap years, or those only born in leap years. The general figure
is somewhere in between...

  #include <stdio.h>

  double P2(int f29, int oth, int n)
  {
    double p = 0;
    if (n == 0) return 1;
    if (oth < 365)
      p += (303. / 400 + 97. / 400 * 365 / 366)
         * (365 - oth) / 365 * P2(f29, oth + 1, n - 1);
    if (f29 < 1)
      p += 97. / 400 * 1 / 366 * P2(f29 + 1, oth, n - 1);
    return p;
  }

  double P(int n) { return P2(0, 0, n); }

  int main(void)
  {
    int n = 0;
    double p;

    do {
      p = P(++n);
      printf("%3d: %7.3f%%\n", n, 100 * (1 - p));
    }  while (1 - p < .5);

    return 0;
  }

--
Peter

[toc] | [prev] | [next] | [standalone]


Page 2 of 3 — ← Prev page 1 [2] 3  Next page →

Back to top | Article view | comp.lang.c


csiph-web