Andy G
Italy Morbegno Sondrio

2nd turn for my opponent and it's deck is:
5x SCOUT 2x VIPER
What are the odds for him to draw BOTH the VIPERS?
Then, I'll post a trade row with a decision to take


Hmm, about 23.81%? (1  (5!/(7!/2!) + (5* 5!/(7!/3!)))  or something like that...)
Why is that important, though? Couldn't you just have posted the trade row?

Andy G
Italy Morbegno Sondrio

jhaelen wrote: Hmm, about 23.81%? (1  (5!/(7!/2!) + (5* 5!/(7!/3!)))  or something like that...)
Why is that important, though? Couldn't you just have posted the trade row?
because it was an under way BGG League game. I was considering wether not to delay the buying of a 4cost ship, hoping that my opponent only draws 3 scouts


There are 7!/5!/2! = 21 ways to choose 5 out of 7 cards.
How many of them have both Vipers in them? Well, if the two Vipers are in your hand, there are 5!/3!/2! = 10 ways to choose 3 out of the 5 remaining Scouts.
So the probability should be 10/21 = 47.62%

Scott Heise
United States San Jose California

A quick way to calculate odds like this is to use hypergeometric probabilities using the excel function HYPGEOM.DIST or a web tool like this: http://stattrek.com/onlinecalculator/hypergeometric.aspx
In this case:
Population size = deck size = 7 Number of successes in population = # of cards of interest in your deck (2 vipers) = 2 Sample size = # of cards you're drawing (hand size) = 5 Number of successes in sample (x) = # of cards of interest that you want to draw (both vipers) = 2
Putting these into excel or the web tool, and you'll find that the cumulative probability of x = 2 (draw both vipers) is 47.619%, just as Marcel pointed out. (Furthermore, the probability of drawing 0 or 1 viper in this scenario is 4.762% and 47.619%, respectively.)
It sounds complicated, but it's actually quite easy to use when you practice with it a bit and very powerful as well. It's useful in all kinds of Star Realms scenarios.
For example, say you buy two Patrol Mechs with your first two buys as player 2, and you want to know the probability that they'll be drawn together in Deck 2 and ally for the scrap (a big deal at the start of the game!).
In the first hand after the shuffle, you'll have 12 cards in your deck with 2 "successes", thus the probability of drawing 0/1/2 Patrol Mechs in this hand is 31.8%/53.0%/15.15%. Obviously, if you draw both here then you've hit the jackpot but the odds are not good. If you draw just 1, then you're out of luck and they won't combo this deck. If you draw 0, then you get another chance... in the second hand after the shuffle, you'll have 7 cards in your deck with 2 "successes" (coincidentally, the same mathematical scenario as the original 2 viper case), and the odds of drawing 0/1/2 Patrol Mechs here is 4.76%/47.62%/47.62%.
So ultimately, the odds of drawing both Patrol Mechs with either hand in Deck 2 would be 0.1515 + 0.318*0.476 = 0.303 = 30.3%. Not great odds, but if you're lucky and they ally together for the double scrap, then you've likely swung the game heavily in your favor right at the start. This is just one example of how the "luck of the draw" can really affect the outcome in Star Realms, and why even the best players have trouble breaking a 65% lifetime win rate.
Sorry for the long post, but I hope you found it interesting.


It's easier to look at the problem the other way around  having both vipers drawn into the hand means that the 2 cards left in the deck are both scouts.
The odds of picking 2 scouts to remain in the deck are 5/7 for the first (since 5 out of 7 cards are scouts), and then 4/6 for the second. Since both need to occur, the are actual probability is their multiplication: (5/7)*(4/6) = %47.619

Andy G
Italy Morbegno Sondrio

thanks all for your help!
particularly to
Scott Heise
United States San Jose California
: amazing post


Scott Heise, I also want to thank you for posting your detailed explanation. I'd recently been thinking about cardgame probabilities and your explanation seems like something I could put to use. I wonder if you might be able to help me on another Star Realmsrelated math problem.
Out of boredom (and addiction to the base iOS app) I often attempt to lock the easy computer opponent out of the game by making them discard their hand every turn; once I've achieved this, I can buy or scrap every card that remains in the trade row. Having bought everything, if I control both Blob World and Fleet HQ, I can attempt to achieve the maximum possible damage for the deck. It requires playing out all the green cards in the deck so that the number of cards drawn off Blob World is maximized.
I'd like to figure out what the equation would look like to determine the probability of drawing and playing all of your green cards before activating Blob World, given certain deck compositions and base compositions. Using the cards available in the base game, I figured on several variables:
Starting hand size: 59 5 being base hand size +1 for The Hive +1 for Central Office +1 or +2 for Brain World
Number of green cards: Ng0 = number of green cards in deck that do not draw cards when played Ng1 = number of green cards in deck that draw one card when played Ng2 = number of green cards in deck that draw two cards when played (Stealth Needle would be considered Ng2 if Mothership is in your deck, but it complicates the equation as it must be drawn and played after drawing and playing Mothership to maximize Blob World draws)
Number of blue draw2s: Nb2 = number of Command Ship and Embassy Yacht cards in deck
Number of nongreen cards: Nd1 = number of nongreen cards that replace themselves when played Nd0 = number of nongreen cards that do not draw cards when played
...
This doesn't properly take into consideration these trickier cards: 1) Recycling Station, which lets you dig into the deck but cannot be used in certain situations, making it difficult to figure out how it would affect this mathematical equation 2) Sacrificetodraw cards: Port of Call base, Battlecruiser and Imperial Frigate ships. They would only be sacrificed when your deck composition is in a certain state where the sacrifice would guarantee drawing into the last of your green cards. With the little bit of work I've done in thinking of an equation, Battlecruiser would be simplified as a nongreen draw one and Imperial Frigate would be simplified as a nongreen draw zero.
...
It's relatively easy to figure out what the maximum damage could be, once arriving at a final deck composition, but figuring out the probability of drawing the necessary cards in the appropriate order is much more complicated.
...
Whew, that was really nerdy.


