SciPy

prob140.Table.event

Table.event(x)

Shows the probability that distribution takes on value x or list of values x.

Parameters:

x : float or Iterable

An event represented either as a specific value in the domain or a subset of the domain

Returns:

Table

Shows the probabilities of each value in the event

Examples

>>> dist = Table().values([1,2,3,4]).probability([1/4,1/4,1/4,1/4])
>>> dist.event(2)
Domain | Probability
2      | 0.25
>>> dist.event([2,3])
Domain | Probability
2      | 0.25
3      | 0.25