Calculating probability contours using qmvnorm
The inverse problem to the calculation of cumulative probability is as follows: for a given a probability \(p\) calculate the contour that contains \(p\) proportion of the total volume of the density. This contour is the same as the \(p^{th}\) quantile of the distribution. The qmvnorm() function provides the tools to perform the above calculations.
Bu egzersiz, kursun bir parçasıdır
Multivariate Probability Distributions in R
Egzersiz talimatları
- Compute the contour for a standard bivariate normal which contains probability \(p=0.9\).
- Calculate the contour for a bivariate normal with mean
mu.simand variance-covariance matrixsigma.simwhich contains probability \(p=0.95\).
Uygulamalı etkileşimli egzersiz
Bu egzersizi bu örnek kodu tamamlayarak deneyin.
# Probability contours for a standard bivariate normal
qmvnorm(___, tail = "both", sigma = diag(2))
# Probability contours for a bivariate normal