开始使用免费开始使用

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.

本练习是课程的一部分

Multivariate Probability Distributions in R

查看课程

练习说明

  • Compute the contour for a standard bivariate normal which contains probability \(p=0.9\).
  • Calculate the contour for a bivariate normal with mean mu.sim and variance-covariance matrix sigma.sim which contains probability \(p=0.95\).

交互式实操练习

通过完成这段示例代码来试试这个练习。

# Probability contours for a standard bivariate normal
qmvnorm(___, tail = "both", sigma = diag(2))

# Probability contours for a bivariate normal 
编辑并运行代码