*Author

Offline coinichTopic starter

  • Hero Member
  • *****
  • Posts: 1557
  • Reputation Power: 19
  • coinich is a Blue Crawler starting to think about his first run.coinich is a Blue Crawler starting to think about his first run.coinich is a Blue Crawler starting to think about his first run.
  • Old to Elements
  • Awards: War #5 Winner - Team Aether
What Are the Odds? Hypergeometric Probability and You https://elementscommunity.org/forum/index.php?topic=7893.msg88472#msg88472
« on: June 11, 2010, 01:19:37 pm »
I hope this will be a bit helpful for some of you out there who, like me, lack the math skills to compute the probability of drawing the crucial 3 towers in my opening hand.  The answer is Hypergeometric Probability.  Don't run away yet, there's a handy calculator here for just this thing: http://stattrek.com/Tables/Hypergeometric.aspx

The calculator itself is simpler to use than you might think.
Population Size:  The number of cards in your deck.  Simple enough.
Sample Size:  The amount of cards you are drawing.  Usually 7 for the beginning of the game, but you can increase that to figure out how many extra turns as well it will take.
Number of Successes in Population:  Total number of cards you want to draw.
Number of Successes in Sample:  Amount of the card you want to draw.

It will then give four outputs.
Hypergeometric Probability (P X=1):  Simply put, the probability that you will draw your Number of Successes in the Sample Size, exactly, no ifs, ands, or buts.
Cumulative Probability (P X<1):  The chance that you will draw less than 1 (1 in this case, its technically the Number of Successes in Sample) of your wanted card.
Cumulative Probability (P X<=1):  The chance that you will draw less than or equal to 1 (1 in this case, its technically the Number of Successes in Sample) of your wanted card.
Cumulative Probability (P X>1):  The chance that you will draw greater than 1 (1 in this case, its technically the Number of Successes in Sample) of your wanted card.  Note that the probability of drawing 1 card is NOT included in this number.  For that, see below.
Cumulative Probability (P X>=1):  The chance that you will draw greater than or equal to 1 (1 in this case, its technically the Number of Successes in Sample) of your wanted card.

As one example, I'm going to dig up the scenario where I want to see what the probability of drawing at least 1 Sundial in my opening hand in my old Dive deck.  Therefore, I fill it out like so.
Population: 30
Sample: 7
Number of Successes in Population: 3
Number of Successes in Sample: 1

The answer was slightly surprising.
Hypergeometric Probability (P X=1):  ~.436, or roughly 44%.  44% chance of drawing a Sundial in my opening hand.
Cumulative Probability (P X<1):  Also ~.436/44%.  Basically, an equal chance of drawing 1 or 0 Sundials
Cumulative Probability (P X<=1):  ~.872/87%.  This number is rather useless as this scenario does not guarantee a Sundial despite the high probability shown.
Cumulative Probability (P X>1):  ~.128/13%.  I have a 13% of drawing more than 1 Sundial in my first hand.
Cumulative Probability (P X>=1):  ~.564/56%.  This is the stat I'm specifically asking about.  I now know I have a 56% chance of drawing at least one Sundial in my opening hand.  Not bad, but not good.

This is another example but with Quantum Towers and my Sloth Poison deck; its not particularly necessary and is just another example with the numbers changed.

Population: 60.  Its a big deck.
Sample: 7.  Still want to know about my opening hand.
Number of Successes in Population: 20.  1/3 of my deck are Towers, but that doesn't guarantee a 1 in 3 chance of drawing those Towers.
Number of Successes in Sample: 3.  I want to know the probabilities involved in drawing 3 or so Towers.

Hypergeometric Probability (P X=3):  ~.270/27%
Cumulative Probability (P X<3): ~.570/57%
Cumulative Probability (P X<=3): ~.841/84%
Cumulative Probability (P X>3): ~.159/16%
Cumulative Probability (P X>=3): ~.429/43%

End result, I have a 42% chance of drawing at least 3 Towers or more in my opening hand, but a 58% chance of drawing less.  Odds are not great, but good to know.  Hopefully this little post can be used, especially with QI to help design some better decks.

Also, if anyone feels my math is off or something like that, please call me out.  I'm reasonably sure about these numbers, but I was never great at statistics.

Thanks to Daxx for giving me the link months ago.


Part 2:  Graphs!

I finally got off my rear and coded up some 4D graphs to demonstrate the trends in the probability.  I don't think they reveal too much unexpectedly, but they are cool to look at.  Included in the program is a way to implement and properly use the mulligan rule, and plotting every single valid probability.  This is cumulative probability here, so one blue dot in roughly the spot of drawing 2 cards in a 30 card deck having say 5 of that card means that there is a blue probability (~10%?) of getting at least the required 2 cards.  Also, the color bar shows probability via percent; that 60 is a 60% chance of that event happening.

The first five figures are with mulligan on, using 12 pillars and showing stats for an opening hand.  The sixth image has mulligan disabled, pillar count unused, and the same opening hand.  Graph seven just calculates with mulligan, 12 pillars, out to the third card drawn, or ten total.











Disregard, improperly rendered graph


Offline avidteen13

  • Full Member
  • ***
  • Posts: 239
  • Reputation Power: 4
  • avidteen13 is a Spark waiting for a buff.
  • wah wuh wah wuh wahwuhwahwuwhah *explosion
Re: What Are the Odds? Hypergeometric Probability and You https://elementscommunity.org/forum/index.php?topic=7893.msg90768#msg90768
« Reply #1 on: June 13, 2010, 11:43:22 pm »
Zanz added a feature - the mulligan, I think it's called - so that you will never have a hand without pillars/towers.  Your odds of getting at least 3 towers in your last example are probably a little better, seeing as the calculator didn't through out the instances of drawing zero.
Why is my avatar URL not recognized???

Malduk

  • Guest
Re: What Are the Odds? Hypergeometric Probability and You https://elementscommunity.org/forum/index.php?topic=7893.msg90775#msg90775
« Reply #2 on: June 13, 2010, 11:50:21 pm »
Zanz added a feature - the mulligan, I think it's called - so that you will never have a hand without pillars/towers.  Your odds of getting at least 3 towers in your last example are probably a little better, seeing as the calculator didn't through out the instances of drawing zero.
That yellow thingy is false. It just shuffles again if you dont have any zero cost cards in your starting hand. And it shuffles again just once. If you dont have zero cost cards in the second attempt, boo hoo hoo for you.

Offline coinichTopic starter

  • Hero Member
  • *****
  • Posts: 1557
  • Reputation Power: 19
  • coinich is a Blue Crawler starting to think about his first run.coinich is a Blue Crawler starting to think about his first run.coinich is a Blue Crawler starting to think about his first run.
  • Old to Elements
  • Awards: War #5 Winner - Team Aether
Re: What Are the Odds? Hypergeometric Probability and You https://elementscommunity.org/forum/index.php?topic=7893.msg90889#msg90889
« Reply #3 on: June 14, 2010, 01:47:17 am »
True, I did forget about the mulligan feature, though thats only for towers and no cost cards; the calculator can be used for any card really.  Hmm, I wonder how that mathematically plays out.  Doesn't it simply redraw your hand?  Also, doesn't it activate only once?  Off the top of my head, it would be (Probability of at least X Cards in Hand) + (Probability of at least X Cards in Hand * Probability of 0 Cards in Hand).  I can't see that adding to much of a boost.  Anyone else a statistician?

Using that, assuming I replaced the no cost cards in Sloth Poison, and the same numbers (as long as the number of cards are respected), I get a new probability of drawing at least 3 towers at 45%, a 2% increase.  That doesn't sound right.

bojengles77

  • Guest
Re: What Are the Odds? Hypergeometric Probability and You https://elementscommunity.org/forum/index.php?topic=7893.msg91048#msg91048
« Reply #4 on: June 14, 2010, 05:17:48 am »
This could be a huge deckbuilding tool, as well as helpful in figuring out some type of algorithm to decide how many of each card to put in your deck, depending on how important they are. Bookmarking this bad boy!

unionruler

  • Guest
Re: What Are the Odds? Hypergeometric Probability and You https://elementscommunity.org/forum/index.php?topic=7893.msg92087#msg92087
« Reply #5 on: June 15, 2010, 04:36:01 am »
Yeah more people ought to pay attention to this. I always run hypogeometric calculations whenever im building generic anti FG rainbows. Key statistics to me are probability of 2 quantum towers or more in first 8 cards, probability of 1 hourglass or more in first 10 cards, and probability of 1 otyugh or more in first 10 cards. I'm too lazy to do the math whether I can actually play the otyugh there and then though.

PuppyChow

  • Guest
Re: What Are the Odds? Hypergeometric Probability and You https://elementscommunity.org/forum/index.php?topic=7893.msg92773#msg92773
« Reply #6 on: June 15, 2010, 10:55:22 pm »
I have an equation I use that's a bit more limited, but simpler to use :) . All it will tell you is the probability of drawing exactly one of a certain card which you have a certain amount of in a certain number of draws,

p = ( ( (t-c)! / (t-c-d)! ) / ( t! / (t-d)! ) )
p = Probability
c = Number of the type of card you're testing for in the deck
d = Number of cards you're drawing
t = Number of cards in the deck

It looks more complicated than it really is, since I can't use fraction bars :P .

So if I had six precognitions in a 30 card deck, and I wanted one in my hand of seven, then the probability would be:

p = 1-((30-6)!/(30-6-7)!) / ((30)!/(30-7)!)
p = 1-.17
p = .83
p = 83%




Offline harakirinosaru

  • Full Member
  • ***
  • Posts: 268
  • Reputation Power: 4
  • harakirinosaru is a Spark waiting for a buff.
  • New to Elements
Re: What Are the Odds? Hypergeometric Probability and You https://elementscommunity.org/forum/index.php?topic=7893.msg99246#msg99246
« Reply #7 on: June 23, 2010, 02:54:12 pm »
I needed this. I knew about the calculator and vaguely how to use it but now it's more clear. +Karma and a bookmark.

Offline coinichTopic starter

  • Hero Member
  • *****
  • Posts: 1557
  • Reputation Power: 19
  • coinich is a Blue Crawler starting to think about his first run.coinich is a Blue Crawler starting to think about his first run.coinich is a Blue Crawler starting to think about his first run.
  • Old to Elements
  • Awards: War #5 Winner - Team Aether
Re: What Are the Odds? Hypergeometric Probability and You https://elementscommunity.org/forum/index.php?topic=7893.msg105882#msg105882
« Reply #8 on: July 01, 2010, 10:27:18 pm »
Alright, OP modified with graphs!  Have fun!

Offline Glitch

  • Legendary Member
  • ******
  • Posts: 3730
  • Reputation Power: 65
  • Glitch walks among the Immortals, legends and guardians of all time.Glitch walks among the Immortals, legends and guardians of all time.Glitch walks among the Immortals, legends and guardians of all time.Glitch walks among the Immortals, legends and guardians of all time.Glitch walks among the Immortals, legends and guardians of all time.Glitch walks among the Immortals, legends and guardians of all time.Glitch walks among the Immortals, legends and guardians of all time.Glitch walks among the Immortals, legends and guardians of all time.Glitch walks among the Immortals, legends and guardians of all time.Glitch walks among the Immortals, legends and guardians of all time.Glitch walks among the Immortals, legends and guardians of all time.Glitch walks among the Immortals, legends and guardians of all time.Glitch walks among the Immortals, legends and guardians of all time.
  • Awards: 1st Trials - Master of LifeElements Short Story Competition WinnerPoetry in the Spirit of Elements
Re: What Are the Odds? Hypergeometric Probability and You https://elementscommunity.org/forum/index.php?topic=7893.msg105904#msg105904
« Reply #9 on: July 01, 2010, 11:29:52 pm »
By the way, I love that site.  I use it all the tim =D

Smokefree

  • Guest
Re: What Are the Odds? Hypergeometric Probability and You https://elementscommunity.org/forum/index.php?topic=7893.msg107252#msg107252
« Reply #10 on: July 03, 2010, 11:56:14 pm »
Thanks Coin for taking the time to post and explain this calculator.
This is an awesome tool for the statistically challenged.

Selenbrant

  • Guest
Re: What Are the Odds? Hypergeometric Probability and You https://elementscommunity.org/forum/index.php?topic=7893.msg107287#msg107287
« Reply #11 on: July 04, 2010, 12:32:12 am »
First I have to say its nice to look at and you are able to see the trend its going. But there is no significant difference visible if you change your conditions by just 2-5. For that purpose(exact values) you can use tables I already made. However they arent able to tabulate the amount of information the 4D graph can. I would add tables for every "deck" requested.
http://elementscommunity.org/forum/index.php/topic,8295.msg102495#msg102495
(I dont want to "steal" your thread, but I think its a nice addition. Too I already added a link to this site in my thread weeks ago.)

I cant zoom the pics by clicking on them at "imageshack.us". Is that my "fault" or is it not possible?

 

anything
blarg: