I don't understand much from those statistic methods, but just looking at your last code there is something strange, maybe there is a typo or maybe you must really explain for some novice like me.
I'm looking at your function TrivialLLR below, and specifically at the comment and conditions that none of L,D,W can be zero:
Code: Select all
from __future__ import division ... def TrivialLLR(W,D,L,elo0,elo1): """ This function computes the log likelihood ratio of H0:elo=elo1 versus H1:elo=elo1 under the trinomial (w/d/l) logistic model. W/D/L are respectively the Win/Draw/Loss count. For details see http://hardy.uhasselt.be/Toga/GSPRT_approximation.pdf """ # to avoid division by zero if W==0 or D==0 or L==0: return 0.0 N=W+D+L w,d,l=W/N,D/N,L/N s=w+d/2 m2=w+d/4 var=m2-s**2 var_s=var/N s0=LL(elo0) s1=LL(elo1) return (s1-s0)*(2*s-s0-s1)/var_s/2.0
On the other side, and this is more important to me, if we have W=0, D=1 and L=1 then we get var_s=0 and then a division by 0 (in the return of the function).
But for my intuition, the 2 cases are symmetric. For an ELO difference model I would not expect to see this different behaviour of the formula with respect to a division by 0.