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