Machine Learning, Data Science.
histogram above). For the sake of argument, let’s say that anything between .45-.55 is fair. We can then compute the result using a simple count. import numpy as np n_fair = len(np.where((trace['p'] >= 0.45) & (trace['p'] < 0.55))[0]) n_total = len(trace['p']) print(float(n_fair / n_total))