Poisson#
- class pyhf.probability.Poisson(rate)[source]#
Bases:
pyhf.probability._SimpleDistributionMixin
The Poisson distribution with rate parameter
rate
.Example
>>> import pyhf >>> rates = pyhf.tensorlib.astensor([5, 8]) >>> pyhf.probability.Poisson(rates) <pyhf.probability.Poisson object at 0x...>
- __init__(rate)[source]#
- Parameters:
rate (
tensor
orfloat
) – The mean of the Poisson distribution (the expected number of events)
Methods
- expected_data()[source]#
The expectation value of the Poisson distribution.
Example
>>> import pyhf >>> rates = pyhf.tensorlib.astensor([5, 8]) >>> poissons = pyhf.probability.Poisson(rates) >>> poissons.expected_data() array([5., 8.])
- Returns:
The mean of the Poisson distribution (which is the
rate
)- Return type:
Tensor