Get startedGet started for free

Generate samples from multivariate t-distribution

Though multivariate normal is widely used, not all multivariate data follow a normal distribution. Multivariate t-distributions can accommodate heavy-tailed distribution in each direction. In this exercise, you will learn how to draw random samples from a multivariate t-distribution. We will use the same mu.sim and sigma.sim parameters that were used to generate samples from multivariate normal distributions.

This exercise is part of the course

Multivariate Probability Distributions in R

View Course

Exercise instructions

  • Generate 200 samples from a bivariate t-distribution with 5 degrees of freedom. Label the object multt.sample.
  • Print the first six samples.
  • Check whether the samples follow a multivariate normal distribution using the Mardia Test and plot the relevant qqplot for the test.

Hands-on interactive exercise

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

# Generate the t-samples 
multt.sample <- ___

# Print the first 6 samples


# Check multivariate normality
mvn(___, mvnTest = "___", multivariatePlot = "___")
Edit and Run Code