Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/28/24 09:55
basik85278
by basik85278. 04/28/24 08:56
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (SBGuy, Quad), 768 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Let do probability! #394567
02/14/12 15:30
02/14/12 15:30
Joined: Aug 2004
Posts: 1,305
New York
PrenceOfDarkness Offline OP
Serious User
PrenceOfDarkness  Offline OP
Serious User

Joined: Aug 2004
Posts: 1,305
New York
Hey guys, I'm currently working on a fun project and I need some help. Imagine if you will you have a bag of balls (lawl bag of balls) and in that bag of balls are 3 red balls 4 green ball 2 blue balls(LAWL) and 1 yellow balls. Also in this bag there are 55 other balls that can be any other color other then the once already mentioned. To keep things simple lets say the other 55 balls are black.

What I want to figure out is what is if I pick 7 balls at random what is the probability that I will pick at least one of each of the non black balls?

I was thinking I'd obviously have to use Multivariate Hyper-geometric Distribution. But then I realized that I think that might not work since Multivariate Hyper-geometric Distribution is usually used for determining an exact amount as oppose to an "at least" certain amount.

If we wanted to calculate the probability of picking exactly one of each and we were only picking 5 I think the equation would look like this:

NOTE: the c is short for choose which is used to represent a combination where order doesn't matter.

Code:
(4c1 * 3c1 * 2c1 * 1c1 * 55c1)/65c5



I was thinking to solve my question I could modify it to look like so:

Code:
4c1 * 3c1 * 2c1 * 1c1 * 61c3)/65c7


My reasoning behind is this: as long as one of each color is present we don't care what the other 3 picks are. Thinking about it it seems wrong to just add 6 to the last combination. Let me know what you guys think.[i][/i]

Last edited by PrenceOfDarkness; 02/14/12 15:31.

"There is no problem that can't be solved with time and determination." -me
prenceofdarkness for instant messages on AIM.

Looking for a model designer
PLEASE, SEND ME A PRIVATE MESSAGE OR EMAIL IF YOU'RE INTERESTED.
Re: Let do probability! [Re: PrenceOfDarkness] #394680
02/15/12 16:41
02/15/12 16:41
Joined: Aug 2004
Posts: 1,305
New York
PrenceOfDarkness Offline OP
Serious User
PrenceOfDarkness  Offline OP
Serious User

Joined: Aug 2004
Posts: 1,305
New York
lol, really that hard?


"There is no problem that can't be solved with time and determination." -me
prenceofdarkness for instant messages on AIM.

Looking for a model designer
PLEASE, SEND ME A PRIVATE MESSAGE OR EMAIL IF YOU'RE INTERESTED.
Re: Let do probability! [Re: PrenceOfDarkness] #394683
02/15/12 16:50
02/15/12 16:50
Joined: Feb 2009
Posts: 2,154
Damocles_ Offline
Expert
Damocles_  Offline
Expert

Joined: Feb 2009
Posts: 2,154
10 colored balls, 55 black balls (no white balls..)

Dont remember the probability stuff anymore in detail

But if you break it down, for 2 balls, it should be:

p1=10/55
p2=9/55*p1 + 10/54*(1-p1)
p2=0.2094 = 21% chance

or?

Re: Let do probability! [Re: Damocles_] #394684
02/15/12 16:57
02/15/12 16:57
Joined: Aug 2004
Posts: 1,305
New York
PrenceOfDarkness Offline OP
Serious User
PrenceOfDarkness  Offline OP
Serious User

Joined: Aug 2004
Posts: 1,305
New York
hey damocles.. you're still with this engine? Wow, your talent is going to waste here wink

Actually that wont be true because your calculating the exact probability of 2 balls, so if you wanted to do what your saying it's better to use the standard hypergeometric distribution. If you wanted AT LEAST 2 balls then your way unfortunately wouldn't work. I say unfortunately because that would of been soooo easy... sad face frown


"There is no problem that can't be solved with time and determination." -me
prenceofdarkness for instant messages on AIM.

Looking for a model designer
PLEASE, SEND ME A PRIVATE MESSAGE OR EMAIL IF YOU'RE INTERESTED.
Re: Let do probability! [Re: PrenceOfDarkness] #394685
02/15/12 17:03
02/15/12 17:03
Joined: Feb 2009
Posts: 2,154
Damocles_ Offline
Expert
Damocles_  Offline
Expert

Joined: Feb 2009
Posts: 2,154
Im wobbeling in the Forums a bit, most stuff I do is in Java currently.
(some small 4 kilobyte games in by signature)
But I do some trials in the engine sometimes.

---

But my calculation is the chance of picking at least 1 colored ball when doing 2 draws. (without putting the ball back)
Quote:
What I want to figure out is what is if I pick 7 balls at random what is the probability that I will pick at least one of each of the non black balls?


Wich can be continued to 7 balls in this manner)
Not the chance of drawing exact 2 colored balls.

I would have to look up the Math for probability distributions
to get a more fancy answer wink
Dont rememeber that stuff on the fly.

Re: Let do probability! [Re: Damocles_] #394687
02/15/12 17:16
02/15/12 17:16
Joined: Aug 2004
Posts: 1,305
New York
PrenceOfDarkness Offline OP
Serious User
PrenceOfDarkness  Offline OP
Serious User

Joined: Aug 2004
Posts: 1,305
New York
Do you have any idea where I should look? I don't even know where to start. I'm 99% sure this will be a variation of Hypergeometric Distribution. Multivariate is the closes I can get but it's not what I need because Multivariate consist of EXACT amount.

I'm having a tiny bit of trouble understanding you. Maybe you can explain how I could take it to 7 balls in this manner. You don't need to go for the fancy answer since I wouldn't want to be that big a bother.


