LoslegenKostenlos loslegen

Sampling a Gaussian distribution

When we face a problem where we are provided with samples from probability distributions and we want to recover their parameters, we need to estimate them. When the samples come from only one distribution, the estimation is usually straightforward.

Gaussian distributions are really useful in understanding the main properties of probability distributions. In this exercise, you will learn (1) how to create a sample from this distribution, (2) how to estimate its parameters if you were only provided with the data and (3) how to visualize the estimated distribution.

Diese Übung ist Teil des Kurses

Mixture Models in R

Kurs anzeigen

Interaktive Übung

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

# Set seed
set.seed(1313)

# Simulate a Gaussian distribution
simulation <- rnorm(n = ___, mean = ___, ___ = ___)

# Check first six values
head(___)
Code bearbeiten und ausführen