cond_indep_binomial

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

Conditionally independent binomial distributions.

\((X, Y, Z) \in \mathbb{R} \times \mathbb{R} \times \mathbb{R}^p\):

\[\begin{split}X_1, Y_1, Z_i &\sim \text{Binom}(10, 0.5) \\ Z &= (Z_1, Z_2, \ldots, Z_p) \\ X &= X_1 + Z_1 + Z_2 + \cdots + Z_p \\ Y &= Y_1 + Z_1 + Z_2 + \cdots + Z_p\end{split}\]

Examples 2 and 4 from 1.

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

  • p (int) -- The number of dimensions for conditioning variable Z.

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.