Code
import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import norm
rng = np.random.default_rng(151)
p = 0.3
sigma = np.sqrt(p * (1 - p))
reps = 10_000 # simulated copies of Z_n for each n
ns = [1, 5, 25, 100, 1000, 10_000]
fig, axes = plt.subplots(2, 3, figsize=(12, 6))
x = np.linspace(-4, 4, 400)
for ax, n in zip(axes.flat, ns):
# S_n ~ Binomial(n, p)
S = rng.binomial(n, p, size=reps)
z = (S - n * p) / (sigma * np.sqrt(n)) # Z_n = (S_n - np) / (sigma sqrt(n))
ax.hist(z, bins=np.linspace(-4, 4, 30), density=False)
ax.plot(x, norm.pdf(x), "k")
ax.set_xlim(-4, 4)
ax.set_title(f"n = {n}")
ax.set_xlabel(r"$Z_n$")
plt.tight_layout()
plt.show()