2

I have a bunch of bivariate correlation tests for which $R$ has already been calculated.

Is it possible to figure out the p-value for each $R$ knowing only (in addition) the number of data points $n$? If not, then what else do I need to know and how do I calculate it?

(I also have results for bivariate regressions, including F, sigma, coefficient, coefficient sigma, intercept, intercept sigma if they are of use).

Sideshow Bob
  • 1,185
  • 2
  • 9
  • 25
  • It depends on how the data for each $R$ calculation are related. If they are not independent, then you need to account for that. More fundamentally, given that you have carried out regression calculations, why are you focusing on $R$? Most likely what you want to learn can be read directly from the regression output, as explained at http://stats.stackexchange.com/questions/5135 and similar threads. – whuber Apr 03 '14 at 14:58
  • What do you mean by "if they are not independent"? $r^2$ is in the region of 0.5-0.8 for all my tests, so the variables are not independent of one another (hence me being interested in p values). Or do I misread you? – Sideshow Bob Apr 03 '14 at 17:15
  • I mean independence *between calculations*. If, for instance, you are testing the correlations between random variables $X$ and $Y$ and $X$ and $Z$, then those tests are not independent because they share data. It is worthwhile giving some thought to the underlying statistical model of random variation in the values because that is a good indicator of how to proceed with testing. – whuber Apr 03 '14 at 18:06
  • Ok, got it. If I calculate a p value for each test on its own, won't that stand independently? Obviously as the tests themselves are correlated I can't just multiply the p values together to get a p value for all tests. But I wasn't planning on that. – Sideshow Bob Apr 04 '14 at 09:28

1 Answers1

2

Here is an algorithm from Numerical Recipes:

PFromT(T_Value, DF) = BetaI(DF /2, 1/2, DF / (DF + T_Value^2))

PFromR(R_Value) = PFromT(|R_Value| / SQRT((1 - R_Value^2)/DF) , DF)

The calculation of P from r uses the function that computes P from t, which uses the BetaI function.

You could also compute P from t using this Excel formula: =TDIST (t, df, 2)

Harvey Motulsky
  • 14,903
  • 11
  • 51
  • 98
  • The t value from your formula (in the first argument to PfromR) matches the t value for the parameter (not intercept) in my bivariate regression, which is confidence inspiring :) – Sideshow Bob Apr 03 '14 at 17:34
  • What is the BetaI function? Is it a function in Microsoft Office Excel ? How would that translate into mathematical notation (to use it outside Excel)? – llrs Nov 23 '16 at 10:57
  • @SideshowBob . I don't follow your comment... – Harvey Motulsky Nov 24 '16 at 17:04