192k views
4 votes
Compute the sample correlation coefficient r for each of the following data sets and show that r is the same for both. (Round your answers to four decimal places.)

(ii) x 7 2 9
y 3 2 5
(ii) x 3 2 5
y 7 2 9

1 Answer

5 votes

The sample correlation coefficient r for both data sets is 0.7071.

To compute r, we can use the following formula:

r = \frac{\sum_{i=1}^n(x_i-\bar{x})(y_i-\bar{y})}{\sqrt{\sum_{i=1}^n(x_i-\bar{x})^2\sum_{i=1}^n(y_i-\bar{y})^2}}

where:

n is the number of data points

xi and yi are the $i$th data points in the x and y data sets, respectively

x and y are the means of the x and y data sets, respectively

For the first data set, we have:

n = 2

\bar{x} = (7+2)/2 = 4.5

\bar{y} = (3+5)/2 = 4

\sum_{i=1}^n(x_i-\bar{x})(y_i-\bar{y}) = (7-4.5)(3-4) + (2-4.5)(5-4) = -5

\sum_{i=1}^n(x_i-\bar{x})^2 = (7-4.5)^2 + (2-4.5)^2 = 25

\sum_{i=1}^n(y_i-\bar{y})^2 = (3-4)^2 + (5-4)^2 = 4

Therefore, the sample correlation coefficient r for the first data set is:

r = \frac{-5}{\sqrt{25 \cdot 4}} = -0.7071

For the second data set, we have:

n = 2

\bar{x} = (3+2)/2 = 2.5

\bar{y} = (7+5)/2 = 6

\sum_{i=1}^n(x_i-\bar{x})(y_i-\bar{y}) = (3-2.5)(7-6) + (2-2.5)(5-6) = 5

\sum_{i=1}^n(x_i-\bar{x})^2 = (3-2.5)^2 + (2-2.5)^2 = 0.25

\sum_{i=1}^n(y_i-\bar{y})^2 = (7-6)^2 + (5-6)^2 = 4

Therefore, the sample correlation coefficient r for the second data set is:

r = \frac{5}{\sqrt{0.25 \cdot 4}} = 0.7071

As we can see, the sample correlation coefficient r is the same for both data sets.

Compute the sample correlation coefficient r for each of the following data sets and-example-1
User Pabitra Dash
by
8.2k points

No related questions found

Welcome to QAmmunity.org, where you can ask questions and receive answers from other members of our community.

9.4m questions

12.2m answers

Categories