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.0074750548545281818

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


Out[3]:
0.62478623578787418

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


Out[4]:
-0.41634904286746799

Activity

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


In [ ]: