EventPivotStrict

class poisson_approval.EventPivotStrict(candidate_x, candidate_y, candidate_z, tau)[source]

A 2-candidate strict pivot.

Notes

We consider the strict pivot between x and y, i.e. situations where S_x = S_y > S_z.

For parameters and attributes, cf. Event.

Examples

>>> from fractions import Fraction
>>> from poisson_approval import TauVector
>>> tau = TauVector({'a': Fraction(1, 10), 'ab': Fraction(6, 10), 'c': Fraction(3, 10)})
>>> EventPivotStrict(candidate_x='a', candidate_y='b', candidate_z='c', tau=tau)
<asymptotic = exp(- 0.1 n + o(1)), phi_a = 0, phi_c = 1, phi_ab = 1>
>>> tau = TauVector({'ab': Fraction(1, 10), 'c': Fraction(9, 10)})
>>> EventPivotStrict(candidate_x='a', candidate_y='b', candidate_z='c', tau=tau)
<asymptotic = exp(- 0.4 n - 0.5 log n - 1.35667 + o(1)), phi_c = 0.333333, phi_ab = 3>
>>> tau = TauVector({'a': Fraction(1, 6), 'b': Fraction(1, 6), 'c': Fraction(1, 6),
...                  'ab': Fraction(1, 6), 'ac': Fraction(1, 6), 'bc': Fraction(1, 6)})
>>> EventPivotStrict(candidate_x='a', candidate_y='b', candidate_z='c', tau=tau)
<asymptotic = exp(- 0.5 log n - 1.40935 + o(1)), phi_a = 1, phi_b = 1, phi_c = 1, phi_ab = 1, phi_ac = 1, phi_bc = 1>
>>> tau = TauVector({'b': Fraction(1, 2), 'ac': Fraction(1, 2)})
>>> EventPivotStrict(candidate_x='a', candidate_y='b', candidate_z='c', tau=tau)
<asymptotic = exp(- inf)>
>>> tau = TauVector({'a': Fraction(1, 9), 'b': Fraction(1, 9),
...                  'ab': Fraction(1, 9), 'ac': Fraction(1, 3), 'bc': Fraction(1, 3)})
>>> EventPivotStrict(candidate_x='a', candidate_y='b', candidate_z='c', tau=tau)
<asymptotic = exp(- 0.0181103 n + ? log n + ? + o(1)), phi_a = 1.17454, phi_b = 1.17454, phi_ab = 1.37954, phi_ac = 0.851399, phi_bc = 0.851399>