Variance, Part 3
"Hang on, Bee. I think I got something figured..."
—Wheeljack to Bumblebee, Robots in Disguise #9
In the previous part of these notes we've seen that the optimal amount of white cards in our deck is often the one that maximizes our chances of flipping exactly one white card in battle.
But, as this amount depends on our current value of Bold/Tough during each battle, there won't be one single ideal number. For example, with an aggressive deck, we might often attack with Bold 3 or more, but defend with no Tough. In a case like this, the number of white cards we need on attack is less than what we need on defense to take full advantage of the blue cards we splash (See Variance, Part 2).
In building our deck, we often need to find a good compromise between these conflicting objectives. In discussing how to do so, we've explicitly shown the probabilities of flipping exactly one white card for several values of Bold/Tough and a varying number of white cards in our deck (reproduced here in Figure 1). Given the range of Bold and Tough values we expect to have during the course of our game, we can identify the optimal amounts of white cards we should play to optimize our bonus in each individual case. This way, we also identify a range for the actual number of white cards we'll choose to play. The aim of these notes is to provide a very simple rule for these optimal numbers.
First write-up: Oct 13, 2019
Wheeljacks's Golden Rule (WGR): The highest probability to flip exactly one white card occurs when the number of white cards in a deck is approximately the deck size divided by (4 + Bold or Tough).
Example: With no Tough, and a 40-card deck, we might want to play about 10 white cards. With Bold 6, that number is reduced to 4. Notice the agreement between these predictions and the positions of the peaks in Figure 1. The following table shows the optimal numbers predicted by the rule for Bold or Tough up to 6. Remember that, the lower the count of Bold/Tough, the wider the pseudo-plateau around the optimal number, and therefore, the larger the freedom we have in going above or below the recommended number without really worsening our chances.
Appendix: Proof of the rule
Unfortunately, a proof of this rule based only on probability theory would be rather lengthy, and wouldn't provide any further insight. A calculus shortcut allows us to keep it contained, and showcases a rather general procedure for probability maximization. We follow this second approach here, but invite the reader unfamiliar with calculus to skip it. The term shortcut is used here as a reminder that, in using calculus, we extend the integers representing the number of cards in our deck to real numbers during the intermediate steps of the proof.
Proof: We've already seen that, as long as we don't flip too many cards from the top of our deck, probabilities with replacement are a good approximations of exact results (see Blowpipe). In this case, our approximated probability P of flipping exactly one white card is:
P ( exactly 1 white card ) ≈ ( 2 + Bold or Tough ) PW ( 1 − PW )3+Bold or Tough ,
where the probability of flipping a white card off an individual flip, PW ≈ nW/n , is simply approximated with the relative number of white cards in the deck.
This approximation is represented by a dashed line in Figure 2, and compared to its exact counterpart. As Bold/Tough increases, Wheeljack's approximation starts showing its limits, and the error it induces can be as large as 5% at the peak of the curve for Bold or Tough 6. But the relevant aspect of the approximation is that it doesn't affect the (horizontal) position of the peak. Therefore, we can safely use it to find the relationship we seek between the value of Bold/Tough, and the optimal value of nW . It is possible to show that the rate of change of P (i.e. its derivative, in the aforementioned calculus shortcut) scales as
1 − ( nW / n ) ( 4 + Bold or Tough ) .
The rule simply follows from the observation that, when the maximum is reached, the rate of change of P is zero, and nW = n / ( 4 + Bold or Tough ) .