You add strings, not numbers, which is what your error message says.
Convert each line to the corresponding integer:
numlist = map(int, numlist)
And then take the average (note that I use float() differently than you do):
arithmetic_mean = float(sum(numlist)) / len(numlist)
You want to use float() before division, like float(1/2) = float(0) = 0.0 , which is not what you want.
An alternative would be to simply make them all float in the first place:
numlist = map(float, numlist)
Blender
source share