## Testing Correlation Coefficient

Let $(x_i, y_i), i=1,2,\cdots, n$ be a random sample of $n$ pairs of observations drawn from a bivariate normal population with correlation coeffficient $\rho$.

Let `$r_{xy}$`

or $r$ be the observed correlation coefficient between $x$ and $y$. A test of significance for a linear relationship between the variables $x$ and $y$ can be performed using the sample correlation coefficient $r_{xy}$.

We wish to test the hypothesis $H_0 : \rho =0$ (there is no significant linear relationship between $x$ and $y$) against $H_a : \rho \neq 0$ (there is a significant linear relationship between $x$ and $y$).

## Assumptions

- The population from which, the samples drawn, is a bivariate normal.
- The relationship between $x$ and $y$ is linear.

## Step by step procedure

The step by step procedure for testing $H_0: \rho = 0$ is as follows:

### Step 1 State the hypothesis testing problem

The hypothesis testing problem can be structured in any one of the three situations as follows:

Situation | Hypothesis Testing Problem |
---|---|

Situation A | $H_0: \rho=0$ against $H_a : \rho<0$ (Left-tailed) |

Situation B | $H_0: \rho=0$ against $H_a : \rho>0$ (Right-tailed) |

Situation C | $H_0: \rho=0$ against $H_a : \rho\neq 0$ (Two-tailed) |

### Step 2 Define the test statistic

The test statistic for testing above hypothesis is

`$$ \begin{aligned} t=\dfrac{r}{\sqrt{1-r^2}}\sqrt{n-2} \end{aligned} $$`

The test statistic $t$ follows Students’ $t$ distribution with $n-2$ degrees of freedom.

### Step 3 Specify the level of significance $\alpha$

### Step 4 Determine the critical values

For the specified value of $\alpha$ determine the critical region depending upon the alternative hypothesis.

**left-tailed**alternative hypothesis: Find the $t$-critical value using`$$ \begin{aligned} P(t<-t_{\alpha,n-1}) & = \alpha. \end{aligned} $$`

**right-tailed**alternative hypothesis: $t_\alpha$.`$$ \begin{aligned} P(t>t_{\alpha, n-1}) & = \alpha. \end{aligned} $$`

**two-tailed**alternative hypothesis: $t_{\alpha/2}$.`$$ \begin{aligned} P(|t| > t_{\alpha/2,n-1}) &= \alpha. \end{aligned} $$`

### Step 5 Computation

Compute the test statistic under the null hypothesis $H_0$ using

`$$ \begin{aligned} t_{obs} =\dfrac{r}{\sqrt{1-r^2}}\sqrt{n-2} \end{aligned} $$`

### Step 6 Decision (Traditional Approach)

Traditional approach is based on the critical value.

- For left-tailed alternative hypothesis: Reject $H_0$ if
`$t_{obs}\leq -t_{\alpha,n-1}$`

. - right-tailed alternative hypothesis: Reject $H_0$ if
`$t_{obs}\geq t_{\alpha,n-1}$`

. - two-tailed alternative hypothesis: Reject $H_0$ if
`$|t_{obs}|\geq t_{\alpha/2, n-1}$`

.

**OR**

### Step 6 Decision ($p$-value Approach)

It is based on the $p$-value.

Alternative Hypothesis | Type of Hypothesis | $p$-value |
---|---|---|

$H_a: \rho<0$ | Left-tailed | $p$-value $= P(t\leq t_{obs})$ |

$H_a: \rho>0$ | Right-tailed | $p$-value $= P(t\geq t_{obs})$ |

$H_a: \rho\neq 0$ | Two-tailed | $p$-value $= 2P(t\geq t_{obs})$ |

If $p$-value is less than $\alpha$, then reject the null hypothesis $H_0$ at $\alpha$ level of significance, otherwise fail to reject $H_0$ at $\alpha$ level of significance.