Skip to content

Instantly share code, notes, and snippets.

@MokoSan
Created November 7, 2021 21:19
Show Gist options
  • Select an option

  • Save MokoSan/1f4ffb93c1fced56f1e3457195395b16 to your computer and use it in GitHub Desktop.

Select an option

Save MokoSan/1f4ffb93c1fced56f1e3457195395b16 to your computer and use it in GitHub Desktop.
How To Lie With Small Samples - Visually Explained.
import numpy as np
import matplotlib.pyplot as plt
np.random.seed(123) # For reproducibility
def std_normal_dist_hist(sample_size):
dataset_1 = np.random.normal(size = sample_size)
plt.hist(dataset_1, density=True, bins=30)
std_normal_dist_hist(10)
std_normal_dist_hist(10000)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment