Exemplo n.º 1
0
def check_k_sample_fpp(ip, p, k, m):
    N = 1000
    r = 0
    for i in range(N):
        samples = np.random.random_sample((k,m))
        A2, TkN, (tkm1, ps), pv = anderson_darling.anderson_darling_k(samples)
        if pv<=p:
            r += 1
    assert scipy.stats.binom(N,p).cdf(r) > 0.01
    assert scipy.stats.binom(N,p).sf(r) > 0.01
Exemplo n.º 2
0
def test_k_sample_simple_fail():
    samples = np.random.random_sample((2,100))
    samples[1,:] *= 2
    A2, TkN, (tkm1, ps), pv = anderson_darling.anderson_darling_k(samples)
    assert pv<=0.01 # 0.01 is the smallest possible p
Exemplo n.º 3
0
def test_k_sample_simple_pass():
    samples = np.random.random_sample((2,10))
    A2, TkN, (tkm1, ps), pv = anderson_darling.anderson_darling_k(samples)
    assert pv>0.01 # 0.01 is the smallest possible p