0% found this document useful (0 votes)
97 views7 pages

LM09 Parametric and Non-Parametric Tests of Independence IFT Notes

Uploaded by

Yuri B
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
97 views7 pages

LM09 Parametric and Non-Parametric Tests of Independence IFT Notes

Uploaded by

Yuri B
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

LM09 Parametric and Non-Parametric Tests of Independence 2024 Level I Notes

LM09 Parametric and Non-Parametric Tests of Independence

1. Introduction ...........................................................................................................................................................2
2. Tests Concerning Correlation .........................................................................................................................2
3. Tests of Independence Using Contingency Table Data .........................................................................5
Summary......................................................................................................................................................................7

This document should be read in conjunction with the corresponding reading in the 2024 Level I
CFA® Program curriculum. Some of the graphs, charts, tables, examples, and figures are copyright
202, CFA Institute. Reproduced and republished with permission from CFA Institute. All rights
reserved.
Required disclaimer: CFA Institute does not endorse, promote, or warrant the accuracy or quality of
the products or services offered by IFT. CFA Institute, CFA®, and Chartered Financial Analyst® are
trademarks owned by CFA Institute.
Ver 1.0

© IFT. All rights reserved 1


LM09 Parametric and Non-Parametric Tests of Independence 2024 Level I Notes

1. Introduction
This learning module covers:
• Parametric and non-parametric tests of correlation
• Tests of independence based on contingency table data
2. Tests Concerning Correlation
The strength of linear relationship between two variables is assessed through correlation
coefficient. The significance of a correlation coefficient is tested by using hypothesis tests
concerning correlation.
The most common way of setting up hypotheses concerning correlation is to check if the
population correlation is not equal to 0. In this case the null and alternate hypothesis will be
(ρ represents the population correlation coefficient):
• H0 : ρ = 0
• Ha : ρ ≠ 0
It is a two-tailed test.
We can also set up hypothesis to check if the population correlation is positive or negative.
The null and alternate hypothesis in these cases will be:
One sided (right side): H0: ρ ≤ 0 versus Ha: ρ > 0
One sided (left side): H0: ρ ≥ 0 versus Ha: ρ < 0
Parametric Test of a Correlation
As long as the two variables are distributed normally, we can use sample correlation, r for
our hypothesis testing. The formula for the t-test is
r √n − 2
t=
√1 − r 2
where: n – 2 = degrees of freedom if H0 is true.
The magnitude of r needed to reject the null hypothesis H0: ρ= 0 decreases as sample size n
increases due to the following:
i. As n increases, the number of degrees of freedom increases and the absolute value of
the critical value tc decreases.
ii. As n increases, the absolute value of the numerator increases, leading to larger-
magnitude t-values.
In other words, as n increases, the probability of Type-II error decreases, all else equal.

© IFT. All rights reserved 2


LM09 Parametric and Non-Parametric Tests of Independence 2024 Level I Notes

Example
The sample correlation between the oil prices and monthly returns of energy stocks in a
Country A is 0.7986 for the period from January 2014 through December 2018. Can we
reject a null hypothesis that the underlying or population correlation equals 0 at the 0.05
level of significance?
Solution:
H0 : ρ = 0 → true correlation in the population is 0.
Ha : ρ ≠ 0 → correlation in the population is different from 0.
From January 2014 through December 2018, there are 60 months, so n = 60. We use the
following statistic to test the above.
0.7986 √60−2 6.0820
t = √1− 0.79862
= = 10.1052
0.6019

At the 0.05 significance level, the critical level for this test statistic is 2.00 (n = 60, degrees of
freedom = 58). When the test statistic is either larger than 2.00 or smaller than 2.00, we can
reject the hypothesis that the correlation in the population is 0. The test statistic is 10.1052,
so we can reject the null hypothesis.
Non-Parametric Test of Correlation: The Spearman Rank Correlation Coefficient
Instructor’s Note:
Focus on the basics of this topic, the probability of being tested on the details is low.
If the two variables under consideration are not normally distributed, we can use a test
based on the Spearman rank correlation coefficient, rS. The Spearman rank correlation
coefficient is equivalent to the usual correlation coefficient but is calculated on the ranks of
two variables within their respective samples.
Steps for calculating rS:
1. Sort the X observations from largest to smallest. Assign the number 1 to the largest value
observation, the number 2 to the second largest value observation, and so on. In the
event of a tie, assign the average of the ranks that the tied observations share to each tied
observation. For example, if the third and fourth largest values are tied, we assign a rank
of 3.5 to both observations (the average of 3 and 4). Repeat the procedure for the
observations on Y.
2. Calculate the difference in ranks, di, for each pair of observations on X and Y, and then
calculate di2 (the squared difference in ranks).
3. For a sample size n, the spearman rank correlation is:
6 ∑ni=1 d2i
rs = 1 −
n(n2 − 1)

© IFT. All rights reserved 3


LM09 Parametric and Non-Parametric Tests of Independence 2024 Level I Notes

