Back to Article
Simulation of Multivariate Normal Distribution
Download Notebook

Simulation of Multivariate Normal Distribution

Generate \(m=1000\) samples from each of the two Bivariate Normal distributions.

A: mean \(\mu = (-0.5,-0.5)\) and covariance matrix \(\Sigma = \begin{pmatrix} 1 & 0.25 \\ 0.25 & 1 \end{pmatrix}\).

B: mean \(\mu = (0.5,0.5)\) and covariance matrix \(\Sigma = \begin{pmatrix} 1 & 0.25 \\ 0.25 & 1 \end{pmatrix}\).

Plot them in the same plot and stack them into a single tensor X as if it is generated from a single distribution.

In [2]:
import torch
Back to top