PowerBASIC Forums
  Cafe PowerBASIC
  Dicing With Probability (Page 1)

Post New Topic  Post A Reply
profile | register | preferences | faq | search

UBBFriend: Email This Page to Someone!
This topic is 10 pages long:   1  2  3  4  5  6  7  8  9  10 
next newest topic | next oldest topic
Author Topic:   Dicing With Probability
Charles Pegge
Member
posted January 19, 2007 05:04 PM     Click Here to See the Profile for Charles Pegge     Edit/Delete Message   Reply w/Quote

A dice is thrown 5 times.

What are the probabilities of:

A: getting 3 ONEs in a row
B: getting a ONE 3 times only.
C. getting a ONE 3 times or more.
D. getting a single ONE, a single TWO and a single THREE in any order.
E. getting a single ONE, a single TWO and a single THREE in ascending order.

hint: Pascal's pyramid.

------------------
www.pegge.net

IP: Logged

Mel Bishop
Member
posted January 19, 2007 05:18 PM     Click Here to See the Profile for Mel Bishop     Edit/Delete Message   Reply w/Quote
Disregard my original answer. I misread and misunderstood the
question. But..

Added: it's the same thing as that old coin question: If you
flip a coin 10 times and, by some happenstance, it come up "heads"
all 10 times, what are the odds it will come up heads the 11th
time. Answer: 50/50.

------------------


[This message has been edited by Mel Bishop (edited January 19, 2007).]

IP: Logged

Charles Pegge
Member
posted January 19, 2007 05:39 PM     Click Here to See the Profile for Charles Pegge     Edit/Delete Message   Reply w/Quote
These are not trick questions, but you have to consider the
permutations very carefully. The insight gained is well worth
the effort.

------------------
www.pegge.net

IP: Logged

Michael Mattias
Member
posted January 19, 2007 06:38 PM     Click Here to See the Profile for Michael Mattias     Edit/Delete Message   Reply w/Quote
Please do your own homework.

IP: Logged

Charles Pegge
Member
posted January 19, 2007 06:56 PM     Click Here to See the Profile for Charles Pegge     Edit/Delete Message   Reply w/Quote
But I've gambled away my calculator.

------------------
www.pegge.net

IP: Logged

Charles Pegge
Member
posted January 20, 2007 12:52 PM     Click Here to See the Profile for Charles Pegge     Edit/Delete Message   Reply w/Quote
Some more clues:

A binomial probability distribution for 5 trials:

A=1/6

B=1-A

(A+B)^5=1

Using Pascals Triangle (A+B)^5 expands to:

1*(A^5) + 5*(A^4*B) + 10*(A^3*B^2) + 10*(A^2+B^3) + 5*(A*B^4) + 1*(B^5)

questions B to E involve the third term: 10 * ( A^3 * B^2 )

------------------
www.pegge.net

IP: Logged

Brad D Byrne
Member
posted January 20, 2007 04:23 PM     Click Here to See the Profile for Brad D Byrne     Edit/Delete Message   Reply w/Quote
">>>>If you flip a coin 10 times and, by some happenstance, it come up "heads"
all 10 times, what are the odds it will come up heads the 11th
time. Answer: 50/50...."

well there are many who say this,

how-ever experimentation shows (proves?) different

------------------
Washington DC Area
Borje's "Poff's" is likely the BEST tool for learning PB.. http://www.reonis.com/POFFS/index.htm
And a few PBTool's & Beginner Help:http://sweetheartgames.com/PBTools/JumpStart.html
& Another Good Resource: http://www.fredshack.com/docs/powerbasic.html

IP: Logged

David Roberts
Member
posted January 20, 2007 05:00 PM     Click Here to See the Profile for David Roberts     Edit/Delete Message   Reply w/Quote
quote:
how-ever experimentation shows (proves?) different

Where, Brad?

If the coin is unbiased then Mel is correct.

The probability of 11 consecutive heads is 0.5^11.

However, the probability of a head is 0.5 irrespective of its history. Coins don't have memories.

[This message has been edited by David Roberts (edited January 20, 2007).]

IP: Logged

Charles Pegge
Member
posted January 20, 2007 05:28 PM     Click Here to See the Profile for Charles Pegge     Edit/Delete Message   Reply w/Quote
Using a binomial you can answer questions like:

What is the probability of getting 4 heads in 11 flips of the coin ?

(H+T)^11 where H is 0.5 for heads and T=0.5 for tails.

in this case the 4th binomial term which we want is 165 * ( 0.5^4 + 0.5^7 )

Pascal's Triangle:
http://ptri1.tripod.com/

------------------
www.pegge.net

IP: Logged

Brad D Byrne
Member
posted January 20, 2007 05:46 PM     Click Here to See the Profile for Brad D Byrne     Edit/Delete Message   Reply w/Quote
Hi David,

yes I understand that each toss has 50/50 probabillity,
how-ever, practice shows that the total counts will represent a bell curve,
so, given any one-sided streak the expected results must be weighted in order to reflect
a truer prediction,

many argue this, but experimentation shows different

B.

------------------
Washington DC Area
Borje's "Poff's" is likely the BEST tool for learning PB.. http://www.reonis.com/POFFS/index.htm
And a few PBTool's & Beginner Help:http://sweetheartgames.com/PBTools/JumpStart.html
& Another Good Resource: http://www.fredshack.com/docs/powerbasic.html

IP: Logged

David Roberts
Member
posted January 20, 2007 09:18 PM     Click Here to See the Profile for David Roberts     Edit/Delete Message   Reply w/Quote
quote:
practice shows that the total counts will represent a bell curve

