Get startedGet started for free

Density of multivariate t-distribution

In this exercise, you will calculate the density of multivariate t-distributions using the 200 samples generated in the previous exercise, that were stored in the multt.sample object.

This exercise is part of the course

Multivariate Probability Distributions in R

View Course

Exercise instructions

  • Calculate the density heights of the 200 samples in multt.sample for a bivariate t-distribution with location mu.sim, variance-covariance matrix sigma.sim and 5 degrees of freedom.
  • Create a 3d scatterplot to visualize the density heights at each of the 200 points.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Calculate densities
multt.dens <- dmvt(___) 

# Plot 3D heights of densities
___(___(___, multt.dens),     
                 color = "blue", pch = "", type = "h",             
                              xlab = "x", ylab = "y", zlab = "density")
Edit and Run Code