hw03.pdf - hw03 CS 237 Summer 2019 Homework Three Due date PDF file due Friday May 31st 11:59PM in GradeScope with 6-hour grace period General

hw03.pdf - hw03 CS 237 Summer 2019 Homework Three Due date...

This preview shows page 1 - 2 out of 22 pages.

5/31/2019 hw03 localhost:8889/nbconvert/html/Desktop/CS237/hw03.ipynb?download=false 1/22 CS 237 Summer 2019 Homework Three Due date: PDF file due Friday May 31st @ 11:59PM in GradeScope with 6-hour grace period General Instructions Please complete this notebook by filling in solutions where indicated. Be sure to "Run All" from the Cell menu before submitting. There are two sections to the homework: problems 1 - 6 will be discuss in lab on Wednesday and involve programming, and the remaining 6 problems involve analytical work. Lab Introduction: Poker Probability In this lab we will explore Poker Probability, which is calculating the probability of various hands in the game of poker. This is, again, exploring how to confirm our theoretical understanding with experiments. If our experiments, as we increase the number of trials, converge to our theoretical calculation, then we have almost certainly analyzed it correctly. There are many versions of poker (see here () ) but the game we will study is called "five-card draw." It is described (- how-to-play-five-card-draw-poker-23741.htm) as follows: Once everyone has paid the ante, each player receives five cards face down. A round of betting then occurs. If more than one player remains after that first round of betting, there follows a first round of drawing. Each active player specifies how many cards he or she wishes to discard and replace with new cards from the deck. If you are happy with your holding and do not want to draw any cards, you “stand pat.” Once the drawing round is completed, there is another round of betting. After that if there is more than one player remaining, a showdown occurs in which the player with the best five-card poker hand wins. Here is an excellent short YT video on the basics of Poker: YT (? v=xfqMC3G37VE) The only part we will care about is the final calculation of which hand wins: basically, the least probable hand wins. When you learn poker, then, one of the first things you have to learn is the ordering of the hands from most to least likely. Poker probability refers to calculating the exact probabilities of hands. The Wikipedia article () contains the exact results and the formulae used to calculate them. In this lab we will develop a framework for dealing 5-card hands and empirically estimating the probabilites of various hands. In fact, we will be able to do nearly all the hands commonly encountered. Our only constraint is that for the rarest hand, a Royal Flush, since there are only 4 such hands, the probability is so small it would take too long to get a reasonable estimate, and so we shall ignore this case.
Image of page 1

Subscribe to view the full document.

Image of page 2
  • Summer '19
  • It, Card game

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Ask Expert Tutors You can ask 0 bonus questions You can ask 0 questions (0 expire soon) You can ask 0 questions (will expire )
Answers in as fast as 15 minutes