krit.club logo

Statistics and Probability - Correlation

Grade 11IB_AI

Review the key concepts, formulae, and examples before starting your quiz.

🔑Concepts

•

Bivariate data involves two variables, usually denoted as xx (the independent/explanatory variable) and yy (the dependent/response variable).

•

A scatter diagram is used to visualize the relationship between two variables. Patterns can be described by their direction (positive or negative), form (linear or non-linear), and strength (strong, moderate, or weak).

•

Pearson's product-moment correlation coefficient (rr) measures the strength and direction of a linear relationship. Its value ranges from −1-1 to 11, where r=1r = 1 is a perfect positive linear correlation and r=−1r = -1 is a perfect negative linear correlation.

•

Spearman's rank correlation coefficient (rsr_s) is used when data is ranked or when the relationship is monotonic but not necessarily linear. It is calculated based on the ranks of the data points.

•

Correlation does not imply causation. Two variables may be highly correlated due to a third 'lurking' variable or pure coincidence.

•

The regression line of yy on xx (least squares regression line) is the line that minimizes the sum of the squares of the vertical distances from the data points to the line. It always passes through the mean point (xˉ,yˉ)(\bar{x}, \bar{y}).

•

Interpolation is the process of predicting a value within the range of the given data set and is generally reliable. Extrapolation is predicting outside the range and is often unreliable.

📐Formulae

r=∑(xi−xˉ)(yi−yˉ)∑(xi−xˉ)2∑(yi−yˉ)2r = \frac{\sum (x_i - \bar{x})(y_i - \bar{y})}{\sqrt{\sum (x_i - \bar{x})^2 \sum (y_i - \bar{y})^2}}

rs=1−6∑di2n(n2−1)r_s = 1 - \frac{6 \sum d_i^2}{n(n^2 - 1)}

xˉ=∑xin,yˉ=∑yin\bar{x} = \frac{\sum x_i}{n}, \quad \bar{y} = \frac{\sum y_i}{n}

y=mx+cy = mx + c

💡Examples

Problem 1:

Given the following paired data for xx and yy: (2,5),(4,10),(6,12),(8,18)(2, 5), (4, 10), (6, 12), (8, 18). Calculate the mean point (xˉ,yˉ)(\bar{x}, \bar{y}) and the Pearson correlation coefficient rr.

Solution:

First, calculate the means: xˉ=2+4+6+84=5\bar{x} = \frac{2 + 4 + 6 + 8}{4} = 5 yˉ=5+10+12+184=11.25\bar{y} = \frac{5 + 10 + 12 + 18}{4} = 11.25 The mean point is (5,11.25)(5, 11.25). Using a GDC (Graphic Display Calculator), the value of rr is approximately 0.9830.983.

Explanation:

The mean point is found by averaging the xx values and yy values separately. For IB AI, the correlation coefficient rr is typically found using the 'LinReg' function on the GDC.

Problem 2:

Calculate Spearman's rank correlation coefficient rsr_s for the following data sets which have been ranked from 11 to 44: Rank xx: 1,2,3,41, 2, 3, 4 Rank yy: 2,1,4,32, 1, 4, 3

Solution:

First, calculate the differences d=Rankx−Rankyd = Rank_x - Rank_y and d2d^2: RankxRankydd212−11211134−114311\begin{array}{r|r|r|r} Rank_x & Rank_y & d & d^2 \\ \hline 1 & 2 & -1 & 1 \\ 2 & 1 & 1 & 1 \\ 3 & 4 & -1 & 1 \\ 4 & 3 & 1 & 1 \end{array} Sum of d2d^2: 111+14\begin{array}{r} 1 \\ 1 \\ 1 \\ + 1 \\ \hline 4 \end{array} Using n=4n = 4 and ∑d2=4\sum d^2 = 4: rs=1−6(4)4(42−1)r_s = 1 - \frac{6(4)}{4(4^2 - 1)} rs=1−244(15)=1−2460=1−0.4=0.6r_s = 1 - \frac{24}{4(15)} = 1 - \frac{24}{60} = 1 - 0.4 = 0.6

Explanation:

Spearman's rank correlation is calculated by finding the difference in ranks for each pair, squaring those differences, and applying the formula. rs=0.6r_s = 0.6 suggests a moderate positive monotonic relationship.

Problem 3:

A regression line is found to be y=2.5x+10y = 2.5x + 10. If the range of xx values in the original data was 2≤x≤202 \leq x \leq 20, predict the value of yy when x=15x = 15 and state if this prediction is reliable.

Solution:

Substitute x=15x = 15 into the equation: y=2.5(15)+10y = 2.5(15) + 10 y=37.5+10=47.5y = 37.5 + 10 = 47.5 The prediction is reliable because x=15x = 15 lies within the range 2≤x≤202 \leq x \leq 20.

Explanation:

Predicting values within the observed data range is called interpolation. Since 1515 is between 22 and 2020, the model is expected to be valid.

Correlation Grade 11 Notes & Examples | IB AI Maths