The football statisticians have known this for decades. Fortunately, the coaches are finally starting to catch on.
In fact, Shane Reese did a comprehensive study for the Eagles in the 90s or early 2000s. His conclusion was that teams should never punt from their own 40 or closer (so, within 60 yards of the endzone) unless it was 4th and more than 10.