We don't need practice to show that.

If we consider 100 tosses then it is a simple matter to calculate the probability of getting only one head, two heads, three heads up to 100 heads. If we then plot the probabilities we get a bell curve without putting our hands in our pockets for a coin.

quote:
so, given any one-sided streak the expected results must be weighted in order to reflect a truer prediction

Not if the coin is unbiased. In maths if an assumption leads to a contradiction then the assumption is shown to be wrong. In Statistics we don't have contradictions we have doubt. A sufficiently long one-sided streak will cast doubt upon the assumption that a coin is unbiased. The value of sufficient depends upon the statistic being considered. A manufacturing process may be allowed to run longer before intervention than a process where life and death is involved.
quote:
but experimentation shows different

It shouldn't. If experimentation shows a significant difference to a statistical expectation then the maths involved in the statistical expectation is wrong.

IP: Logged

Brad D Byrne
Member
posted January 20, 2007 10:27 PM     Click Here to See the Profile for Brad D Byrne     Edit/Delete Message   Reply w/Quote
ok, David

ask this, if we flip 100 times and we get 80% heads,
(which can be likely)

then we flip 1000 times, it's likelier that we get closer to 50%, no?

then if we flip 10,000 times, it's very likely we are near 50%, correct?

well if so, then the correct math MUST show (somehow?) , that a one-sided
deviance from norm will ultimately balance out from the opposing-sided deviance

no?

added;
I used to play a lot of keno for fun! and actually won quite a bit of money on
a regular basis, I wrote a program to analyse the results from years of posted
game results, and it showed that most often a number which had 1 in 4 odds to hit
per game, would often streak misses for up to 11 to 17 times in a row, (I beieve that the
longest lost streak that I recorded was around 90, and shockingly after a long (12 or more)
miss streak, the number would seem to win better than 2 to 1 for the next 10 or so games!!

I spent quite a while trying to convince myself that my results were coincedental, but honestly
if you think about it, it must diviate the other way at some point, and anyway I and a friend
who pretty much had a photographic memory would beat the games almost everytime we played

------------------
Washington DC Area
Borje's "Poff's" is likely the BEST tool for learning PB.. http://www.reonis.com/POFFS/index.htm
And a few PBTool's & Beginner Help:http://sweetheartgames.com/PBTools/JumpStart.html
& Another Good Resource: http://www.fredshack.com/docs/powerbasic.html

[This message has been edited by Brad D Byrne (edited January 20, 2007).]

IP: Logged

James Graham-Eagle
Member
posted January 20, 2007 10:40 PM     Click Here to See the Profile for James Graham-Eagle     Edit/Delete Message   Reply w/Quote
Brad,

If you get 80 heads on the first 100 tosses then you have 60 more
heads than tails. If after 1000 tosses you still have 60 more
heads than tails, then you haven't "balanced" any "opposing-sided
deviance" yet the proportion of heads is now 530/1000 or 53%
which is certainly closer to 50%.

------------------

IP: Logged

Brad D Byrne
Member
posted January 20, 2007 10:58 PM     Click Here to See the Profile for Brad D Byrne     Edit/Delete Message   Reply w/Quote
Hi James, yes I understand the dilution, how-ever you must admit that
at some point the 60 diviation will diminish, no? and extremely likely
that it will happen in less than 1000 games (really closer to 500 imo)

------------------
Washington DC Area
Borje's "Poff's" is likely the BEST tool for learning PB.. http://www.reonis.com/POFFS/index.htm
And a few PBTool's & Beginner Help:http://sweetheartgames.com/PBTools/JumpStart.html
& Another Good Resource: http://www.fredshack.com/docs/powerbasic.html

IP: Logged

David Roberts
Member
posted January 20, 2007 11:33 PM     Click Here to See the Profile for David Roberts     Edit/Delete Message   Reply w/Quote
OK, Brad

> ask this, if we flip 100 times and we get 80% heads,
> (which can be likely)

No, it cannot. 8 out of 10, yes but not 80 out of 100.

For the sake of argument I'll agree.

> then we flip 1000 times, it's likelier that we get closer to 50%, no?

I agree.

> then if we flip 10,000 times, it's very likely we are near 50%, correct?

I agree with that also.

Actually, my agreeing to the last two is why I disagreed with the first one. Your argument would have been better had you started with 8 out of 10 as that is not particulary unusual.

Anyway, a small point so I'll say I agree so far.

> well if so, then the correct math MUST show (somehow?) , that a one-sided
deviance from norm will ultimately balance out from the opposing-sided deviance

>no?

I agree with that as well.

However, the information is of no use to us because we cannot know when that balance will occur.

If we could make any use of it in the near future then we have not got a random process. Near future accurate predictions are to be found in chaotic processes, not random processes.

So, to your experience with keno. You were lucky, plain and simple. If I examined the stats I may well find that it was unusual but I very much doubt that it would be statistically significant.

A long lived trend does not tell me that a shift in the opposite direction is imminent, it tells me that something is wrong with the mechanics or the mechanics are not random.





IP: Logged


This topic is 10 pages long:   1  2  3  4  5  6  7  8  9  10 

All times are EasternTime (US)

next newest topic | next oldest topic

Administrative Options: Close Topic | Archive/Move | Delete Topic
Post New Topic  Post A Reply
Hop to:

Contact Us | PowerBASIC BASIC Compilers

Copyright © 1999-2006 PowerBASIC, Inc. All Rights Reserved.


Ultimate Bulletin Board 5.45c