In history books or articles, specially those related to medicine and science, we often see claims like this. I wonder, what are the sources for these claims? How can we know it when there was no kind of research about it back then?
More of an archaeological or maybe math question than a historical one. It’s an average not an actual statistic. Child mortality rates were very high and that brings down the average life expectancy of the whole population. For example, if a child dies at two years old and an adult at 78 then the average is 40 years. People that survived childhood had a good chance of living into their 50s or 60s. Excavations of medieval cemeteries have shown lots of skeletons of young children and adults past middle age. Here’s a study of one particular medieval Danish village as an example. https://www.demogr.mpg.de/Papers/Books/Monograph2/patterns.htm
Try over at r/AskAnthropology for more info.