Question: What hypothesis test does R use by default for Pearson's correlation coefficient when using cor.test()?
2
gravatar for SpacemanSpiffo
6 weeks ago by
SpacemanSpiffo30 wrote:

I have two vectors, X and Y

I perform a correlation test using them

cor.test(x, y)

From this, I get a p value and a correlation value, among other things.

In a manuscript, I report my results like so:

Pearson’s r(283) = 0.943, p < 2.2e-16

I have been asked to define which statistical test is being used. It was my understanding that Pearson's correlation test was itself the test. Is this incorrect?

I have read that a student's T test can be used to calculate the p value for the hypothesis test, which I believe is testing the hypothesis that the true correlation is 0.

Does the R language use a T-test for the p value by default in cor.test() ? Or is it correct to say that Pearson's is itself the test?

statistics R • 194 views
ADD COMMENTlink modified 6 weeks ago by i.sudbery11k • written 6 weeks ago by SpacemanSpiffo30
0
gravatar for i.sudbery
6 weeks ago by
i.sudbery11k
Sheffield, UK
i.sudbery11k wrote:

The null hypothesis being tested is that there is no correlation i.e. h0: rho=0

Here is what the r documentation has to say about the caculatoin of the p-value:

the test statistic is based on Pearson's product moment correlation coefficient cor(x, y) and follows a t distribution with length(x)-2 degrees of freedom if the samples follow independent normal distributions. If there are at least 4 complete pairs of observation, an asymptotic confidence interval is given based on Fisher's Z transform.

Wikipedia has this to say about the approximation of the distributino of rho to the t-distribution:

For pairs from an uncorrelated bivariate normal distribution, the sampling distribution of a certain function of Pearson's correlation coefficient follows Student's t-distribution with degrees of freedom n − 2. Specifically, if the underlying variables are white and have a bivariate normal distribution, the variable

t=r*sqrt ((n-2)/(1-r^2))

has a student's t-distribution in the null case (zero correlation).[20] This holds approximately in case of non-normal observed values if sample sizes are large enough.[21]

ADD COMMENTlink written 6 weeks ago by i.sudbery11k

Thank you. Based on this, is it correct to say that a Student's t-test is being peformed?

ADD REPLYlink written 6 weeks ago by SpacemanSpiffo30

Its a test based on the t-statistic, but I probably wouldn't go as far as saying a t-test was being performed. Both in its original usage (https://www.york.ac.uk/depts/maths/histstat/student.pdf) and in common usage the term "t-test" implies a test for the difference between the means of two populations. That is not what is being don't here, even if the underlying distribution is the same.

ADD REPLYlink written 5 weeks ago by i.sudbery11k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1779 users visited in the last hour
_