BaşlayınÜcretsiz başlayın

Sampling from the zombie posterior

Again pars contains the data frame representing the posterior zombie IQ distribution you calculated earlier. The code draws sample_indices: a sample of row numbers (a.k.a. indices) from the posterior. Now, let's sample from pars to calculate some new measures!

Bu egzersiz, kursun bir parçasıdır

Fundamentals of Bayesian Data Analysis in R

Kursa Göz Atın

Uygulamalı etkileşimli egzersiz

Bu egzersizi bu örnek kodu tamamlayarak deneyin.

head(pars)
sample_indices <- sample( nrow(pars), size = 10000,
    replace = TRUE, prob = pars$probability)
head(sample_indices)

# Sample from pars to calculate some new measures
pars_sample <- ___
Kodu Düzenle ve Çalıştır