"There is no problem that can't be solved with time and determination." -me
prenceofdarkness for instant messages on AIM.

Looking for a model designer
PLEASE, SEND ME A PRIVATE MESSAGE OR EMAIL IF YOU'RE INTERESTED.
Re: Let do probability! [Re: PrenceOfDarkness] #394689
02/15/12 17:21
02/15/12 17:21
Joined: Aug 2004
Posts: 1,305
New York
PrenceOfDarkness Offline OP
Serious User
PrenceOfDarkness  Offline OP
Serious User

Joined: Aug 2004
Posts: 1,305
New York
http://saliu.com/theory-of-probability.html#Trials

Quote:

8. The Probability (Odds) of Inseparable Events, Single Trial
The calculations are based on what I call exponential sets. The Birthday Paradox is a particular case of exponential sets. Such sets consist of unique elements and also duplicates. The unique part of an exponent is equal to the arrangements type of the set. The part with at least two elements equal to one another is the difference between exponents and arrangements.

In the probability problem of four dice, the Birthday Paradox parameters are: lower bound = 1, upper bound = 6, total elements (number of dice) = 4. The probability to get at least two dice showing the same point face when throwing four dice is: 0.7222 or 1 in 1.385. Easy to verify. Throw four dice. In almost three out of four rolls, at least two dice show the same face.

Also, the probability to get the four dice show the same point face is precisely calculated by using the exponential sets. A die has six faces — always! To get exactly 1-1-1-1 = 1/1296; the probability to get exactly 6-6-6-6 = 1/1296; the probability to get exactly 1-2-3-4 = 1/1296.

The pick 3, 4 lottery games should be considered forms of dice rolling — therefore inseparable phenomena. A drawing machine is a 10-face die. The pick 3 game is like casting three 10-faceted dice. The slot machines, by extension, are the equivalent of casting multi-faceted dice (usually three dice).

~ Another probability problem that pops up in forums and newsgroups and emails. A jar contains 7 red balls, 6 black ball, 5 green balls, and 3 white balls. We can construct a huge variety of probability problems with the 21 balls. For example, the probability to draw exactly 5 balls with this exact composition: 2 red, 2 black, 1 white. We must apply the hypergeometric distribution of each color.
- exactly 2 red of 5 drawn in 7 red from a total of 21 balls: 0.375645 (1 in 2.662)
- exactly 2 black of 5 drawn in 6 red from a total of 21 balls: 0.335397 (1 in 2.982)
- exactly 1 white of 5 drawn in 3 white from a total of 21 balls: 0.4511278 (1 in 2.217)
The combined probability is the product of the three: 0.056838 or 1 in 17.6.

How about the probability to draw 5 balls and get at least one ball of each color? Applying now the W option of SuperFormula.EXE (Win at least Lotto, Powerball):
- at least 1 red of 5 drawn in 7 red from a total of 21 balls: 0.9016 (1 in 1.109)
- at least 1 black of 5 drawn in 6 red from a total of 21 balls: 0.8524 (1 in 1.173)
- at least 1 green of 5 drawn in 5 green from a total of 21 balls: 0.7853 (1 in 1.273)
- at least 1 white of 5 drawn in 3 white from a total of 21 balls: 0.5789 (1 in 1.727)
The combined probability is the product of the four: 0.3494 or 1 in 2.86.



Idk, that seems wrong to me for some reason. Anyone else have a take on it? It just looks a bit too simple. Then again, no one said it had to be hard right? lol

Last edited by PrenceOfDarkness; 02/15/12 17:23.

"There is no problem that can't be solved with time and determination." -me
prenceofdarkness for instant messages on AIM.

Looking for a model designer
PLEASE, SEND ME A PRIVATE MESSAGE OR EMAIL IF YOU'RE INTERESTED.
Re: Let do probability! [Re: PrenceOfDarkness] #394690
02/15/12 17:23
02/15/12 17:23
Joined: Feb 2009
Posts: 2,154
Damocles_ Offline
Expert
Damocles_  Offline
Expert

Joined: Feb 2009
Posts: 2,154
Hm, before drawing number 3 there are 3 situations of ball combinations

8/55 ; 9/54 ; 10/53

after the draw

7/55 ; 8/54 ; 9/53 ; 10/52

where the first 3 have at least one colored ball

You have to somehow break the chance for each combination happening down.
Then you will see the systematics popping up.

Ok, I guess Im lost here too,

but Im not a math wiz, there are some math students here too,
please help out

Re: Let do probability! [Re: Damocles_] #394691
02/15/12 17:37
02/15/12 17:37
Joined: Aug 2004
Posts: 1,305
New York
PrenceOfDarkness Offline OP
Serious User
PrenceOfDarkness  Offline OP
Serious User

Joined: Aug 2004
Posts: 1,305
New York
Btw the reason I feel it's wrong is because all the separate probability stated in green are all dependent on each other and without replacement. I think what is said in the green text above would only work if I had 5 different sets of bags with the listed balls and I wanted to get one of each from each separate set. Does anyone agree or disagree with that way of thinking?


"There is no problem that can't be solved with time and determination." -me
prenceofdarkness for instant messages on AIM.

Looking for a model designer
PLEASE, SEND ME A PRIVATE MESSAGE OR EMAIL IF YOU'RE INTERESTED.
Re: Let do probability! [Re: PrenceOfDarkness] #394697
02/15/12 19:00
02/15/12 19:00
Joined: Mar 2006
Posts: 2,252
Hummel Offline
Expert
Hummel  Offline
Expert

Joined: Mar 2006
Posts: 2,252
Why don´t you write a little script which calculates reference results by randomly picking balls several million times?

Page 1 of 2 1 2

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1