Example:
(This is based on Question Set from the curriculum.)
You want to determine whether the alpha of a mutual fund is correlated with its expense
ratio. You gather the following information about 9 mutual funds.
Mutual Fund Alpha Expense Ratio
1 -0.52 1.34
2 -0.13 0.40
3 -0.50 1.90
4 -1.01 1.50
5 -0.26 1.35
6 -0.89 0.50
7 -0.42 1.00
8 -0.23 1.50
9 -0.60 1.45
Perform a Spearman rank correlation test based on this sample data. Determine whether to
reject the null hypothesis at the 0.05 level of significance if the critical values are ±2.306.
Solution:
The null and alternate hypotheses are:
H0: ρ = 0 versus Ha: ρ ≠ 0
To calculate the Spearman rank correlation, we first construct the following table:
Mutual Alpha Expense Rank Rank by Difference Difference
Fund Ratio by Expense in Rank Squared
Alpha Ratio
1 -0.52 1.34 6 6 0 0
2 -0.13 0.40 1 9 -8 64
3 -0.50 1.90 5 1 4 16
4 -1.01 1.50 9 2.5 6.5 42.25
5 -0.26 1.35 3 5 -2 4
6 -0.89 0.50 8 8 0 0
7 -0.42 1.00 4 7 -3 9
8 -0.23 1.50 2 2.5 -0.5 0.25
9 -0.60 1.45 7 4 3 9
Sum 144.5
n 2
6 ∑i=1 di
rs = 1 −
n(n2 − 1)
6(144.5)
rs = 1 − = −0.20416
9(92 − 1)
The test statistic is calculated as:

© IFT. All rights reserved 4


LM09 Parametric and Non-Parametric Tests of Independence 2024 Level I Notes

r √n − 2
t=
√1 − r 2
−0.20416 √9 − 2
t= = −0.55177
√1 − 0.204162
Since this value falls within the range of ±2.306, we fail to reject the null hypothesis that the
Spearman rank correlation coefficient is zero.
3. Tests of Independence Using Contingency Table Data
Instructor’s Note:
Focus on the basics of this topic, the probability of being tested on the details is low.
When dealing with categorical or discrete data presented in the form of a contingency table,
we use a chi-squared distributed test statistic.
Consider the following contingency table which classifies 1,594 ETFs based on two
dimensions: size and investment type.
Investment Size Based on Market Capitalization
Type Small Medium Large Total
Value 50 110 343 503
Growth 42 122 202 366
Blend 56 149 520 725
Total 148 381 1,065 1,594
Suppose we want to test whether a relationship exists between the size and investment type,
we can perform a test of independence using a chi-squared distributed test statistic. This
nonparametric test compares actual observed frequencies with those expected on the basis
of independence.
The test statistic is calculated as:

(Oij − Eij )
2


m
2 = i =1
,
Eij

where:
m = number of cells in the table
Oij = observed frequency
(Total row i)  (Total column j )
Eij = expected frequency calculated as: Eij = .
Overall total

This test statistic has degrees of freedom of (r − 1)(c − 1), where r is the number of
categories for the first variable and c is the number of categories of the second variable.
The expected frequency for one cell – small cap value can be calculated as:

© IFT. All rights reserved 5


LM09 Parametric and Non-Parametric Tests of Independence 2024 Level I Notes

503 × 148
Eij = = 46.703
1,594
In the same way we can calculate the expected frequency for all 9 cells to get the following
table.
Expected Frequency of ETFs by Size and Investment Type
Investment Type Size Based on Market Capitalization
Small Medium Large
Value 46.703 120.228 336.070
Growth 33.982 87.482 244.536
Blend 67.315 173.290 484.395
Total 148.000 381.000 1,065.000
We then calculate the squared difference between observed and expected frequencies scaled
by the expected frequency for each cell.

For the small cap value cell, this calculation is:


(50 − 46.703)2
= 0.2327
46.703
We perform the same calculations for other cells and get the following table:
Scaled Squared Deviation for Each Combination of Size and Investment Type
Investment Type Size Based on Market Capitalization
Small Medium Large
Value 0.233 0.870 0.143
Growth 1.892 13.620 7.399
Blend 1.902 3.405 2.617
Finally, we sum all the above values to get a chi-squared test statistic as 32.08025.
Testing Our Hypothesis
The null and alternate hypothesis are:
H0: ETF size and investment type are not related, so these classifications are independent;
Ha : ETF size and investment type are related, so these classifications are not independent.
With a (3-1) x (3 -1) = 4 degrees of freedom and a one-sided test with a 5% level of
significance, the critical value is 9.4877.
Since the calculated chi-squared test statistic (32.08025) is greater than 9.4877 we reject the
null hypothesis of independence and conclude that ETF size and investment type are related.

© IFT. All rights reserved 6


LM09 Parametric and Non-Parametric Tests of Independence 2024 Level I Notes

Summary
LO: Explain parametric and nonparametric tests of the hypothesis that the population
correlation coefficient equals zero, and determine whether the hypothesis is rejected
at a given level of significance.
Parametric test: The significance of a correlation coefficient is tested by using hypothesis
tests concerning correlation. The formula for the t-test is:
r √n − 2
t=
√1 − r 2
where: n – 2 = degrees of freedom
Non-parametric test: The Spearman rank correlation coefficient is equivalent to the usual
correlation coefficient but is calculated on the ranks of two variables within their respective
samples.
LO: Explain tests of independence based on contingency table data.
A chi-square distributed test statistic is used to test for independence of two categorical
variables. This nonparametric test compares actual frequencies with those expected on the
basis of independence.
This test statistic has degrees of freedom of (r − 1)(c − 1), where r is the number of
categories for the first variable and c is the number of categories of the second variable.

© IFT. All rights reserved 7

You might also like