pymc.Normal#
- class pymc.Normal(name, *args, rng=None, dims=None, initval=None, observed=None, total_size=None, transform=UNSET, **kwargs)[source]#
Univariate normal log-likelihood.
The pdf of this distribution is
\[f(x \mid \mu, \tau) = \sqrt{\frac{\tau}{2\pi}} \exp\left\{ -\frac{\tau}{2} (x-\mu)^2 \right\}\]Normal distribution can be parameterized either in terms of precision or standard deviation. The link between the two parametrizations is given by
\[\tau = \dfrac{1}{\sigma^2}\](Source code, png, hires.png, pdf)
Support
\(x \in \mathbb{R}\)
Mean
\(\mu\)
Variance
\(\dfrac{1}{\tau}\) or \(\sigma^2\)
- Parameters
- mutensor_like of
float
, default 0 Mean.
- sigmatensor_like of
float
, optional Standard deviation (sigma > 0) (only required if tau is not specified). Defaults to 1 if neither sigma nor tau is specified.
- tautensor_like of
float
, optional Precision (tau > 0) (only required if sigma is not specified).
- mutensor_like of
Examples
with pm.Model(): x = pm.Normal('x', mu=0, sigma=10) with pm.Model(): x = pm.Normal('x', mu=0, tau=1/23)
Methods
Normal.__init__
(*args, **kwargs)Normal.dist
([mu, sigma, tau])Creates a tensor variable corresponding to the cls distribution.
Normal.icdf
(mu, sigma)Normal.logcdf
(mu, sigma)Normal.logp
(mu, sigma)Normal.moment
(size, mu, sigma)Attributes
rv_op