Ejemplo n.º 1
0
def test_zscore_means_to_zero():
    x = [1, 2, 3, 4, 5, 6, 3, 2, 4, 5, 3, 2, 3, 4]
    out = stats.z_score(x)
    assert abs(out.mean() - 0) < 1e-6
Ejemplo n.º 2
0
def test_zscore_sd_to_1():
    x = [1, 2, 3, 4, 5, 6, 3, 2, 4, 5, 3, 2, 3, 4]
    out = stats.z_score(x)
    assert abs(out.std() - 1) < 1e-6
Ejemplo n.º 3
0
def test_zscore_returns_same_size():
    x = [1, 2, 3, 4, 5]
    out = stats.z_score(x)
    assert len(x) == len(out)