Lesson 1 of 6 · All lessons in this module
  1. Parametric vs non-parametric tests, and correlation hypotheses
  2. The t-test for a Pearson correlation
  3. Sample size, p-values and many correlations at once
  4. The Spearman rank correlation testVideo lesson
  5. Contingency tables and the chi-square test of independenceVideo lesson
  6. Interpreting the result: standardized residuals and mosaics

Free lesson: the first lesson of every module is open to everyone.

Lesson 1 of 6 · 12 min

Parametric vs non-parametric tests, and correlation hypotheses

Before testing whether two variables are related, decide what kind of data you have, which assumptions you can defend, and which direction the alternative hypothesis points.

In short

  • A parametric test concerns a population parameter (such as ρ \rho ) and/or relies on a distributional assumption, usually normality.
  • A non-parametric test is not about a parameter, or needs only minimal assumptions about the population.
  • Go non-parametric when the data break the distributional assumptions, contain outliers, come as ranks, or the hypothesis is not about a parameter.
  • The Pearson correlation r=sXY/(sXsY) r = s_{XY}/(s_X s_Y) measures linear association; its sign comes from the covariance.
  • Correlation hypotheses compare ρ \rho with zero: two-sided (ρ≠0 \rho \neq 0 ), right-sided (ρ>0 \rho > 0 ) or left-sided (ρ<0 \rho < 0 ).
  • This module has three tests: the t-test on Pearson r (parametric), the Spearman rank test and the chi-square test of independence (both non-parametric).

Two families of tests

A hypothesis test asks whether a pattern in a sample is too strong to be explained by chance. How you build the test depends on what you are willing to assume about the population the sample came from.

A parametric test either concerns a specific population parameter (a mean, a variance, a correlation coefficient) or depends on a specific distributional assumption, usually that the data are normally distributed. The t-test on a correlation coefficient is parametric on both counts: it is about ρ \rho , and it assumes both variables are normal.

A non-parametric test either does not concern a parameter at all, or makes only minimal assumptions about the population. Because it asks less of the data, it keeps working when the data are awkward.

Neither family is better in general. When its assumptions hold, the parametric test is the natural choice. When they clearly fail, its conclusions can mislead, and a non-parametric test is the safer tool.

Think of a parametric test as a precision instrument calibrated for normal data. Point it at heavily skewed or outlier-ridden data and the readings drift. A non-parametric test is the rugged instrument that still gives a usable reading.

When to switch to a non-parametric test

There are four situations in which a non-parametric test is the usual choice. Learn them as a list: the exam likes to describe one of them in words and ask which test fits.

  • Distributional assumptions are not met: the data are clearly skewed or bounded, so normality is not credible. Expense ratios cannot be negative and returns cannot fall below −100%, so such variables are often far from normal.
  • Outliers are present: a few extreme values can dominate any statistic built from the raw numbers.
  • The data are ranks: for example, analysts rank 20 funds from 1 to 20. Only the order means something, not the size of the gaps.
  • The hypothesis is not about a parameter: for example, “are fund size and investment style independent?” No single population parameter is being tested.
The three tests in this module
TestDataParametric?Statistic and df
Pearson correlation t-testTwo continuous, normally distributed variablesYest, n − 2 df
Spearman rank correlation testTwo variables, converted to ranksNoSmall n: special table; n > 30: t, n − 2 df
Chi-square test of independenceTwo categorical variables (counts)Noχ2 \chi^2 , (r − 1)(c − 1) df

What the Pearson correlation measures

The usual sample correlation, called the Pearson, bivariate or simply the pairwise correlation, divides the sample covariance by the product of the two standard deviations: r=sXY/(sXsY) r = s_{XY}/(s_X s_Y) . Dividing by the standard deviations removes the units, so r always lies between −1 and +1.

Every observation enters through its distance from its own variable’s mean. That is why the size of each deviation matters, and why one extreme observation can pull r a long way.

