Hi guys,
I found a formula to calculate the LOS at http://chessprogramming.wikispaces.com/Match+Statistics, basically it's LOS=(1/2)*(1+erf (x/sqrt 2)) where x is defined as score_difference/(N/(1-draw_ratio)) where N is the total number of games. This formula is supposed to be a good approximation when the number of games is large.
So I've tested a bit this formula with very few games (not more than 300) and then I tried to do it once for a large number of games, around 40 k games.
The data is the following (taken out directly from the fishtest, the LOS is supposed to be close to 17% according to the fishtest calculations):
. Note that in order to perform the calculations, I've kept more digits than the ones I've written here.
Conclusion: the LOS that I've calculated is totally off from 0.17...
What am I doing wrong?
mohzus wrote:Hi guys,
I found a formula to calculate the LOS at http://chessprogramming.wikispaces.com/Match+Statistics, basically it's LOS=(1/2)*(1+erf (x/sqrt 2)) where x is defined as score_difference/(N/(1-draw_ratio)) where N is the total number of games. This formula is supposed to be a good approximation when the number of games is large.
So I've tested a bit this formula with very few games (not more than 300) and then I tried to do it once for a large number of games, around 40 k games.
The data is the following (taken out directly from the fishtest, the LOS is supposed to be close to 17% according to the fishtest calculations):
. Note that in order to perform the calculations, I've kept more digits than the ones I've written here.
Conclusion: the LOS that I've calculated is totally off from 0.17...
What am I doing wrong?
They forgot a sqrt there in Wiki, and added useless draw ratio. "score_difference/(N/(1-draw_ratio))" should be score_difference/sqrt(N*(1-draw_ratio)). Number of draws is irrelevant:
LOS = (1 + erf[(wins - losses)/(2*(wins+losses))^0.5])/2
By the way, it's my formula.
In your particular case, the exact LOS is 0.176424329128482367, that Erf approximation is 0.176414.
Last edited by Laskos on Wed Jan 22, 2014 8:27 pm, edited 5 times in total.
mohzus wrote:Hi guys,
I found a formula to calculate the LOS at http://chessprogramming.wikispaces.com/Match+Statistics, basically it's LOS=(1/2)*(1+erf (x/sqrt 2)) where x is defined as score_difference/(N/(1-draw_ratio)) where N is the total number of games. This formula is supposed to be a good approximation when the number of games is large.
So I've tested a bit this formula with very few games (not more than 300) and then I tried to do it once for a large number of games, around 40 k games.
The data is the following (taken out directly from the fishtest, the LOS is supposed to be close to 17% according to the fishtest calculations):
. Note that in order to perform the calculations, I've kept more digits than the ones I've written here.
Conclusion: the LOS that I've calculated is totally off from 0.17...
What am I doing wrong?
They forgot a sqrt there in Wiki, and added useless draw ratio. "score_difference/(N/(1-draw_ratio))" should be score_difference/sqrt(N*(1-draw_ratio)). Number of draws is irrelevant:
LOS = (1 + erf[(wins - losses)/(2*(wins+losses))^0.5])/2
By the way, it's my formula.
In your particular case, the exact LOS is 0.176424329128482367, that Erf approximation is 0.176414.
Thanks for the correction. Can you review it again whether it is now correct? I am illiterate in statistics, and Edmund seems actually inactive as cpw editor.
Gerd Isenberg wrote:Thanks for the correction. Can you review it again whether it is now correct? I am illiterate in statistics, and Edmund seems actually inactive as cpw editor.
I don't have time to edit the wiki, but I'd like to make some remarks.
wiki wrote:This calculation becomes very inefficient for larger number of games. In this case the Normal Distribution can give a good approximation.
Well, the calculation can be done cleverly, and the Normal approximation is not really required.
It is important to note that LOS does not depend on the number of draws.
These calculations don't make a difference whether the game results were obtained when playing Black or White. It is a good approximation when the two players played the same number of games with each color.
mohzus wrote:Hi guys,
I found a formula to calculate the LOS at http://chessprogramming.wikispaces.com/Match+Statistics, basically it's LOS=(1/2)*(1+erf (x/sqrt 2)) where x is defined as score_difference/(N/(1-draw_ratio)) where N is the total number of games. This formula is supposed to be a good approximation when the number of games is large.
So I've tested a bit this formula with very few games (not more than 300) and then I tried to do it once for a large number of games, around 40 k games.
The data is the following (taken out directly from the fishtest, the LOS is supposed to be close to 17% according to the fishtest calculations):
. Note that in order to perform the calculations, I've kept more digits than the ones I've written here.
Conclusion: the LOS that I've calculated is totally off from 0.17...
What am I doing wrong?
They forgot a sqrt there in Wiki, and added useless draw ratio. "score_difference/(N/(1-draw_ratio))" should be score_difference/sqrt(N*(1-draw_ratio)). Number of draws is irrelevant:
LOS = (1 + erf[(wins - losses)/(2*(wins+losses))^0.5])/2
By the way, it's my formula.
In your particular case, the exact LOS is 0.176424329128482367, that Erf approximation is 0.176414.
Thanks for the correction. Can you review it again whether it is now correct? I am illiterate in statistics, and Edmund seems actually inactive as cpw editor.
Yes, now it seems correct, although I would explicitly show that the number of draws doesn't matter.
mohzus wrote:Hi guys,
I found a formula to calculate the LOS at http://chessprogramming.wikispaces.com/Match+Statistics, basically it's LOS=(1/2)*(1+erf (x/sqrt 2)) where x is defined as score_difference/(N/(1-draw_ratio)) where N is the total number of games. This formula is supposed to be a good approximation when the number of games is large.
So I've tested a bit this formula with very few games (not more than 300) and then I tried to do it once for a large number of games, around 40 k games.
The data is the following (taken out directly from the fishtest, the LOS is supposed to be close to 17% according to the fishtest calculations):
. Note that in order to perform the calculations, I've kept more digits than the ones I've written here.
Conclusion: the LOS that I've calculated is totally off from 0.17...
What am I doing wrong?
They forgot a sqrt there in Wiki, and added useless draw ratio. "score_difference/(N/(1-draw_ratio))" should be score_difference/sqrt(N*(1-draw_ratio)). Number of draws is irrelevant:
LOS = (1 + erf[(wins - losses)/(2*(wins+losses))^0.5])/2
By the way, it's my formula.
In your particular case, the exact LOS is 0.176424329128482367, that Erf approximation is 0.176414.
Thanks for the correction. Can you review it again whether it is now correct? I am illiterate in statistics, and Edmund seems actually inactive as cpw editor.
Yes, now it seems correct, although I would explicitly show that the number of draws doesn't matter.
For example if you tell the program that there is 1 win and 0 loss, the Rémi's program gives the value 0.75 while the formula on wiki programming gives 0.84.
For example if you tell the program that there is 1 win and 0 loss, the Rémi's program gives the value 0.75 while the formula on wiki programming gives 0.84.
The erf formula is an approximation that works well with large numbers of games. Using it with 1 win and 0 losses is not a good idea. But we are trying to answer questions about whether 10,000 games or 30,000 games is enough to get statistical significance, and that's done perfectly well by the erf formula.