One correlation test

What it is?

  • The Pearson correlation test, also known as Pearson’s correlation coefficient or Pearson’s correlation analysis, is a statistical method used to measure the strength and direction of the linear relationship between two continuous variables.

  • The Pearson correlation test helps determine whether there is a significant linear relationship between the variables in a given sample. The null hypothesis \(\mathcal{H}_0\) assumes that there is no linear correlation between the variables, while the alternative hypothesis \(\mathcal{H}_1\) suggests the presence of a significant correlation.

Hypothesis

  • \(\mathcal{H}_0\): \(\rho=0\)

  • \(\mathcal{H}_1\): One of the following

  • Two-tailed test: \(\rho\neq 0\)
  • Left-tailed test: \(\rho < 0\)
  • Right-tailed test: \(\rho > 0\)

Test statistic

  • \(S_x^2=\dfrac{1}{n}\sum_{i=1}^n\left(X_i-\overline{X}\right)^2\)

  • \(S_y^2=\dfrac{1}{n}\sum_{i=1}^n\left(Y_i-\overline{Y}\right)^2\)

  • \(S_{x,y}=\dfrac{1}{n}\sum_{i=1}^n\left(X_i-\overline{X}\right)\left(Y_i-\overline{Y}\right)\)

  • \(r_{x,y}=\dfrac{S_{x,y}}{\sqrt{S_x^2}\sqrt{S_y^2}}\)

  • \(T=\frac{r_{x,y}\sqrt{n-2}}{\sqrt{1-r_{x,y}^2}}\ \overset{\mathcal{H}_0}{\approx}\ \mathcal{T}_{n-2}\)

Critical Region

  • \(q\): Quantile of \(\mathcal{T}_{n-2}\)

  • Two-tailed: \(\left(-\infty,-q_{1-\alpha/2}\right)\cup\left(q_{1-\alpha/2},+\infty\right)\)

  • Left-tailed: \(\left(-\infty,q_{\alpha}\right)\)

  • Right-tailed: \(\left(q_{1-\alpha},+\infty\right)\)

P-value

  • Two-tailed: \(pValue=2\mathbb{P}\left(T>|T_{obs}|\right)\)

  • Left-tailed: \(pValue=\mathbb{P}\left(T<T_{obs}\right)\)

  • Right-tailed: \(pValue=\mathbb{P}\left(T>T_{obs}\right)\)

Decision

Decision based on Critical Region

  • Reject \(\mathcal{H}_0\) if and only if \(T_{obs}\in W\)

Decision based on P-value

  • Reject \(\mathcal{H}_0\) if and only if \(pValue<\alpha\)