Normal¶
-
class
pyhf.probability.
Normal
(loc, scale)[source]¶ Bases:
pyhf.probability._SimpleDistributionMixin
The Normal distribution with mean
loc
and standard deviationscale
.Example
>>> import pyhf >>> means = pyhf.tensorlib.astensor([5, 8]) >>> stds = pyhf.tensorlib.astensor([1, 0.5]) >>> pyhf.probability.Normal(means, stds) <pyhf.probability.Normal object at 0x...>
Methods
-
__init__
(loc, scale)[source]¶ - Parameters
loc (tensor or float) – The mean of the Normal distribution
scale (tensor or float) – The standard deviation of the Normal distribution
-
expected_data
()[source]¶ The expectation value of the Normal distribution.
Example
>>> import pyhf >>> means = pyhf.tensorlib.astensor([5, 8]) >>> stds = pyhf.tensorlib.astensor([1, 0.5]) >>> normals = pyhf.probability.Normal(means, stds) >>> normals.expected_data() array([5., 8.])
- Returns
The mean of the Normal distribution (which is the
loc
)- Return type
Tensor
-