Exemple #1
0
def test_is_homogeneous2():
    outcomes = ['00', '01']
    pmf = [1 / 2] * 2
    d = Distribution(outcomes, pmf)
    assert not d.is_homogeneous()
Exemple #2
0
def test_is_homogeneous1():
    outcomes = ['00', '11']
    pmf = [1 / 2, 1 / 2]
    d = Distribution(outcomes, pmf)
    assert d.is_homogeneous()
Exemple #3
0
def test_is_homogeneous1():
    outcomes = ['00', '11']
    pmf = [1/2, 1/2]
    d = Distribution(outcomes, pmf)
    assert_true(d.is_homogeneous())
Exemple #4
0
def test_is_homogeneous2():
    outcomes = ['00', '01']
    pmf = [1/2, 1/2]
    d = Distribution(outcomes, pmf)
    assert_false(d.is_homogeneous())
Exemple #5
0
def test_is_homogeneous2():
    outcomes = ['00', '01']
    pmf = [1 / 2, 1 / 2]
    d = Distribution(outcomes, pmf)
    assert_false(d.is_homogeneous())