博雅数据机器学习10
博雅数据机器学习10
贝叶斯定理
## 计算队1获胜的概率prob_win_1
prob_win_1 = 1 - prob_win_0
## 计算队1取胜时队0是东道主的概率
prob_win_1_home_0 = 1 - prob_win_1_home_1
## 计算队0取胜时队0是东道主的概率
prob_win_0_home_0 = 1 - prob_win_0_home_1
## 计算队0是东道主的概率
prob_home_0 = prob_win_1_home_0*prob_win_1 + prob_win_0_home_0*prob_win_0
## 队1在客场取胜的概率
prob_home_0_win_1 = round(prob_win_1_home_0*prob_win_1/prob_home_0, 3)
print(prob_home_0_win_1)