The denominator is always positive, so the covariance drives the sign of r. A positive covariance means the two variables tend to be above (or below) their means at the same time; a negative one means they tend to be on opposite sides.

r captures only linear association. A significant r tells you that the linear link is unlikely to be pure chance. It does not tell you that the link is strong in a practical sense, or that one variable causes the other.

Writing the hypotheses

We use the sample correlation r to test a claim about the population correlation ρ \rho (rho). The most common question is simply “is there a relationship?”, which makes zero the natural hypothesized value.

The null always contains the equal sign. The alternative holds what the analyst wants evidence for, and its direction decides where the rejection region sits.

Every test then follows the familiar six steps: state the hypotheses, identify the test statistic, specify the significance level, state the decision rule, calculate the statistic, and make a decision. The next lessons fill in the statistic and decision rule for each test.

Hypotheses about the population correlation
Research questionH0 H_0 Ha H_a Rejection region
Are X and Y related at all?ρ=0 \rho = 0 ρ≠0 \rho \neq 0 Both tails
Is the correlation positive?ρ≤0 \rho \le 0 ρ>0 \rho > 0 Right tail
Is the correlation negative?ρ≥0 \rho \ge 0 ρ<0 \rho < 0 Left tail
00.10.20.30.4-4-2024t-statistic (38 df)Density−2.0241.6862.024t, 38 dfRight tail 5% (ρ > 0)
With 38 df at 5%, a test of ρ>0 \rho > 0 puts the whole 5% in the right tail (shaded), so its cut-off is 1.686. A test of ρ≠0 \rho \neq 0 splits the 5% between both tails and needs ±2.024.

A one-sided test puts all of α \alpha in one tail, so its critical value is smaller in absolute value than the two-sided one. Use it only when you have a direction in mind before looking at the data.

Formula

Sample (Pearson) correlation
rXY=sXYsX sYr_{XY} = \dfrac{s_{XY}}{s_X\, s_Y}

sXY s_{XY} = sample covariance of X and Y; sX s_X , sY s_Y = sample standard deviations. If you are given variances, take square roots first.

Worked examples

Example 1 Correlation from covariance

Monthly returns on a EUR equity fund and a GBP equity fund have a sample covariance of 0.00126. Their standard deviations are 4.2% and 5.0%. What is the sample correlation?

Example 2 Setting up a one-sided test

A Norwegian analyst believes that rising oil prices help NOK-listed energy shares. She wants evidence that the correlation between oil-price changes and the sector’s returns is positive. Which hypotheses and rejection region fit?

Example 3 Choosing the test

Which test fits each case? (1) 60 months of returns on two large-cap indexes, roughly normal. (2) 15 funds ranked 1–15 by two rating agencies. (3) 500 firms classified by credit-rating band and by sector. (4) Expense ratios and alphas for 40 funds, both visibly skewed.

On the exam

Expect a short scenario (skewed data, ranked data, categories) and a question on which test applies, or on how to state the hypotheses for a one- or two-sided correlation test.

  • Calling the chi-square test of independence parametric. It tests independence, not a parameter, so it is non-parametric.
  • Putting the analyst’s belief in the null. The claim you want evidence for goes in Ha H_a .
  • Reading a significant r as proof of a strong or causal link. It only says the linear association is unlikely to be zero.

Check yourself

  1. Q1Two return series have variances of 0.0064 and 0.0025 and a covariance of −0.0024. Their correlation is closest to:

  2. Q2A non-parametric test is least likely to be preferred when the data:

  3. Q3An analyst wants evidence that the returns of two currencies are negatively correlated. The appropriate hypotheses are:

  4. Q4The chi-square test of independence is classified as non-parametric mainly because it:

  5. Q5Which statement about the Pearson correlation coefficient is most accurate?

0/5Check yourself

Answer the 5 questions: +10 XP for each one you get right first time.

Liked this lesson? Get the rest free for 7 days

Create a free account to open the other 5 lessons in this module, with videos, flashcards that come back before you forget them, the question bank and full mocks. No card needed.