correlated_normal

hyppo.tools.correlated_normal(n, p=1, random_state=None)

Conditionally dependent normal distributions. Example 5 from 1

\((X, Y, Z) \in \mathbb{R} \times \mathbb{R} \times \mathbb{R}\): .. math:

\mu &= (0, 0, 0)\\
\Sigma &= \begin{bmatrix}
1 & 0.7 & 0.6\\
0.7 & 1 & 0.6\\
0.6 & 0.6 & 1
\end{bmatrix}\\
(X, Y, Z) &\sim MVN(\mu, \Sigma)

The conditional covariance matrix is given by: .. math:

\Sigma(X, Y | Z) &= \begin{bmatrix}
0.64 & 0.34\\
0.34 & 0.64
\end{bmatrix}
Parameters

n (int) -- The number of samples desired by the simulation (>= 5).

Returns

x,y,z (ndarray of float) -- Simulated data matrices. x, y, and z.

References

1

Xueqin Wang, Wenliang Pan, Wenhao Hu, Yuan Tian, and Heping Zhang. Conditional distance correlation. Journal of the American Statistical Association, 110(512):1726–1734, 2015.

Examples using hyppo.tools.correlated_normal