import math

def mean_std(xs):
    n = len(xs)
    mean = sum(xs) / n
    variance = sum((x - mean) ** 2 for x in xs) / n
    std = math.sqrt(variance)
    return (mean, std)

print(mean_std([2,4,4,4,5,5,7,9]))