nxmndr
11-24-2004, 07:05 PM
I was reading Gambling Theory and Other Topics by Malmuth and there's an equation on p. 62 (attributed to Mark Weitzman) where it gives a formula for calculating the variance (and thus standard deviation) of the win rate from a hand history. The calculation it gives is (please forgive the ASCII equations throughout):
sigma^2 = (1/N) sum (X_i^2/T_i) - (U^2/N) sum T_i
where
sigma^2 is the variance
N is the total number of trials
X_i is the win of the ith trial
T_i is the duration of the ith trial
U is the average win rate for all trials; U = sum X_i/sum T_i
(All sums are from 1 to N.)
I just did the calculation and it occurs to me that this formula is in error. For starters, it should be clear that this equation has the wrong units! The variance given has units of dollars squared per hour (N is dimensionless, X_i is dollars, T_i is hours, and U is dollars per hour). The standard deviation, thus, would be the square root of this, which is not a reasonable physical quantity (it would be dollars per hour^(1/2)!).
The official definition of variance with respect to an arbitrary trial a_i with probability p_i and a mean mu is
sigma^2 = sum (a_i - mu)^2 p_i
We're interested in the win/loss _rate_, not the win, so using the above figures this would be:
sigma^2 = sum (X_i/T_i - U)^2 (T_i/sum T_i)
Simplifying this out, we get
sigma^2 = (1/T) [sum X_i^2/T_i - X^2/T],
where X = sum X_i and T = sum T_i (that is, the total win for all trials, and the total time taken by all trials, respectively).
I can reproduce the equation given in the book if you start with the variance formula written as (note: wrong):
sigma^2 = sum (X_i/T_i - U)^2 (T_i/N)
that is, treating the probability of each trial p_i = T_i/N. This isn't correct, since probability should be dimensionless.
Now the figure calculated from the equation given in the book will be correlated with the variance/standard deviation in the win/loss rate if each T_i is small compared to T (that is to say, if the differences between each T_i are not significant compared to T). But the square root of the figure it calculates is not the standard deviation in dollars per hour.
sigma^2 = (1/N) sum (X_i^2/T_i) - (U^2/N) sum T_i
where
sigma^2 is the variance
N is the total number of trials
X_i is the win of the ith trial
T_i is the duration of the ith trial
U is the average win rate for all trials; U = sum X_i/sum T_i
(All sums are from 1 to N.)
I just did the calculation and it occurs to me that this formula is in error. For starters, it should be clear that this equation has the wrong units! The variance given has units of dollars squared per hour (N is dimensionless, X_i is dollars, T_i is hours, and U is dollars per hour). The standard deviation, thus, would be the square root of this, which is not a reasonable physical quantity (it would be dollars per hour^(1/2)!).
The official definition of variance with respect to an arbitrary trial a_i with probability p_i and a mean mu is
sigma^2 = sum (a_i - mu)^2 p_i
We're interested in the win/loss _rate_, not the win, so using the above figures this would be:
sigma^2 = sum (X_i/T_i - U)^2 (T_i/sum T_i)
Simplifying this out, we get
sigma^2 = (1/T) [sum X_i^2/T_i - X^2/T],
where X = sum X_i and T = sum T_i (that is, the total win for all trials, and the total time taken by all trials, respectively).
I can reproduce the equation given in the book if you start with the variance formula written as (note: wrong):
sigma^2 = sum (X_i/T_i - U)^2 (T_i/N)
that is, treating the probability of each trial p_i = T_i/N. This isn't correct, since probability should be dimensionless.
Now the figure calculated from the equation given in the book will be correlated with the variance/standard deviation in the win/loss rate if each T_i is small compared to T (that is to say, if the differences between each T_i are not significant compared to T). But the square root of the figure it calculates is not the standard deviation in dollars per hour.