# Calculating Variance from Math Problem

I was reading this post here when one particular problem caught my attention for a while -

The banker shuffles a standard deck of 52 cards and slowly deals them face up. The dealt cards are left in full view where they can be inspected at any time by the player. Whenever the player wants, he may say "Red." If the next card is red, he wins the game, otherwise he loses. He must call red before the deal ends, even if he waits to call on the last card. What odds should the banker give to make it a fair game, assuming that the player adopts his best strategy on the basis of feedback form the dealt cards? The player must announce the size of his bet before each game begins.

Surprisingly from first glance, the EV is even for both banker and player, regardless of whatever strategy is used.

This got me thinking about using this game in a hypothetical casino, which charges say a 5% rake/commission per game. The casino would then have an expected value of +5% due to the rake.

Now, suppose the player uses the following strategy: Every time there are more black cards than red cards (even just one), the player calls "red". Obviously in the event there are more black cards than red cards, such a play would be the best and yield a positive EV for the player in that game (not for subsequent games obviously).

My question is twofold.

1) What is the likelihood of a deal never presenting an opportunity for the player to make this +EV play? (ie: how many deals will never at any time contain more black cards than red cards whilst being dealt).

Since answer 1 must be below 50%, this would indicate that the advantage gained from the strategy would be offset by the disadvantage incurred when there are only ever more red cards dealt before black cards.

2) Therefore, as a casino, what would your variance look like over say 100 deals? How would you calculate the standard deviation here from the long-term EV which would be +5% (since that is the rake we charge for play)? What would make a sufficiently large sample of plays for the casino to near the +5% EV (considering the law of large numbers)?

-
The number of paths from $(0,0)$ to $(n,n)$ which never go above the diagonal is the Catalan number $\frac{1}{n+1}\binom{2n}{n}$. For the probability that Black is never ahead, let $n=26$, and divide the Catalan number by $\binom{2n}{n}$. So the probability that Black is never ahead is $\frac{1}{27}$.
For the variance, we have here a Bernoulli trial with probability $p$ of success equal to $\frac{1}{27}$. The variance for any one trial is $p(1-p)$, and the variance over $n$ trials is $np(1-p)$.