Event

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

An event with all its attributes: magnitudes, offsets, asymptotic if possible (abstract class).

Parameters
  • candidate_x (str) – A candidate (e.g. 'a').

  • candidate_y (str) – A candidate (e.g. 'b').

  • candidate_z (str) – A candidate (e.g. 'c').

  • tau (TauVector) – A tau-vector.

asymptotic

The asymptotic development of the probability of the event when n tends to infinity.

Type

Asymptotic

mu

Shortcut for asymptotic.mu.

Type

Number, sp.nan, np.nan, - sp.oo or - np.inf

nu

Shortcut for asymptotic.nu.

Type

Number, sp.nan, np.nan, - sp.oo or - np.inf

xi

Shortcut for asymptotic.xi.

Type

Number, sp.nan, np.nan, - sp.oo or - np.inf

phi_ab

The offset for this kind of ballot. An offset is np.nan if it is not defined. Other offsets are denoted phi_a, etc.

Type

Number or np.nan

phi

The dictionary of the offsets. For example, self.phi['a'] is just an alternate notation for self.phi_a.

Type

dict

psi_ab

The pseudo-offset for this kind of ballot. It is equal to phi_ab if it exists, and phi_a * phi_b otherwise. Similarly, the pseudo-offset psi_a is equal to phi_a if it exists, and phi_ab * phi_ac otherwise. Other pseudo-offsets are denoted psi_b, etc.

Type

Number or np.nan

psi

The dictionary of pseudo-offsets. For example, self.psi['a'] is just an alternate notation for self.psi_a.

Type

dict

Notes

The permutation of candidate_x, candidate_y and candidate_z is generally important in the subclasses. For example, in EventDuo, we consider a tie between candidates x and y (hence in that case, if is the same if x and y are exchanged, but not if x and z are exchanged for example).

Examples

Cf. EventPivotWeak.