0

In a game, I am looking to draw the hero card out of 9 possible cards. The first card (full deck) costs 300 gems. All subsequent draws cost 600 gems.

I can either keep drawing one card at a time till I hit the hero card or reset the game at any point. Once I get the hero card, I reset and try again till my gems run out.

Will it cost fewer gems to procure hero cards by drawing without replacement or resetting after each draw?

dimitriy
  • 35,430
Dro
  • 1

2 Answers2

3

The cost per hero is the same regardless of if/when you reset. Say you have a policy of resetting after the $n^{th}$ draw. The probability of drawing the hero on the $i^{th}$ draw is $\frac{1}{9}$, and the probability of drawing the hero for any given deck is $\frac{n}{9}$. For decks that you successfully draw the hero, the expected number of draws is $\frac{n+1}{2}$, 1 of which costs 300, and $\frac{n-1}{2}$ of which cost 600.

The expected cost per hero, then, is

$$\bigg[300+\frac{n-1}{2}600\bigg]\frac{9}{n}=2700$$

which does not depend on $n$.

We can check this with a quick simulation in R:

sapply(1:9, function(n) (300L + mean(sample(0:(n - 1L), 1e6, 1)*600L))*9L/n)
#> [1] 2700.000 2699.506 2701.024 2702.126 2699.152 2700.079 2696.858 2701.995 2699.398
jblood94
  • 1,459
0

It will cost the same whether you draw without replacement until you draw the hero card or you reset each time. However, resetting after any other number of draws will cost you more.

If you reset after $n$ draws, then:

  • The cost of each game you win (draw the hero) is $(300 + (n - 1) / 2 * 600)$
  • The cost of each game you lose (do not draw the hero) is $(300 + (n - 1) * 600)$
  • The probability of drawing the hero $n/9$, so the number of losses per win is $(9 - n) / n$

Therefore the expected cost per win is $(300 + (n - 1) / 2 * 600) + ((300 + (n - 1) * 600)) * (9 - n) / n$. This gives the following expected costs:

Draws before reset (n) Expected cost per win
1 2700.0
2 3750.0
3 3900.0
4 3825.0
5 3660.0
6 3450.0
7 3214.3
8 2962.5
9 2700.0

This result can be verified using the follow python code simulation:

import random

deck_size = 9 first_draw_cost = 300 cost_per_draw = 600

def game (runs, num_draws): wins = 0 total_cost = 0

for _ in range(runs):
    draw = random.randint(0, deck_size-1)
    if draw < num_draws:
        wins += 1
        total_cost += first_draw_cost + draw * cost_per_draw
    else:
        total_cost += first_draw_cost + (num_draws - 1) * cost_per_draw

if wins == 0:
    print(f'No wins with {num_draws} draws per game. Total cost {total_cost:0.2f}')
else:
    expected_cost = total_cost / wins
    print(f'Expected cost per win with {num_draws} draws per game: {expected_cost:0.2f} - {wins} wins')

runs = 1000000 for nd in range (1, 10): game(runs, nd)

Which produces the results:

Expected cost per win with 1 draws per game: 2710.37 - 110686 wins
Expected cost per win with 2 draws per game: 3746.81 - 222347 wins
Expected cost per win with 3 draws per game: 3905.17 - 332937 wins
Expected cost per win with 4 draws per game: 3834.44 - 443439 wins
Expected cost per win with 5 draws per game: 3662.88 - 555129 wins
Expected cost per win with 6 draws per game: 3448.85 - 666916 wins
Expected cost per win with 7 draws per game: 3213.03 - 777850 wins
Expected cost per win with 8 draws per game: 2959.09 - 889083 wins
Expected cost per win with 9 draws per game: 2699.62 - 1000000 wins
Lynn
  • 1,707