Get startedGet started for free

Expected value vs. sample mean

The app to the right will take a sample from a discrete uniform distribution, which includes the numbers 1 through 9, and calculate the sample's mean. You can adjust the size of the sample using the slider. Note that the expected value of this distribution is 5.

A sample is taken, and you win twenty dollars if the sample's mean is less than 4. There's a catch: you get to pick the sample's size.

Which sample size is most likely to win you the twenty dollars?

This exercise is part of the course

Introduction to Statistics in Python

View Course

Hands-on interactive exercise

Turn theory into action with one of our interactive exercises

Start Exercise