fcit icon indicating copy to clipboard operation
fcit copied to clipboard

Typo in the exemples of the README

Open bertrandhaut opened this issue 6 years ago • 1 comments

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

bertrandhaut avatar Aug 14 '19 14:08 bertrandhaut

My understanding from the pre-print is large p-value (near 1) in case of independence, but not quite sure how it became: "p-value should be uniform on [0,1]".

Empirically, fcit seems to have very high sensitivity for dependence relations, but may miss a few independencies.

azzaea avatar Sep 30 '19 08:09 azzaea