BaşlayınÜcretsiz başlayın

Calculating the variance-covariance matrix

Along with the mean, an equally important statistic for a multivariate observation is its variance-covariance matrix. The variance-covariance matrix generalizes the concept of variance to multiple dimensions.

Bu egzersiz, kursun bir parçasıdır

Multivariate Probability Distributions in R

Kursa Göz Atın

Egzersiz talimatları

  • Calculate the variance-covariance matrix of the first four numeric variables in columns 2 through 5.
  • Round the values of the variance-covariance matrix to two decimal places.

Uygulamalı etkileşimli egzersiz

Bu egzersizi bu örnek kodu tamamlayarak deneyin.

# Calculate the variance-covariance matrix of the variables Alcohol, Malic, Ash, Alcalinity
var.wine <- var(___)

# Round the matrix values to two decimal places 
round(___, ___)
Kodu Düzenle ve Çalıştır