I'm working off Safe Leads and Lead Changes in Competitive Team Sports and trying to apply the same techniques to baseball scores, using number of outs remaining instead of the number of seconds. I'm pretty far out of my depth reading the paper so I'm just cherry-picking the algorithms that look right and trying to use them with baseball data. I get a pretty reasonable curve (similar to Figure 16 in the paper), but as the game gets more safe, the erf(v) curve overestimates the probability the lead is safe by a few percentage points (I wouldn't mind if it underestimated a little). Here's a picture: the red triangles are the observed values, and the black line is the erf(z) curve; the hand-drawn blue line is roughly what I wish the erf(z) curve looked like.

data and desired curve

Is there a way to make my curve fit the data better, either by applying some additional transformation to the result of erf(z) or using something other than erf in the first place? Preferably also something easy to implement in Java (for my Android app).

If you want to examine the data yourself:


It's not a good idea to take data and say "what functions might fit this" -- you can't account for the "researcher degrees of freedom" in this.

Worse, when you ask large numbers of experts you're potentially adding a large number of potential "guesses" but the only ones you will hear about are the "ones that work", so you can't hope to guess at the effective degrees of freedom used by asking our thoughts on your data.

(A less biased way to do this would be to randomly choose a fraction of your points, post those, then fit the parameters and assess the fit on other parts of the data.)

That said, by eye one can see that $1-\exp(-\theta\:\! x)$ will be a better fit than what you have (looking more closely at the picture, it looks like $\theta\approx 1.8$, or possibly a bit lower, would fit adequately).

However, until you can confirm the fit on data not used to identify or fit the curve, you should take the quality of the fit with a grain of salt; it will fit well but could have relatively poor out of sample performance.

(It's also not clear to me this is a suitable way to model data of this sort but I haven't looked at the paper nor at your data set.)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy