x = Bookie's evaluated True odds as fraction 0.0->1.0
k = Bookie's chosen constant, we don't know this but need to solve for it
Bookie odds = 1/(x^k)
Code: Select all
kBestDiff = 9999999.0
kBest = 0.0
For k = 0.0 to 1.0:
Sum k th root of 1/Bookie odds
if abs(Sum-1.0) < kBestDiff:
kBest = k
kBestDiff = abs(Sum-1.0)
print "best fit k = " + kBest