SciPy

prob140.Table.normalized

Table.normalized()

Returns the distribution by making the proabilities sum to 1

Returns:

Table

A distribution with the probabilities normalized

Examples

>>> Table().values([1,2,3]).probability([1,1,1])
Value | Probability
1     | 1
2     | 1
3     | 1
>>> Table().values([1,2,3]).probability([1,1,1]).normalized()
Value | Probability
1     | 0.333333
2     | 0.333333
3     | 0.333333