In this post we discuss modeling covariances beyond the Gaussian approximation.
import mmf_setup;mmf_setup.nbinit(hgroot=False)
%pylab inline --no-import-all
from scipy import stats
x = np.linspace
f = stats.lognorm.pdf()
Characterization¶
Consider a random variable $X$ with probability distribution $f(x)$.
Addition of Stochastic Variables¶
Let $X_n$ be $N$ independent stochastic variables with joint probability density $P_X(x_1, x_2, \dots, x_N) = P(\vect{x})$. Then, the probability distribution for the sum $Y = \sum_n X_n$ is:
$$ P_Y(y) = \idotsint \delta\Bigl(\sum_{n}x_n - y\Bigr)P_X(\vect{x})\prod_{n=1}^{N}\d{x_n} $$If the variables $X_n$ are independent, then $P_X(\vect{x}) = \prod_{n}P_{X_n}(x_n)$, and this simplifies:
$$ P_Y(y) = \idotsint \delta\left(\sum_{n}x_n - y\right)\prod_{n=1}^{N}P_{X_n}(x_n)\d{x_n}. $$Environment¶
Execute the following two cells to define a conda environment for running this notebook.
%%file environment.soerp.yml
name: blog.soerp
channels:
- defaults
- conda-forge
dependencies:
- ipykernel
- notebook
- uncertainties
- scipy
- matplotlib
- pip:
- soerp
- mmf_setup
!conda env update -f environment.soerp.yml