Skip to content

Instantly share code, notes, and snippets.

Created November 7, 2020 06:14
What would you like to do?
3 ways to do test of normality with Scipy library in Python
import numpy as np
import matplotlib.pyplot as plt
a = np.random.randn(1000) # conforms to the normal distribution
b = np.random.rand(1000) # random values in 0 to 1
fig = plt.figure(figsize=(10, 5))
ax1 = fig.add_subplot(1, 2, 1)
ax2 = fig.add_subplot(1, 2, 2)
ax1.hist(a, bins=100)
ax2.hist(b, bins=100)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment