1

With a game like Magic the Gathering, I can use a hypergeometric calculator to determine the probability of getting a specific card after so many draws. What I would like to know is how you determine the probability of drawing into a combo (for the discussion that follows, I'm only considering combos that consist of two cards) after so many turns.

Say I have a standard deck of 60 cards with 24 lands and 36 other cards. Each of these other cards have a powerful synergy with another card, making 18 combos possible in the deck. What is the probability of getting at least one of these combos, that is having the two combo cards in your hand, in 3 turns, 6 turns, etc.? I don't care which combo it is, just that I have one in hand.

1
  • 1
    Probability questions are more suited to the math stack exchange than here, even if it's inspired by Magic. Not that we can't answer the question, but you'll probably get better and faster answers there Commented Oct 6, 2018 at 21:24

2 Answers 2

1

Alright, I finally have the time to give this an actual answer. Unfortunately, the board game stack exchange doesn't support Mathjax, so this won't be as nice to read as it could be.

In a set of only matched pairs (which is not the deck described, but give me a minute), the probability of drawing at least one pair in a hand of N cards is equal to 1 - P(no pairs).

If you're drawing cards in sequence trying to get no pairs in a deck of D cards, the first card can be any of the N cards (P = D/D), the second card can be any of the remaining cards except the paired card (P = D-2/D-1), the third card can be any remaining except the two paired cards (P = D-4/D-2), etc.

In other words, P(no pairs in a hand of N cards from a deck of D cards) = (D!!/(D-N)!!) / (D!/(D-N)!), or (D!!*(D-N)!)/(D!*(D-N)!!), where !! is the double factorial function (not a factorial of a factorial)

Which is great, except that if you draw a land there is no matching pair at all. The easiest way to deal with this is to find the probability of drawing N non-land cards in a hand of 7 cards (or 8 cards, or whatever hand size you're looking for), multiply that by the probability of a pair in N cards, and then sum over all the values of N.

The probability of drawing N non-land cards in hand of 7 cards in a deck of 36 non-lands out of 60 cards is C(N,36)*C(7-N,24) / C(7,60)

So the total probability of drawing any pair in a hand of H cards in 60 card deck with 24 lands is

Sum(from n=1:H, C(n,36)*C(H-n,24) / C(H,60) * (1 - (36!!*(36-n)!)/(36!*(36-n)!!)))

Total probabilities for a hand of:
5 cards: 10.0 %
6 cards: 14.8 %
7 cards: 20.3 %
8 cards: 26.3 %
9 cards: 32.8 %
10 cards: 39.5 %
11 cards: 46.3 %
12 cards: 53.9 %
13 cards: 59.5 %

Of course, this doesn't factor in the odds of getting the lands you need to play your combo, or using mulligans to improve your odds. And the odds become a lot trickier to calculate if any of the combo pieces overlap (if, for example, you have 4 copies of the same card in your deck, or one card that combos with two different cards.)

1
  • 1
    Re "Of course, this doesn't factor in...", It gets easier to write a computer simulation really fast :)
    – ikegami
    Commented Oct 8, 2018 at 7:26
0

Goal: Probability of having either two-card combos (no overlap) in hand

Parameters:

  • 4 of each card
  • 60-card deck
  • No consideration for mana
  • No mulligans
  • You are the first player

Simulation:

#!/usr/bin/perl

use strict;
use warnings;
use feature qw( say );

use List::Util qw( shuffle );

sub mulligan {
   return 0;
}

sub match {
   return 1 if ( grep { $_ eq 'C1a' } @_ ) && ( grep { $_ eq 'C1b' } @_ );
   return 1 if ( grep { $_ eq 'C2a' } @_ ) && ( grep { $_ eq 'C2b' } @_ );
   return 0;
}

{
   my $N = 100_000;
   my $max_turns = 5;
   my $is_first_player = 1;
   my @initial_deck = ( ('C1a') x 4, ('C1b') x 4, ('C2a') x 4, ('C2b') x 4 );
   push @initial_deck, ('X') x (60-@initial_deck);

   my @matches_by_turn;
   for my $n (1..$N) {
      my $starting_hand_size = 7;
      my @deck;
      my @hand;
      while (1) {
         @deck = shuffle(@initial_deck);
         @hand = splice(@deck, 0, $starting_hand_size);
         last if !@hand || !mulligan(@hand);
         --$starting_hand_size;
      }

      my $match = 0;
      for my $turn (0..$max_turns-1) {
         if (!$match) {
            push @hand, shift(@deck) if $turn || !$is_first_player;
            $match = match(@hand);
         }

         ++$matches_by_turn[$turn] if $match;
      }
   }

   for my $turn (0..$max_turns-1) {
      say sprintf('Turn %s: %5.1f%%',
         $turn+1,
         $matches_by_turn[$turn] / $N * 100,
      );
   }
}

Output:

Turn 1:  27.7%
Turn 2:  34.4%
Turn 3:  41.1%
Turn 4:  47.6%
Turn 5:  53.7%

Output:

Turn 1:  27.9%
Turn 2:  34.5%
Turn 3:  41.1%
Turn 4:  47.4%
Turn 5:  53.4%

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .