correlated_binomial

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

Conditionally dependent binomial distributions. Examples 6 from:footcite:p:wang2015conditional.

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

\[\begin{split}X_1, Z &\sim \text{Binom}(10, 0.5) \\ X &= X_1 + Z \\ Y &= (X_1 - 5)^4 + Z\end{split}\]
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