Forked from benjaminrose/Cumulative distribution function.ipynb
Created
December 16, 2015 14:08
-
-
Save cadrev/5578063bda418ffa599a to your computer and use it in GitHub Desktop.
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 | |
data = np.random.randn(100) | |
data = np.sort(data) | |
cdf = (np.arange(len(data))+1.0)/len(data) | |
'''C.D.F. | |
C.D.F. is the number of points smaller then the current value. | |
For each value in the data, increment up by 1/len(data). | |
''' | |
plt.figure() | |
plt.plot(data, cdf) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment