rafalab / dsbook-part-2

Repository for Advanced Data Science Book
54 stars 25 forks source link

Probable typo in code block #4

Closed biscotty666 closed 5 months ago

biscotty666 commented 6 months ago

http://rafalab.dfci.harvard.edu/dsbook-part-2/prob/discrete-probability.html#monte-carlo-example

(hands[1] %in% aces & hands[2] %in% facecard) | 
  (hands[2] %in% aces & hands[1] %in% facecard)
#> [1] FALSE

I'm almost certain that hand and not hands is what is meant.

Thank you for the wonderful book.

rafalab commented 5 months ago

Thanks for finding and reporting this. I have made the change locally and will push to GitHub soon.