Re: Distribution and probability




C6L1V@xxxxxxx wrote:
mensanator@xxxxxxxxxxx wrote:
Alun wrote:
Hi

Sorry for asking such a basic question, but I wonder if anyone can
point me in the right direction.

If something has a 50% chance of happening, then what is the chance of
it happening 60 times in 100 events.

0.0108438667116379878586104157312

Slightly more than 1%.

And why?

When your probability is 50%, you can use Pascal's triangle
to find the answer:

1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1
1 6 15 20 15 6 1
1 7 21 35 35 21 7 1
1 8 28 56 70 56 28 8 1

Note that in each row, the numbers sum to 2**row,
thus, row 8 sums to 256. Each number can be computed
by taking the combinations of m items n at a time:

m!/(n!)*(m-n)!

In row 8, m=8 and the numbers across represent n=0, n=1, etc.

In this example, the probability that 8 coins in a cigar box
will show exactly 4 heads when shaken & opened is found by
the number of 8 items taken 4 at a time (70) divided by the
total number of possible outcomes (2**8).

70/256 = 0.2734375 or 27.3%

Asking what the probability of getting 60 heads when 100 coins
are flipped is equivalent to asking for the ratio of the 61st entry
in row 100 of Pascals triangle divided by the sum of all the
numbers in row 100 of Pascal's triangle.

m = 100
n = 60
c = comb(m,n)
t = 2**100
print c
13746234145802811501267369720
print t
1267650600228229401496703205376
print mpf(c)/mpf(t)
0.0108438667116379878586104157312


What I'm looking for, you see, is to answer this question.

In a sequence of 100 events, what is the chance of achieving a
distribution that at ANY point in the cycle, ensures that a given
outcome is 1% ahead of its chance eg a coin toss that achieves 51%+

So how many of the 1267650600228229401496703205376
possible outcomes have 51 or more heads? We have to sum
C(100,51),C(100,52,C(100,53,C(100,54)...C(100,100).

This does not answer his _real_ question,

Drat, I hate when that happens.

which is the one about having
=51% (current) heads at least once at any point within 100 tosses (i.e.,
having at least 1 head in 1 toss, or failing that, 2 heads in two or
three tosses, or failing that, 3 heads in four or five tosses, etc.)
This was clarified in his second posting, although he did not put it
quite like that.

Yeah, the condition can be satisfied even if there are less
than 50 heads in the box of 100 coins depending on the
order you look at them.


R.G. Vickson


c = 0
for n in range(51,101):
c += comb(100,n)
t = 2**100
print c
583379627841332604080945354060
print t
1267650600228229401496703205376
print mpf(c)/mpf(t)
0.4602053813064106192509364748789147692985

46%

And this is also the probability that there are 49 or fewer heads.

And the probability that you get exactly 50 heads is slightly less
than 8%.



Note that because this can happen at any point to satisfy the criteria,
an outcome occurring in event one means that its met the criteria.

Can anyone explain to this non mathematician how to solve such a
conundrum?

Many thanks

Al

.



Relevant Pages

  • Re: What is wrong with this. (files)
    ... put the probability somewhat higher. ... statement has a 50% chance of being the problem. ... Either they will all come out heads, or they won't, so ... heads or tails. ...
    (comp.lang.c)
  • Re: A colleague possed a question.
    ... >> Then what is the probability of an event that can't occur and of an ... I'll have dispute that the possible outcomes are ... uncountably infinite. ... >of heads and tails happens. ...
    (sci.physics)
  • Re: Distribution and probability
    ... If something has a 50% chance of happening, then what is the chance of ... the probability that 8 coins in a cigar box ... total number of possible outcomes. ... Asking what the probability of getting 60 heads when 100 coins ...
    (sci.math)
  • Re: Generating electricity?
    ... Since nobody has disputed the meaning of what a 50% chance of success ... probability to real world observations. ... fair coin coming up exactly 5 heads or 100 fair tosses of a fair coin coming ... up exactly 50 heads. ...
    (rec.martial-arts)
  • Re: White Jury
    ... In message, Alex Heney writes ... possibilities, each of which is equally likely, ie a chance of 1 in 2. ... and the probability of each is 1 in 2. ... only the one under my right hand is heads, or only the one under my ...
    (uk.legal)