Cover Page

Probability, Decisions and Games

A Gentle Introduction using R

 

Abel Rodríguez
Bruno Mendes

 

 

 

 

 

Wiley Logo

To Sabrina
Abel
To my family
Bruno

Preface

Why Gambling and Gaming?

Games are a universal part of human experience and are present in almost every culture; the earliest games known (such as senet in Egypt or the Royal Game of Ur in Iraq) date back to at least 2600 B.C. Games are characterized by a set of rules regulating the behavior of players and by a set of challenges faced by those players, which might involve a monetary or nonmonetary wager. Indeed, the history of gaming is inextricably linked to the history of gambling, and both have played an important role in the development of modern society.

Games have also played a very important role in the development of modern mathematical methods, and they provide a natural framework to introduce simple concepts that have wide applicability in real-life problems. From the point of view of the mathematical tools used for their analysis, games can be broadly divided between random games and strategic games. Random games pit one or more players against “nature” that is, an unintelligent opponent whose acts cannot be predicted with certainty. Roulette is the quintessential example of a random game. On the other hand, strategic games pit two or more intelligent players against each other; the challenge is for one player to outwit their opponents. Strategic games are often subdivided into simultaneous (e.g., rock–paper–scissors) and sequential (e.g., chess, tic-tac-toe) games, depending on the order in which the players take their actions. However, these categories are not mutually exclusive; most modern games involve aspects of both strategic and random games. For example, poker incorporates elements of random games (cards are dealt at random) with those of a sequential strategic game (betting is made in rounds and “bluffing” can win you a game even if your cards are worse than those of your opponent).

One of the key ideas behind the mathematical analysis of games is the rationality assumption, that is, that players are indeed interested in winning the game and that they will take “optimal” (i.e., rational) steps to achieve this. Under these assumptions, we can postulate a theory of how decisions are made, which relies on the maximization of a utility function (often, but certainly not always, related to the amount of money that is made by playing the game). Players attempt to maximize their own utility given the information available to them at any given moment. In the case of random games, this involves making decisions under uncertainty, which naturally leads to the study of probability. In fact, the formal study of probability was born in the seventeenth century from a series of questions posed by an inveterate gambler (Antoine Gambaud, known as the Chevalier de Méré). De Méré, suffered severe financial losses for assessing incorrectly his chances of winning in certain games of dice. Contrary to the ordinary gambler of the time, he pursued the cause of his error with the help of Blaise Pascal, which in turn led to an exchange of letters with Pierre de Fermat and the development of probability theory.

Decision theory also plays an important role in strategic games. In this case, optimality often means evaluating the alternatives available to other players and finding a “best response” to them. This is often taken to mean minimizing losses, but the two concepts are not necessarily identical. Indeed, one important insight gleaned from game theory (the area of mathematics that studies strategic games) is that optimal strategies for zero-sum games (i.e., those games where a player can win only if another loses the same amount) and non zero-sum games can be very different. Also, it is important to highlight that randomness plays a role even in purely strategic games. An excellent example is the game of rock–paper–scissors. In principle, there is nothing inherently random in the rules of this game. However, the optimal strategy for any given player is to select his or her move uniformly at random among the three possible options that give the game its name.

The mathematical concepts underlying the analysis of games and gambles have practical applications in all realms of science. Take for example the game of blackjack. When you play blackjack, you need to sequentially decide whether to hit (i.e., get an extra card), stay (i.e., stop receiving cards) or, when appropriate, double down, split, or surrender. Optimally playing the game means that these decisions must be taken not only on the basis of the cards you have in your hand but also on the basis of the cards shown by the dealer and all other players. A similar problem arises in the diagnosis and treatment of medical conditions. A doctor has access to a series of diagnostic tests and treatment options; decisions on which one is to be used next needs to be taken sequentially based on the outcomes of previous tests or treatments for this as well as other patients. Poker provides another interesting example. As any experienced player can attest, bluffing is one of the most important parts of the game. The same rules that can be used to decide how to optimally bluff in poker can also be used to design optimal auctions that allow the auctioneer to extract the highest value assigned by the bidders to the object begin auctioned. These strategies are used by companies such as Google and Yahoo to allocate advertising spots.

Using this Book

The goal of this book is to introduce basic concepts of probability, statistics, decision theory, and game theory using games. The material should be suitable for a college-level general education course for undergraduate college students who have taken an algebra or pre-algebra class. In our experience, motivated high-school students who have taken an algebra course should also be capable of handling the material.

The book is organized into 13 chapters, with about half focusing on general concepts that are illustrated using a wide variety of games, and about half focusing specifically on well-known casino games. More specifically, the first two chapters of the book are dedicated to a basic discussion of utility and probability theory in finite, discrete spaces. Then we move to a discussion of five popular casino games: roulette, lotto, craps, blackjack, and poker. Roulette, which is one of the simplest casino games to play and analyze, is used to illustrate the basic concepts in probability such as expectations. Lotto is used to motivate counting rules and the notions of permutations and combinatorial numbers that allow us to compute probabilities in large equiprobable spaces. The games of craps and blackjack are used to illustrate and develop conditional probabilities. Finally, the discussion of poker is helpful to illustrate how many of the ideas from previous chapters fit in together. The last four chapters of the book are dedicated to game theory and strategic games. Since this book is meant to support a general education course, we restrict attention to simultaneous and sequential games of perfect information and avoid games of imperfect information.

The book uses computer simulations to illustrate complex concepts and convince students that the calculations presented in the book are correct. Computer simulations have become a key tool in many areas of scientific inquiry, and we believe that it is important for students to experience how easy access to computing power has changed science over the last 25 years. During the development of the book, we experimented with using spreadsheets but decided that they did not provide enough flexibility. In the end we settled for using R (https://www.r-project.org). R is an interactive environment that allows users to easily implement simple simulations even if they have limited experience with programming. To facilitate its use, we have included an overview and introduction to the R in Appendix A, as well as sidebars in each chapter that introduces features of the language that are relevant for the examples discussed in them. With a little extra work, this book could be used as the basis for a course that introduces students to both probability/statistics and programming. Alternatively, the book can also be read while ignoring the R commands and focusing only on the graphs and other output generated by it.

In the past, we have paired the content of this book with screenings of movies from History Channel's Breaking Vegas series. We have found the movies Beat the Wheel, Roulette Attack, Dice Dominator, and Professor Blackjack (each approximately 45 min in length) particularly fitting. These movies are helpful in explaining the rules of the games and providing an entertaining illustration of basic concepts such as the law of large numbers.

November 2017

Abel Rodríguez
Bruno Mendes
Santa Cruz, CA

Acknowledgments

We would like to thank all our colleagues, teaching assistants, and students who thoughtfully helped us to improve our manuscript. In particular, we would like to thank Matthew Heiner and Lelys Bravo for their helpful comments and corrections to earlier drafts of this book. Of course, any inaccuracy is the sole responsibility of the authors.

About the Companion Website

This book is accompanied by a companion website:

www.wiley.com/go/Rodriguez/Probability_Decisions_and_Games

Student Website contains:

flastg001