Postupné výhry na World Series of Poker

Probability Puzzles in R

Peter Chi

Assistant Professor of Statistics Villanova University

World Series of Poker

  • V posledních letech ~6 000 účastníků
  • Výhry pro nejlepších 10 % – cash

 

Pokerový profesionál Ronnie Bardah:

  • Cashoval v letech 2010, 2011, 2012, 2013, 2014
Probability Puzzles in R

Zjednodušující předpoklady

  • 6 000 hráčů každý rok
  • Stejní hráči každý rok
  • Všichni hráči mají stejné schopnosti
Probability Puzzles in R

Funkce intersect

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
Probability Puzzles in R

Ukládání cashů do matice

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
Probability Puzzles in R

Funkce 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
Probability Puzzles in R

Simulujme<br> World Series of Poker!

Probability Puzzles in R

Preparing Video For Download...