Skip to content

Typo in the exemples of the README #1

@bertrandhaut

Description

@bertrandhaut

I'm just taking a look at your second example of the README.

Generate some data such that x is indpendent of y given z.
n_samples = 1000
z = np.random.dirichlet(alpha=np.ones(2), size=n_samples)
x = np.vstack([np.random.multinomial(20, p) for p in z]).astype(float)
y = np.vstack([np.random.multinomial(20, p) for p in z]).astype(float)

Check that x and y are dependent (p-value should be uniform on [0, 1]).
pval_d = fcit.test(x, y)
Check that z d-separates x and y (the p-value should be small).
pval_i = fcit.test(x, y, z)

Shouldn't the comments on the p-value be inverted?

  • z d-separates x and y --> independence test should not be rejected --> p-value should be uniform on [0, 1])
  • x and y are dependent --> independence test should be rejected --> p-value should be small

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions