Truncated Normal Distribution#
Eine Normalverteilung, die auf einen bestimmten Bereich beschränkt ist, der durch zwei Parameter \(A\) und \(B\) gegeben ist. Beachten Sie, dass diese \(A\) und \(B\) den Grenzen für \(x\) in Standardform entsprechen. Für \(x\in\left[A,B\right]\) erhalten wir
\begin{eqnarray*} f\left(x;A,B\right) & = & \frac{\phi\left(x\right)}{\Phi\left(B\right)-\Phi\left(A\right)}\\ F\left(x;A,B\right) & = & \frac{\Phi\left(x\right)-\Phi\left(A\right)}{\Phi\left(B\right)-\Phi\left(A\right)}\\ G\left(q;A,B\right) & = & \Phi^{-1}\left(q\Phi\left(B\right)+\Phi\left(A\right)\left(1-q\right)\right)\end{eqnarray*}
wo
\begin{eqnarray*} \phi\left(x\right) & = & \frac{1}{\sqrt{2\pi}}e^{-x^{2}/2}\\ \Phi\left(x\right) & = & \int_{-\infty}^{x}\phi\left(u\right)du.\end{eqnarray*}
\begin{eqnarray*} \mu & = & \frac{\phi\left(A\right)-\phi\left(B\right)}{\Phi\left(B\right)-\Phi\left(A\right)}\\ \mu_{2} & = & 1+\frac{A\phi\left(A\right)-B\phi\left(B\right)}{\Phi\left(B\right)-\Phi\left(A\right)}-\left(\frac{\phi\left(A\right)-\phi\left(B\right)}{\Phi\left(B\right)-\Phi\left(A\right)}\right)^{2}\end{eqnarray*}
Implementierung: scipy.stats.truncnorm