The following expands on the article by "Statman and GT". The derivation and formulas for "r" and "N" of the "NRS" (Non Random Shuffle) is done.Given:
d = total size of the shoe in number of cards (decks * 52)
k = size of a slug in number of cards
c = running count of this slug
q = size of segment slug is mixed into in number of cards (decks * 52)If you cut q to the top, you will need to calculate the true count throughout the playing of this segment. You will need to calculate r ( a multiplier) and N (a number of pseudo decks) and use the following equation:
TC = (rc+A)/(N-L/52)
where:
A is the normal running count, starting at zero at the top of the shoe.
L is the number of cards that have come out so far starting at zero at the top of the shoe.
rc is constant through out the play of the segment
N is a constant, number of pseudo decks. Articles on Shuffle Tracking saying to use q are not accurate!!!Here is the derivation of the formulas for 'r' and 'N':
Think of the cards from the slug as red, and the cards from q that are not in the slug as blue.
Let Xr equal the number of red cards that have come out so far given L.
Let Xb equal the number of blue cards that have come out so far given L.Notice that L = Xr+Xb
Xr = k/q * L
Xb = L-Xr = (q-k)/q * LLet Cr equal the count of the red cards that have come out so far.
Let Cb equal the count of the blue cards that have come out so far.Notice that A = Cr+Cb
Let Sdr equals the standard deviation of the red card count.
Let Sdb equal the standard deviation of the blue card count.>From Griffin's book:
Sdr = sqrt(ss/13 * Xr * (k-Xr)/k)
Sdb = sqrt(ss/13 * Xb * (d-k-Xb)/(d-k))ss is count dependent. For hi-low it is 10. It really doesn't matter for this derivation. It will cancel out.
The Normal Probability Curve for the red card count is:
Normal(Xr) = 1/(sqrt(2pi)Sdr) * e^(-(1/2)((Cr^2)/(Sdr^2)))
And the Normal Probability Curve for the blue card count is:
Normal(Xb) = 1/sqrt(2pi)Sdb) * e^(-(1/2)((Cb^2)/(Sdb^2)))
What we want to do is find the most likely Cr , given A. Cb is A-Cr, so this will also give us the most likely Cb.
To do this MAXIMIZE the product of these two probability curves and set the derivative, with respect to Cr, equal to zero:
Normal(Xr) * Normal(Xb) = 1/(2piSdrSdb) * (e^Y)
where Y is:
Y = -(1/2)(Cr^2/Sdr^2 + Cb^2/Sdb^2)
= -(1/2)(Cr^2/Sdr^2 + (A-Cr)^2/Sdb^2)
To maximize the product of the curves, we need to maximize Y. Taking the derivative with respect to Cr:
dY/dCr = -(1/2)[(2 Cr/Sdr^2 + 2(A-Cr)/Sdb^2(-1)]
= -Cr/Sdr^2 +A/Sdb^2 - Cr/SdbSetting dY/dCr equal to zero:
A/Sdb^2 = Cr/Sdr^2 + Cr/Sdb^2
A/Sdb^2 =( CrSdb^2 + CrSdr^2)/(Sdr^2Sdb^2)
A Sdr^2 = Cr(Sdb^2 + Sdr ^2)
Cr = A * (Sdr^2)/(Sdr^2 + Sdb^2)
This is the most likely red card count given A. The most likely blue card count is A-Cr!
Cb = A * (Sdb^2)/(Sdr^2 + Sdb^2)
Now that we have the most likely red and blue counts, given A, we can calculate the true count and hope to get it into the same format as shown above: TC = (rc + A)/(N- L/52)
If you know how much of A is Cr, and how much is Cb the true count calculation is as follows:
TC = rc/(N-L/52) + (52 * [Cr/(q-L) + (q-k)/q * Cb * 1/(d-k-L((q- k)/q))])
The red card contribution to the true count is Cr divided by the number of red cards left. This is then multiplied by the proportion of red cards in q. It reduces to what is shown.
The blue card contribution to the true count is Cb divided by the number of blue cards left. This is then multplied by the proportion of blue cards in q.
A/(N-L/52) = (52 * [Cr/(q-L)+(q-k)/q * Cb * 1/(d-k-L((q-k)/q))])
A/(N-L/52) = 52 * (A * (Sdr^2)/((Sdr^2 + Sdb^2) * (q-L)) + A * ((Sdb^2) * (q-k))/((Sdr^2 + Sdb^2) * q * (d-k- L((q-k)/q)))
A/(N-L/52) = 52 * A * [(Sdr^2)/((Sdr^2 + Sdb^2) * (q-L)) + ((Sdb^2) * (q-k))/((Sdr^2 + Sdb^2) * q * (d-k-L((q-k)/q)))
1/(N-L/52) = 52 * [(Sdr^2)/((Sdr^2 + Sdb^2) * (q-L)) + ((Sdb^2) * (q-k))/((Sdr^2 + Sdb^2) * q * (d-k-L((q- k)/q)))
We can rewrite this as 1/(N-L/52) = 52 * [X+Y]
and simplify X and Y separately.
X = (Sdr^2)/((Sdr^2 + Sdb^2) * (q-L))
X = (Xr (k-Xr)/k) / ((Xr (k-Xr)/k + Xb (d-k-Xb)/(d-k)) * q-L)
substituting Xr = k/q L and Xb = (q-k)/q L
This will reduce, eventually! to
X = [(d-k)k]/[kq(d-k) + q(q-k)(d-k) - k(d-k)L(q-k)^2]
Y = [(q-k)(Sdb^2)]/[q(d-k-Xb)(Sdr^2 + Sdb^2)]
Y = [(q-k)(Xb(d-k-Xb)/(d-k))]/[q(d-k-Xb)(Xr(k-Xr)/Xr + Xb(d-k-Xb)/(d- k))]
substituting for Xr and Xb in terms of q, k and L
This will reduce, eventually! to
Y = [(q-k)^2]/[kq(d-k) + q(q-k)(d-k) - k(d-k)L(q-k)^2]
substituting X and Y back in to our original equation
1/(N-L/52) = 52 * [X+Y]
1/(N-L/52) = 52 * [(d-k)k + (q-k)^2]/[kq(d-k) + q(q-k)(d-k) - k(d- k)L(q-k)^2]
dividing by the numerator gives us the equation in the form we are looking for!
= 52/(Z-L)
where Z = [(q ^ 2) (d-k)]/[((q-k)^2) + (k)(d-k)]
dividing by 52 gives us N, the number of pseudo decks.
N equals Z/52. Or if you count d, q and k in number of decks, in stead of number of cards N is eqaul to Z!
Now to calculate r, recall that
TC = (rc + A)/(N-L/52)
at L=0 TC = (rc)/(N)
We also know that the expected count in q is c plus an adjustment for the extra low cards from the rest of the shoe. This is well explained in the other articles on shuffle tracking. Here is the formula for that adjustment.
TC = -(c- (q-k)/(d-k)c)
we can put this all together:
TC at L=0 = (rc)/N = -[((c - (q-k)c/(d-k)))/q]
recall that c is the count of the slug, this term will drop out. Substituting for N:
r = -1 (N/q) (1 - (q-k)/(d-k))
Lets look at a quick example.
If you have a slug with a known count of -10 (rich in high cards) and it is 1 deck in length and mixed into three decks that you have cut to the top, then:
q = 3, k = 1, and c = -10;
N = [(q^2)(d-k)]/[(q-k)^2 + k(d-k)]
with 6 decks, d = 6 and
N = 5
r = -1 (N/q) (1-(q-k)/(d-k))
= -1
We start our running count at rc = 10, and divide by 5 decks for a true count of 2
We adjust the starting running count up and down as normal, dividing it by 5-L/52 where L is the number of cards that have come out so far. If you prefer to divide by the number of decks, like most people, divide by 5-L.
After you are done playing q, in other words after 3 decks (not 5!) have come out you will need to adjust the running count by -rc and calculate truecount by the actual number of decks left (starting at 3, at q = 3).