Table of contents
The density function of the Normal (Gaussian) distribution:
f(x; \mu, \sigma) = \frac{1}{\sqrt{2 \pi} \sigma} \exp \left( - \frac{(x-\mu)^2}{2 \sigma^2} \right)
Methods for scalar input, as well as for list input, are listed below.
.. autofunction:: pystats.dnorm(x: float, mean: float = 0.0, sd: float = 1.0, log: bool = False) -> float :noindex:
.. autofunction:: pystats.dnorm(x: List[float], mean: float = 0.0, sd: float = 1.0, log: bool = False) -> List[float] :noindex:
The cumulative distribution function (CDF) of the Normal (Gaussian) distribution:
F(x; \mu, \sigma) = \int_{-\infty}^x f(z; \mu, \sigma) dz = \frac{1}{2} \times \left( 1 + \text{erf} \left( \frac{x - \mu}{\sqrt{2} \sigma} \right) \right)
where \text{erf}(\cdot) denotes the Gaussian error function.
Methods for scalar input, as well as for list input, are listed below.
.. autofunction:: pystats.pnorm(p: float, mean: float = 0.0, sd: float = 1.0, log: bool = False) -> float :noindex:
.. autofunction:: pystats.pnorm(p: List[float], mean: float = 0.0, sd: float = 1.0, log: bool = False) -> List[float] :noindex:
The quantile function of the log-Normal distribution:
q(p; \mu, \sigma) = \mu + \sqrt{2} \sigma \times \text{erf}^{-1} \left( 2 p - 1 \right)
where \text{erf}^{-1}(\cdot) denotes the inverse Gaussian error function.
Methods for scalar input, as well as for list input, are listed below.
.. autofunction:: pystats.qnorm(q: float, mean: float = 0.0, sd: float = 1.0) -> float :noindex:
.. autofunction:: pystats.qnorm(q: List[float], mean: float = 0.0, sd: float = 1.0) -> List[float] :noindex:
Random sampling for the Normal distribution is achieved via the normal_distribution
class from the C++ standard library, imported from <random>
.
.. autofunction:: pystats.rnorm(mean: float = 0.0, sd: float = 1.0) -> float :noindex:
.. autofunction:: pystats.rnorm(n: int, mean: float = 0.0, sd: float = 1.0) -> List[float] :noindex: