Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Rough approximation Re: ELO Calculations

Author: Eelco de Groot

Date: 15:05:26 04/26/05

Go up one level in this thread


On April 26, 2005 at 16:49:48, Eelco de Groot wrote:

>On April 26, 2005 at 14:41:25, Dieter Buerssner wrote:
>
>>Eelco, did you compare the numbers calculated with the approximation formula to
>>those given in the FIDE handbook? There was a larger difference than what you
>>have given as the error, when I tried it. I used a very accurate version of
>>erf() by Stephen Moshier (I think, 15 digits correct). I used the following
>>formulas:
>>
>>p = 0.5+0.5*erf(dp/400)
>>
>>and
>>
>>p = 1/(1+10^(-dp/400))
>>
>>p is the expected score, dp the rating difference. IIRC, USCF uses the later
>>formula based on the logistic distribution. In the center (rating difference
>>small), both formulas give practically identical values. In the tails, they
>>differ (not much in absolute terms, but significantly taken into relation). The
>>numbers given on the FIDE site where in between.
>>
>>Regards,
>>Dieter
>
>Hi Dieter,
>
>Are we talking about the same approximation formula? The elo-numbers that Odd
>Gunnar Malin computed for the Hastings formula came out pretty well compared to
>what Excels own approximation of the normal distribution would give.
>
>http://www.talkchess.com/forums/1/message.html?422011
>
>And Hastings best approximation could be found in the manuals for both Casio's
>and Texas Instruments programmable calculutors. (I have the Casio manual that
>came with my FX-501P calculator, bought that in 1980, it had no less than 128
>programmable steps!) This approxiation is probably around since the 1950's but
>for calculator use (8 digits or thereabout) it should work well enough.
>
>Regards, Eelco

These are some numbers that I just got with Hastings approximation in Excel '97
Visual Basic, compared with Excel's STAND.NORM.VERD:

x               phi(x)Hastings  STAND.NORM.VERD    Exact(*)
1	        0,841344555	0,84134474
0	        0,499999429	0,5                0,5
0,1	        0,539827365	0,539827896        0,539827837277029
0,2	        0,579259199	0,579259687
1,3333333	0,908788608	0,908788713
2	        0,977249913	0,977249938
2,5	        0,993790314	0,99379032
3	        0,998650031	0,998650033
3,5	        0,999767326	0,999767327
4	        0,999968314	0,999968314

In Dutch we use a comma instead of a decimal point, Standaard Normaal Verdeling
is Standard Normal Distribution. Curiously around zero the discrepancy between
the twoseems largest, phi(0) should of course be 0.5

I put in the following macro:

Function phi(x) As Double
  Dim sndf, t As Double
  p = 0.2316419
  c1 = 0.31938153
  c2 = -0.356563782
  c3 = 1.78147937
  c4 = -1.821255978
  c5 = 1.330274429
  Pi = 3.14159265358979
  sndf = Exp(-(x * x) / 2) / Sqr(2 * Pi)
  t = 1 / (p * x + 1)
  phi = -((((c5 * t + c4) * t + c3) * t + c2) * t + c1) * t * sndf + 1
End Function


(*)Exact value as given here
http://math.uc.edu/~brycw/preprint/z-tail/z-tail.htm that also mentions Hastings
approximation accredited to a TI manual.

So, an erf() implementation with 15 decimal accuracy is undoubtedly better, but
for the elo list this at least is better that what FIDE seems to think is the
Normal Distribution, if that in fact is what they are using :)

Regards, Eelco



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.