Menu

1 / 6

How stable is your mean? A small bootstrap experiment in a Python notebook

DEV Community: python·Wenlo·4 days ago
#fRfFtECA
#devtopython#devto#dev#minutes#mean
Reading 0:00
15s threshold

Fourteen fictional tasks took between 17 and 52 minutes. Their mean is a useful summary, but how much does that summary depend on a small sample and one long observation?

This notebook compares mean and median, resamples the observations, plots the distribution of resampled means, and tests a deliberate alternative dataset. It also demonstrates a practical notebook habit: restart and run every cell before trusting the final chart.

Cell 1: keep the sample visible

The data is fictional. It is not a claim about anyone's productivity, and the larger value is not automatically a mistake. Keeping the original observations in the first cell makes the experiment inspectable.

import random from statistics import mean , median , quantiles import matplotlib .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.