MulaiMulai sekarang secara gratis

Simulating central limit theorem

Now that we have some practice creating a sample, we'll look at simulating the central limit theorem, similar to what you saw in the slides. We'll also continue dealing with a standard die numbered 1 through 6.

In order to do this, you'll take a collection of sample means from numpy and examine the distribution of them using the matplotlib package, which has been imported as plt for the rest of the chapter.

Latihan ini adalah bagian dari kursus

Practicing Statistics Interview Questions in Python

Lihat Kursus

Latihan interaktif praktis

Cobalah latihan ini dengan menyelesaikan kode contoh berikut.

from numpy.random import randint

# Create a list of 1000 sample means of size 30
means = [randint(____, ____, ____).mean() for i in ____]
Edit dan Jalankan Kode