Question: 1. If X is a Python list, a 1-dimensional Numpy array, etc., you can compute the sample variance of X using the following formula: var(X)
1. If X is a Python list, a 1-dimensional Numpy array, etc., you can compute the sample variance of X using the following formula: var(X) = (x1 x) (x1 x) + (x2 x) (x2 x) + + (xn x) (xn x) n 1 where n = len(X) and x is the mean (aka average) of X. Suppose X = np.array([1,3,2,5,8,7,12,2,4]). Write your own Python code to find var(X). Do NOT use np.cov( ).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
