11 lines
325 B
Python
11 lines
325 B
Python
## This module represents the second chapter of the book
|
|
## "Essential Math for Data Science" - Thomas Nield
|
|
## Chaper 2 - Probability
|
|
|
|
# 2.0 odds means than an events has twice the probabilities to happen than not
|
|
def p_odds_to_probability(o):
|
|
return (o / (1 + o))
|
|
|
|
def p_probability_to_odds(p):
|
|
return (p / (1 - p))
|