Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def odds_ratio(target_a, target_c, peer_b, peer_d):
- portfolio_x = float(target_a) / float(target_a + target_c)
- portfolio_y = float(peer_b) / float(peer_b + peer_d)
- odds_numer = portfolio_x / (1.0 - portfolio_x)
- odds_denom = portfolio_y / (1.0 - portfolio_y)
- return int(odds_numer / odds_denom)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement