def mean(x: List[Float64]) -> Float64: var total: Float64 = 0.0 for i in range(len(x)): total = total + x[i] return total / Float64(len(x))