Question: Exercise 1 Write a function variance (x) that calculates the sample variance of the variable in the list 2. The formula for the variance is
Exercise 1 Write a function variance (x) that calculates the sample variance of the variable in the list 2. The formula for the variance is Var(x) where n is the number of items in the list x and r is the average of r. Exercise 2 Write a function covariance(y, x) that calculates the sample covariance of the variables in the lists y und 2. The formula for the covariance is Cova) 2 -7)(x: - 7), where the lists y, and x both have length n
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
