Chapter 2. Correlation: Correlation
Hypothesis Test for the Pearson Correlation Coefficient
Pearson Correlation TestThe Pearson correlation test is used to test hypotheses about the population Pearson correlation coefficient #\rho#.
Specifically, the test is used to determine whether or not it is plausible that #\rho# differs from some value #\Delta#. In most situations #\Delta=0#, so we will only present this specific setting.
The hypotheses of the Pearson correlation test are:
Two-tailed | Left-tailed | Right-tailed |
\[\begin{array}{rcl} H_0&:& \rho = 0\\\\ H_a&:& \rho \neq 0 \end{array}\] |
\[\begin{array}{rcl} H_0&:& \rho \geq 0\\\\ H_a&:& \rho \lt 0 \end{array}\] |
\[\begin{array}{rcl} H_0&:& \rho \leq 0\\\\ H_a&:& \rho \gt 0 \end{array}\] |
The test statistic of the Pearson correlation test is denoted #t# and is calculated with the following formula:
\[t = r\sqrt{\cfrac{n-2}{1-r^2}}\] where #r# is the sample Pearson correlation coefficient and #n# is the number of cases.
Under the null hypothesis of the test, the #t#-statistic follows the #t#-distribution with #n-2# degrees of freedom.
Calculating the p-value of a Pearson Correlation Test with Statistical SoftwareThe calculation of the #p#-value of a Pearson correlation test is dependent on the direction of the test and can be performed using either Excel or R.
To calculate the #p#-value of a Pearson correlation test for #\rho# in Excel, make use of one of the following commands:
\[\begin{array}{llll}
\phantom{0}\text{Direction}&\phantom{000}H_0&\phantom{000}H_a&\phantom{000000}\text{Excel Command}\\
\hline
\text{Two-tailed}&H_0:\rho = 0&H_a:\rho \neq 0&=2 \text{ * }(1 \text{ - } \text{T.DIST}(\text{ABS}(t),df,1))\\
\text{Left-tailed}&H_0:\rho \geq 0&H_a:\rho \lt 0&=\text{T.DIST}(t,df,1)\\
\text{Right-tailed}&H_0:\rho \leq 0&H_a:\rho \gt 0&=1\text{ - }\text{T.DIST}(t,df,1)\\
\end{array}\]
Where #df=n-2#.
To calculate the #p#-value of a Pearson correlation test for #\rho# in R, make use of one of the following commands:
\[\begin{array}{llll}
\phantom{0}\text{Direction}&\phantom{000}H_0&\phantom{000}H_a&\phantom{00000000000}\text{R Command}\\
\hline
\text{Two-tailed}&H_0:\rho = 0&H_a:\rho \neq 0&2 \text{ * }\text{pt}(\text{abs}(t),df,lower.tail=\text{FALSE})\\
\text{Left-tailed}&H_0:\rho \geq 0&H_a:\rho \lt 0&\text{pt}(t,df, lower.tail=\text{TRUE})\\
\text{Right-tailed}&H_0:\rho \leq 0&H_a:\rho \gt 0&\text{pt}(t,df, lower.tail=\text{FALSE})\\
\end{array}\]
Where #df=n-2#.
If #p \leq \alpha#, reject #H_0# and conclude #H_a#. Otherwise, do not reject #H_0#.
Or visit omptest.org if jou are taking an OMPT exam.