Skip to content

Instantly share code, notes, and snippets.

@sdia-zz
Created June 29, 2018 09:12
Show Gist options
  • Save sdia-zz/78aa7f51c786eea2180fe0a07a3a0a75 to your computer and use it in GitHub Desktop.
Save sdia-zz/78aa7f51c786eea2180fe0a07a3a0a75 to your computer and use it in GitHub Desktop.
def prob_b_winning(a_success, a_fail, b_success, b_fail):
predict = 0
for i in range(b_success):
predict += math.exp(beta_l(a_success + i, b_fail + a_fail)
- math.log(b_fail + i)
- beta_l(1 + i, b_fail)
- beta_l(a_success, a_fail))
return predict
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment