Re: Distribution and probability
- From: "mensanator@xxxxxxxxxxx" <mensanator@xxxxxxx>
- Date: 19 Feb 2006 16:00:18 -0800
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.
13746234145802811501267369720m = 100
n = 60
c = comb(m,n)
t = 2**100
print c
1267650600228229401496703205376print t
0.0108438667116379878586104157312print mpf(c)/mpf(t)
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 += comb(100,n)c = 0
for n in range(51,101):
583379627841332604080945354060t = 2**100
print c
1267650600228229401496703205376print t
0.4602053813064106192509364748789147692985print mpf(c)/mpf(t)
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
.
- Follow-Ups:
- Re: Distribution and probability
- From: Alun
- Re: Distribution and probability
- References:
- Distribution and probability
- From: Alun
- Re: Distribution and probability
- From: mensanator@xxxxxxxxxxx
- Distribution and probability
- Prev by Date: Re: safe limit ?
- Next by Date: Re: Cantorian pseudomathematics
- Previous by thread: Re: Distribution and probability
- Next by thread: Re: Distribution and probability
- Index(es):
Relevant Pages
|