Y
Hacker News
new
|
ask
|
show
|
jobs
by
bagrow
802 days ago
The best way to compute the empirical CDF (ECDF) is by sorting the data:
N = len(data) X = sorted(data) Y = np.arange(N)/N plt.plot(X,Y)
Technically, you should plot this with `plt.step`.
1 comments
andrewla
802 days ago
scipy even has a built-in method (scipy.stats.ecdf) for doing exactly this.
link
vvanirudh
802 days ago
Neat! That is so simple and in hindsight, makes a lot of sense. Thanks!
link