What hypothesis test does R use by default for Pearson's correlation coefficient when using cor.test()?
1
2
Entering edit mode
12 months ago

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 • 637 views
ADD COMMENT
0
Entering edit mode
12 months ago

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 COMMENT
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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 REPLY
0
Entering edit mode

which value is selecting for pearson correlation ? is p-value or logfc value i want to find the cis and trans target gene ? can you help me please

ADD REPLY

Login before adding your answer.

Traffic: 2763 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6