Advertisement
Guest User

Untitled

a guest
Apr 2nd, 2015
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. def odds_ratio(target_a, target_c, peer_b, peer_d):
  2. portfolio_x = float(target_a) / float(target_a + target_c)
  3. portfolio_y = float(peer_b) / float(peer_b + peer_d)
  4.  
  5. odds_numer = portfolio_x / (1.0 - portfolio_x)
  6. odds_denom = portfolio_y / (1.0 - portfolio_y)
  7.  
  8. return int(odds_numer / odds_denom)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement