Consider the following bivariate data.

Point A B C D E F G H I J
x 3 4 2 1 7 2 1 0 4 2
y 1 7 3 3 6 6 5 0 6 2

(b) Calculate the covariance. (Give your answer correct to two decimal places.)


(c) Calculate sx and sy. (Give your answers correct to three decimal places.)
sx =
sy =

(d) Calculate r using formula 13.2. (Give your answer correct to two decimal places.)


(e) Calculate r using formula 13.3. (Give your answer correct to two decimal places.)

What did you get using the given formulas 13.2 and 13.3?

this is what I done and it was wrong mean of x = 2.6 sd = 2.01108, y mean 3.9, sd 2.42441; then I added the sd 4.43549/(2.011080)(2.42441) = 5.3471

c. I just added all the x together = 26
sy = 39 The formula for 13.2 is r=covar(xto the 1power and y to 1power)= covar (x,y)/Sx X Sy

13.3 formula is ss(xy)/ sqrt ss(x)*ss(y) and that I got 127/sqrt 26*205which I had for the y squared
and that I got 190.5 which was wrong.

To calculate the covariance, you can use the following formula:

cov(x,y) = Σ((xi - x̄)(yi - ȳ)) / (n - 1)

Where:
- Σ represents the sum of the values
- xi and yi are the individual values of x and y
- x̄ and ȳ are the means of x and y, respectively
- n is the number of data points

Step 1: Calculate the means of x and y
x̄ = (3 + 4 + 2 + 1 + 7 + 2 + 1 + 0 + 4 + 2) / 10 = 2.6
ȳ = (1 + 7 + 3 + 3 + 6 + 6 + 5 + 0 + 6 + 2) / 10 = 4.9

Step 2: Calculate the covariance
cov(x,y) = ((3 - 2.6)(1 - 4.9) + (4 - 2.6)(7 - 4.9) + (2 - 2.6)(3 - 4.9) + (1 - 2.6)(3 - 4.9) + (7 - 2.6)(6 - 4.9) + (2 - 2.6)(6 - 4.9) + (1 - 2.6)(5 - 4.9) + (0 - 2.6)(0 - 4.9) + (4 - 2.6)(6 - 4.9) + (2 - 2.6)(2 - 4.9)) / (10 - 1)

cov(x,y) = (-2.6 * -3.9 + 1.4 * 2.1 + -0.6 * -1.9 + -1.6 * -1.9 + 4.4 * 1.1 + -0.6 * 1.1 + -1.6 * 0.1 + -2.6 * -4.9 + 1.4 * 1.1 + -0.6 * -2.9) / 9

cov(x,y) = 0.18

So, the covariance is 0.18.

To calculate the standard deviation (sx and sy), you can use the following formula:

s = √(Σ(xi - x̄)² / (n - 1))

Where:
- Σ represents the sum of the values
- xi is the individual value
- x̄ is the mean of the values
- n is the number of data points

Step 1: Calculate the sum of squared differences for x
Σ(xi - x̄)² = (3 - 2.6)² + (4 - 2.6)² + (2 - 2.6)² + (1 - 2.6)² + (7 - 2.6)² + (2 - 2.6)² + (1 - 2.6)² + (0 - 2.6)² + (4 - 2.6)² + (2 - 2.6)²

Σ(xi - x̄)² = 0.56

Step 2: Calculate the sum of squared differences for y
Σ(yi - ȳ)² = (1 - 4.9)² + (7 - 4.9)² + (3 - 4.9)² + (3 - 4.9)² + (6 - 4.9)² + (6 - 4.9)² + (5 - 4.9)² + (0 - 4.9)² + (6 - 4.9)² + (2 - 4.9)²

Σ(yi - ȳ)² = 21.49

Step 3: Calculate the standard deviation
sx = √(0.56 / (10 - 1)) = 0.27
sy = √(21.49 / (10 - 1)) = 1.75

So, sx = 0.27 and sy = 1.75.

To calculate the correlation coefficient (r), you can use two formulas:

Formula 13.2:
r = cov(x, y) / (sx * sy)

Formula 13.3:
r = Σ((xi - x̄)(yi - ȳ)) / (√(Σ(xi - x̄)²) * √(Σ(yi - ȳ)²))

Using the covariance value from earlier (0.18), you can calculate r using both formulas.

Formula 13.2:
r = 0.18 / (0.27 * 1.75) = 0.38

Formula 13.3:
r = (0.56) / (√(0.56) * √(21.49)) = 0.38

So, r = 0.38.