LoslegenKostenlos loslegen

rnorm, dnorm, and the weight of newborns

Here is a small data set with the birth weights of six newborn babies in grams.

c(3164, 3362, 4435, 3542, 3578, 4529)

Diese Übung ist Teil des Kurses

Fundamentals of Bayesian Data Analysis in R

Kurs anzeigen

Interaktive Übung

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

# Assign mu and sigma
mu <- ___
sigma <- ___

weight_distr <- rnorm(n = 100000, mean = mu, sd = sigma)
hist(weight_distr, 60, xlim = c(0, 6000), col = "lightgreen")
Code bearbeiten und ausführen