Question: Problem 2 Given two lists x and y, return the correlation coefficient between x and y rounded to 2 decimal places. The correlation coefficient is

Problem 2 Given two lists x and y, return the correlation coefficient between x and y rounded to 2 decimal places. The correlation coefficient is defined as: r= (Xi ) (yi -T) ( (xi )? (yi ) Note: To compute the square root of a number x, import math library, then use math.sqrt(x) Hint: compute each component(each one of the summations) seperately, and then combine them to get r. In [ ]: import math def correlation_coeffient(list_a, list_b): ### YOUR CODE HERE correlation_coeffient([4.2,1.1,2.0], [8.3,3.0,6.5]) #0.91
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
