LoslegenKostenlos loslegen

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.

Diese Übung ist Teil des Kurses

Multivariate Probability Distributions in R

Kurs anzeigen

Anleitung zur Übung

  • 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.

Interaktive Übung

Versuche dich an dieser Übung, indem du diesen Beispielcode vervollständigst.

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

# Print the first 6 samples


# Check multivariate normality
mvn(___, mvnTest = "___", multivariatePlot = "___")
Code bearbeiten und ausführen