1
$\begingroup$

I want to test a directional correlational hypothesis in the form of:

H0: There is a positive correlation (𝜌) between X and Y: 𝜌 > 0.

Context:

  • The distribution of the data is not normal.
  • Thus, I am planning to use Spearman rho or Kendall tau.
  • I am working on Python.

I am currently using scipy.stats both for Spearman and Kendall. However, the computed p-value is two-sided:

for a hypothesis test whose null hypothesis is an absence of association, tau = 0.

Any idea how to compute a one-sided (less or greater) p-value for this type of hypothesis?

$\endgroup$
1
  • 2
    $\begingroup$ Neither the Spearman nor the Kendall correlation measure linear correlation; yet you started with the Pearson correlation (which definitely measures linear correlation). It's important to be clearer at the start about what you were actually trying to find out. For example, it sounds like perhaps you may be after a nonparametric test of a linear correlation. $\endgroup$
    – Glen_b
    Commented Feb 6, 2020 at 2:18

1 Answer 1

1
$\begingroup$

I don't know about the Python function in question. But if a t test is used to determine the p value --- which it probably is for at least moderately large sample sizes ---, the p value for a one-sided test follows the usual rules. That is, the p value for the one-sided test is either one-half the p value of the two-sided test, or 1 minus one-half the p value of the two-sided test.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.