Exactly. The clock is the key parameter here (not the differential in points). You have to consider not just the current drive, but what will happen after. There are four minutes left. Maybe you get the ball back twice, maybe not. If not, you lose, so don't even worry about that scenario. If you do, you're very likely to have very little time (and perhaps no time outs) on that last drive. The odds of scoring a TD under those conditions are miniscule. But the odds of scoring a FG aren't: get yourself to the opponent's 35 and run out the FG unit.
For this reason, there's a big difference between (4 minutes left, down 14) and (4 minutes left, down 10).
Well, I tried to check this out with win probabilities (
https://www.pro-football-reference.com/play-index/win_prob.cgi) but it wasn't very helpful:
Chance of winning, 4 minutes left, down 17, opponent starts at their 7 (you went for it and failed): 1.47%
Chance of winning, 4 minutes left, down 14, opponent starts at their 25 (you kicked deep): 0.91%
Chance of winning, 4 minutes left, down 10, opponent starts at their 25 (you kicked deep): 1.05%
I could say that makes my point for me (kicking the FG is your worst option), but this is probably driven by lack of data more than anything. What it really says is that you need to score and do a successful onside or you're pretty well screwed. Let's try this:
Chance of winning, 4 minutes left, down 14, you recover the onside kick at your 45: 6.03%
Chance of winning, 4 minutes left, down 10, you recover the onside kick at your 45: 12.32%
You can crunch the math on all this, but to me it says "go for it." And it's certainly not an obviously wrong decision.