世界扑克大赛中的连续获奖

R 中的概率谜题

Peter Chi

Assistant Professor of Statistics Villanova University

世界扑克大赛

  • 近年约 6000 名参赛者
  • 前 10% 获奖金(cashing)

 

职业选手 Ronnie Bardah:

  • 2010、2011、2012、2013、2014 年获奖
R 中的概率谜题

简化假设

  • 每年 6000 名选手
  • 每年为同一批选手
  • 所有选手能力相同
R 中的概率谜题

intersection 函数

players <- c(1:20)

cash_year1 <- sample(players, 4) cash_year1
20  4 11 14
cash_year2 <- sample(players, 4)
cash_year2
18  7 19  4
intersect(cash_year1, cash_year2)
4
R 中的概率谜题

将获奖存为矩阵

players <- c(1:20)
cashes <- replicate(3, sample(players, 4))
cashes
      [,1] [,2] [,3]
 [1,]    4    5    1
 [2,]   11   19    6
 [3,]   18   16    9
 [4,]   12   14   17
R 中的概率谜题

Reduce 函数

cashes <- replicate(3, sample(players, 4))
cashes
      [,1] [,2] [,3]
 [1,]    4    5    1
 [2,]   11   19    6
 [3,]   18   16    9
 [4,]   12   14   17
in_all_three <- Reduce(intersect, list(
    cashes[, 1], cashes[, 2], cashes[, 3]))

in_all_three
integer(0)
length(in_all_three)
0
R 中的概率谜题

让我们模拟一下<br>世界扑克大赛!

R 中的概率谜题

Preparing Video For Download...