3 ways to do test of normality with Scipy library in Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
# https://docs.scipy.org/doc/numpy-1.15.0/reference/routines.random.html | |
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) | |
fig.tight_layout() | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment