Skip to content

Instantly share code, notes, and snippets.

@galenseilis
Last active December 17, 2023 02:02
Show Gist options
  • Save galenseilis/4bd603d967c2ff82f52ecc073148659e to your computer and use it in GitHub Desktop.
Save galenseilis/4bd603d967c2ff82f52ecc073148659e to your computer and use it in GitHub Desktop.
# Ugly one-liner from an interactive session... sorry!
import numpy as np;
from scipy.stats import ttest_1samp as t;
import matplotlib.pyplot as plt;
[
plt.scatter(
np.arange(1,101),
[t(np.random.normal(size=n+1), 1).pvalue for n in range(100)],
alpha=1/np.sqrt(100),
color='g')
for j in range(1000)];
plt.show()
@galenseilis
Copy link
Author

Output:

image

@galenseilis
Copy link
Author

Looks like some sort of convergent behaviour to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment