Percentiles


In [1]:
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt

vals = np.random.normal(0, 0.5, 10000)

plt.hist(vals, 50)
plt.show()



In [2]:
np.percentile(vals, 50)


Out[2]:
0.0021422057356575478

In [3]:
np.percentile(vals, 90)


Out[3]:
0.64070301059941248

In [4]:
np.percentile(vals, 20)


Out[4]:
-0.41207346812009299

Activity

Experiment with different parameters when creating the test data. What effect does it have on the percentiles?


In [ ]: