feat: math chapter done + editorconfig + remove pycache
This commit is contained in:
10
src/modules/probability.py
Normal file
10
src/modules/probability.py
Normal file
@@ -0,0 +1,10 @@
|
||||
## 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))
|
||||
Reference in New Issue
Block a user