Calculer $\mathrm{Cov}(x,y)$ et $\rho(x,y)$ à partir de deux tableaux numpy en utilisant `np.cov` et `np.corrcoef`.
Choisissez une approche :
En calculant np.cov(x, y, ddof=0)[0,1] et np.corrcoef(x, y)[0,1], puis en vérifiant à la main
np.cov(x, y, ddof=0)[0,1]
np.corrcoef(x, y)[0,1]
Utiliser les fonctions numpy pour obtenir covariance et coefficient de corrélation empiriques, et comparer aux formules $\mathrm{Cov}(x,y)=\tfrac{1}{n}\sum(x_i-\bar x)(y_i-\bar y)$ et $\rho=\mathrm{Cov}/(\sigma_x\sigma_y)$.