Major notions of probability and calculus tend to be perceived by many students as abstract, and remote from their own activities and daily environments. Thus, a competitive prize game offers an appealing invitation to explore core notions from those fields, especially so if it combines simple rules with fairly complex dynamics, the analysis of which requires key concepts from probability and calculus.

Le Her is a strategic two-person prize game, the classic version of which uses a Bridge deck of 52 cards. Rather than using playing cards I describe the game using independent unit uniform random variables (rvs), which we denote as X, Y and Z; following the tradition of the original game I will call realizations of these rvs as “card values”.

Player Amy (\(A\)) is dealt card X, her opponent Bob (\(B\)) is dealt card Y; initially both players know only the value of their own card. First \(A\) decides to retain her card (that is, X) or to exchange her card with that of \(B\). In the latter case, after swapping \(A\) holds card Y and \(B\) holds card X, and both players know at this point the value of both cards. After \(A\) has made her decision – no matter which – \(B\) may either draw a new, independent card Z or else retain the card that he holds at this stage. The game is won by the person holding the higher card value after both decisions are made.

A few simple observations serve to illustrate the logic of the game. First, \(A\) will tend to exchange the cards if her card value X seems too low to win; on the other hand, if X is already a relatively high value then she will retain her card. If she chooses to exchange, after swapping \(B\) will know both card values X and Y, and then the game holds no uncertainty for him anymore. Specifically, if \(B\) receives a higher card value from \(A\) (that is, \(\textbf{X}> \textbf{Y}\)) then his win is already guaranteed, and drawing a new card Z would only impose an avoidable risk with no additional improvement of his expectations. On the other hand, if \(B\) receives a lower card value from \(A\) (that is, if \(\textbf{X}< \textbf{Y}\)) then his only chance to win the game is by drawing a new card Z. If \(A\) chooses to retain her card then \(B\) has to decide without knowing \(A\)’s card value. In this case, he will consider, in addition to the value of his own card Y, that the value of \(A\)’s card is likely to be not low as otherwise she would have chosen to swap.

1 Acceptance thresholds and winning probabilities

In order to reach their decisions, it is natural for both players to adopt an acceptance threshold; denote this threshold as \(a\) for player \(A\), and as \(b\) for player \(B\), where \(0\leq a,b\leq 1\). As shown in the upper arm of Fig. 1, \(A\) decides to retain her card X ifFootnote 1\(\textbf{X}> a\). In that case \(B\) will retain his card as well if \(\textbf{Y}> b\), und he will win the game this way if \(\textbf{X}< \textbf{Y}\). In contrast, \(B\) will draw a new card Z if \(\textbf{Y}<b\), and he will win with that card if \(\textbf{X}< \textbf{Z}\). In the lower arm of Fig. 1 we have \(\textbf{X}<a\); thus, \(A\) decides to swap her card with that of \(B\). If in that case \(\textbf{X}> \textbf{Y}\) then \(B\) has already won the game; on the other hand, if \(\textbf{X}< \textbf{Y}\) then \(B\) will in each case draw a new card Z, and he will win with that card if \(\textbf{Z}> \textbf{Y}\). If \(A\) chooses to exchange the cards then the behavior of \(B\) depends exclusively, and deterministically, on whether X or Y is larger; his acceptance threshold \(b\) is irrelevant in this case.

Fig. 1
figure 1

The seven possible sequences of events in Le Her. The winner of each sequence is noted at the right margin; player \(A\) wins in three of the sequences

Fig. 1 makes clear that there exist only three sequences of events with \(A\) emerging as winner; those three scenarios are mutually exclusive, so that their probabilities add:

$$\textsf{P}(a,b)= \textsf{P}( \textbf{X}> a, \textbf{Y}> b, \textbf{X}> \textbf{Y})+ \textsf{P}( \textbf{X}> a, \textbf{Y}<b, \textbf{X}> \textbf{Z})+ \textsf{P}( \textbf{X}<a, \textbf{Y}> \textbf{X}, \textbf{Z}< \textbf{Y})$$

In the first scenario (the uppermost path in Fig. 1) both \(A\) and \(B\) retain their cards, but \(A\)’s card X has the higher value. \(A\) retains her card in the second scenario as well, with \(B\) drawing a new card Z whose value is, however, smaller than that of \(A\)’s card. In the last scenario (the lowest path in Fig. 1 ending with an \(A\)) \(A\) decides to swap the cards and receives from \(B\) a card Y with a value that is higher than that of her original card X; furthermore, the value of the card Z which \(B\) now necessarily draws is smaller than that of Y.

The probabilities of the three scenarios by which \(A\) may win the game are easily determined. The first scenario is defined by the events \(( \textbf{X}> a, \textbf{Y}> b, \textbf{X}> \textbf{Y})\). In the definition of this event the rv Z does not occur; we may thus focus on the bivariate uniform distribution of X and Y on the unit square. If \(a<b\) then the event \(( \textbf{X}> a, \textbf{Y}> b, \textbf{X}> \textbf{Y})\) is represented diagrammatically in the left part of Fig. 2. Note that \(A\)’s acceptance threshold \(a\) does not appear in the resulting expression \(\frac{1}{2}(1-b)^{2}\) for the area (i.e., the probability of this event). The reason is that if \(a<b\) then the two conditions \(( \textbf{Y}> b, \textbf{X}> \textbf{Y})\) together imply that \(\textbf{X}> \textbf{Y}> b> a\) so that, in particular, \(\textbf{X}> a\) must hold as well. On the other hand, if \(a> b\) then the event \(( \textbf{X}> a, \textbf{Y}> b, \textbf{X}> \textbf{Y})\) is represented diagrammatically in the right part of Fig. 2, and by elementary geometry its area (probability) equals \((1-a)(1-b)-\frac{1}{2}(1-a)^{2}\).

Fig. 2
figure 2

a For the case of \(a<b\) the bold isosceles triangle shows the event \((\mathbf{X}> a,\mathbf{Y}> b,\mathbf{X}> \mathbf{Y})\); the diagonal shows the line \(a=b\). The probability of the event is the area of the bold triangle, \(\frac{1}{2}(1-b)^{2}\); it is independent of \(a\) as long as \(a<b\). b The bold quadrangle shows the same event \((\mathbf{X}> a,\mathbf{Y}> b,\mathbf{X}> \mathbf{Y})\) for the case \(a> b\). Its probability equals the area \((1-a)(1-b)\) of the rectangle with sides \(1-a\) and \(1-b\), minus the area of the isosceles triangle, equal to \(\frac{1}{2}(1-a)^{2}\)

The second scenario is defined by the three events \(( \textbf{X}> a, \textbf{Y}<b, \textbf{X}> \textbf{Z})\); we condition on the value \(\textbf{X}=u\), where \(u\) may take only the values \(a<u\leq 1\). Given \(\textbf{X}=u\), the other two defining events are conditionally independent; furthermore, one of these events depends only on Y and the other only on Z:

$$\textsf{P}( \textbf{X}> a, \textbf{Y}<b, \textbf{X}> \textbf{Z})=\int_{a}^{1} \textsf{P}( \textbf{Y}<b)\cdot \textsf{P}(u> \textbf{Z})du$$

The first probability in the integrand is independent of \(u\) and may be moved before the integral sign, and as Z is uniform on \([0,1]\) we get

$$\textsf{P}( \textbf{X}> a, \textbf{Y}<b, \textbf{X}> \textbf{Z})= \textsf{P}( \textbf{Y}<b)\int_{a}^{1}udu=\frac{1}{2}b\left(1-a^{2}\right).$$

The last scenario from Fig. 1 by which \(A\) may win is defined by the events \(( \textbf{X}<a, \textbf{Y}> \textbf{X}, \textbf{Z}< \textbf{Y})\). It is in the nature of this scenario that this expression does not contain the acceptance threshold \(b\) because in this scenario \(B\) never makes a decision. To compute its probability we condition on \(\textbf{X}=u\) und \(\textbf{Y}=v\). For the event to occur, \(u\) must lie in the interval \([0,a]\), and given \(u\), then \(v\) must be in \([u,1]\). We thus get

$$\textsf{P}( \textbf{X}<a, \textbf{Y}> \textbf{X}, \textbf{Z}< \textbf{Y})=\int_{0}^{a}\int_{u}^{1} \textsf{P}( \textbf{Z}<v)dvdu=\int_{0}^{a}\int_{u}^{1}vdvdu$$

and by standard integration rules the value of this double integral equals \(\frac{1}{2}a-\frac{1}{6}a^{3}\), independent of \(b\).

Adding up the probabilities of the three scenarios by which \(A\) may win, we find for acceptance threshold values \(a<b\) the overall winning probability for \(A\) as

$$\begin{aligned}\displaystyle \textsf{P}(a,b)&\displaystyle=\left[\frac{1}{2}(1-b)^{2}\right]+\left[\frac{1}{2}\left(1-a^{2}\right)b\right]+\left[\frac{1}{2}a-\frac{1}{6}a^{3}\right]\\ \displaystyle\quad&\displaystyle=\frac{1}{6}\left(3+3a-3b-a^{3}-3a^{2}b+3b^{2}\right)\end{aligned}$$

Similarly, for acceptance threshold values such that \(a> b\) we get

$$\begin{aligned}\displaystyle \textsf{P}(a,b)&\displaystyle=\left[(1-a)(1-b)-\frac{1}{2}(1-a)^{2}\right]+\left[\frac{1}{2}\left(1-a^{2}\right)b\right]+\left[\frac{1}{2}a-\frac{1}{6}a^{3}\right]\\ \displaystyle\quad&\displaystyle=\frac{1}{6}\left(3+3a-3b-a^{3}-3a^{2}b+6a\leavevmode\nobreak\ b-3a^{2}\right)\end{aligned}$$

These expressions differ only in their final terms, and so it is easy to see that their difference equals \(\frac{1}{2}(a-b)^{2}\); it is thus zero along the line \(a=b\), as expected for reasons of continuity. Fig. 3 shows the saddle-like shape of \(\textsf{P}(a,b)\) across the unit square.

Fig. 3
figure 3

The probability \(\textsf{P}(a,b)\) for \(A\) to win the game as a function of the acceptance thresholds \(a\) and \(b\)

2 Choosing the optimal strategy

The function \(\textsf{P}(a,b)\) represents for all values of the acceptance thresholds \(a\) und \(b\) the probability for player \(A\) to win the game. This raises the question of how the players should use this information to derive a strategy that is optimal for them – that is, which value \(a\) should player \(A\), and which value \(b\) should player \(B\) adopt? Of course, in choosing her acceptance value \(a\) it is the intention of \(A\) to maximize \(\textsf{P}(a,b)\); a difficulty, however, is that the probability \(\textsf{P}(a,b)\) depends not only on her own acceptance threshold \(a\) but also on the acceptance threshold of \(B\), that is, on \(b\). Conversely, \(B\) aims at minimizing \(\textsf{P}(a,b)\); but for him, too, this goal depends not only on his own acceptance threshold \(b\) but also on the acceptance threshold chosen by \(A\), that is, on \(a\).

Let us first consider the region \(0\leq a<b\leq 1\). For these values we have:

$$\frac{\partial \textsf{P}}{\partial a}=\frac{1}{2}\left(1-2ab-a^{2}\right)\quad\text{and}\quad\frac{\partial^{2} \textsf{P}}{\partial a^{2}}=-(a+b)<0$$

For each value \(b\) chosen by \(B\), player \(A\) will choose that value of \(a\) which maximizes \(\textsf{P}(a,b)\), and so for her from the usual condition \(\partial \textsf{P}/\partial a=0\) for an extremum we get

$$a_{opt}(b)=-b+\sqrt{1+b^{2}}$$

(the second root is negative). Only for values \(a<1/\sqrt{3}\approx 0.577\) is \(a_{opt}(b)<b\), as assumed; Fig. 4 shows the behavior of that part of \(a_{opt}(b)\) as the branch that falls off steeply with \(a\) above the line \(a=b\).

Fig. 4
figure 4

The function \(\textsf{P}(a,b)\) in numerical form. The entries indicate the values of \(\textsf{P}(a,b)\) starting with \((0.05,0.05)\) in steps of 0.10 in \(a\) (abscissa) and \(b\) (ordinate). The horizontal curve running from \((0,\frac{1}{2})\) to \((1,1)\) shows \(B\)’s optimal acceptance thresholds \(b_{opt}(a)\) for any given \(a\); the steep curve shows \(A\)’s optimal acceptance thresholds \(a_{opt}(b)\) for any given \(b\); the diagonal shows the line \(a=b\). The curve \(b_{opt}(a)\) is the locus of the minimum of \(\textsf{P}(a,b)\) per column, whereas \(a_{opt}(b)\) is the locus of the maximum of \(\textsf{P}(a,b)\) per row. Both curves intersect at \((0.544,0.648)\), where P has the value 0.535

On the other hand, in choosing his acceptance threshold \(b\) player \(B\) seeks to minimize \(\textsf{P}(a,b)\); we have

$$\frac{\partial \textsf{P}}{\partial b}=\frac{1}{2}\left(-1+2b-a^{2}\right)\quad\text{and}\quad\frac{\partial^{2} \textsf{P}}{\partial b^{2}}=1> 0$$

For player \(B\) the usual condition \(\partial \textsf{P}/\partial b=0\) for minimizing \(\textsf{P}(a,b)\) gives

$$b_{opt}(a)=\frac{1}{2}\left(1+a^{2}\right)$$

It is easy to see that for all \(a\) we have \(b_{opt}(a)> a\), as assumed. The curve increasing from \((0,\frac{1}{2})\) to \((1,1)\) in Fig. 4 shows the behavior of the optimal acceptance thresholds \(b_{opt}(a)\) which for any given \(a\) minimize the function \(\textsf{P}(a,b)\). The only critical point in the unit square lies at the intersection of the two curves \(a_{opt}(b)\) and \(b_{opt}(a)\). At this point the product of the second partial derivatives is negative, which means that it is a saddle point at which the function \(\textsf{P}(a,b)\) is maximized in \(a\) and minimized in \(b\), as shown in Fig. 3.

As a thought experiment, it is easy to imagine that \(A\) initially chooses some starting acceptance threshold \(a\), whereupon \(B\) will choose the acceptance threshold \(b_{opt}(a)\), which in turn leads \(A\) to choose \(a_{opt}[b_{opt}(a)]\), and so forth. Assume that there exists a point \((a^{*},b^{*})\) such that once reached both players would not move away from it anymore. Translated into our previous results, the meaning of this condition is that \(a_{opt}(b^{*})=a^{*}\) and \(b_{opt}(a^{*})=b^{*}\). Inserting into our previous expressions for \(a_{opt}(b^{*})\) and \(b_{opt}(a^{*})\) into these fixed point equations, we obtain an equation for \((a^{*},b^{*})\) of the third degree which is easily solved by standard methods or numerically. Fig. 4 shows the point of intersection \((a^{*},b^{*})=(0.544,0.648)\) at which \(A\)’s winning probability is \(\textsf{P}(a^{*},b^{*})=0.535\). It may be shown that for any starting point the process of successive adaptation ultimately converges towards \((a^{*},b^{*})\). In decision theory this saddle point is called the Nash equilibrium – it is that point from which it is disadvantageous for both players to move away, given the opponent acts optimally.

Our analysis so far was based on assuming that \(a<b\). In the region \(a\geq b\) we have

$$\frac{\partial \textsf{P}}{\partial a}=\frac{1}{2}\left(1-2ab-a^{2}-2a+2b\right)\quad\text{and}\quad\frac{\partial^{2} \textsf{P}}{\partial a^{2}}=-(1+a+b)<0$$

and as \(A\) seeks to maximize \(\textsf{P}(a,b)\) in \(a\) we get from \(\partial \textsf{P}/\partial a=0\) for the region \(a\geq b\) the optimal acceptance threshold

$$a_{opt}(b)=-(1+b)+\sqrt{2+4b+b^{2}}$$

(the second root is negative). Only for values \(a<1/\sqrt{3}\approx 0.577\) is \(a_{opt}\geq b\), as was assumed; Fig. 4 shows this part of the curve \(a_{opt}(b)\) below the line \(a=b\) as the branch that rises steeply with \(a\).

Player \(B\) seeks to minimize \(\textsf{P}(a,b)\) in \(b\), and in the region \(a\geq b\) the expression for \(\textsf{P}(a,b)\) falls off as a linear function in \(b\). We thus have

$$\frac{\partial \textsf{P}}{\partial b}=-\frac{1}{2}(1-a)^{2}<0\quad\text{and}\quad\frac{\partial^{2} \textsf{P}}{\partial b^{2}}=0$$

As \(B\) seeks to minimize \(\textsf{P}(a,b)\) he will for any given \(a\) choose his acceptance threshold \(b\) as large as possible. Now, in the region \(a\geq b\) considered, for any given \(a\) the largest possible value of \(b\) is evidently \(b_{opt}(a)=a\), and from that limit on \(B\) will continue to use the strategy for \(a<b\) that was described above. As in that latter region we have \(b_{opt}(a)=\frac{1}{2}(1+a^{2})> a\), it is clear that \(B\) should in any case choose an acceptance threshold \(b\) that is larger than the acceptance threshold \(a\) chosen by \(A\).

This is easy to understand intuitively. In any case the acceptance threshold of \(B\) is relevant only if \(A\) chooses to retain her original card X (see Fig. 1) because only then \(B\) has to make a decision. But this means necessarily that \(\textbf{X}> a\); therefore, if \(A\) retains her card, it is impossible for \(B\) to win with a card value \(\textbf{Y}<a\), and consequently acceptance thresholds such that \(b<a\) can never be optimal for him.

3 Discussion

A central – by no means obvious – result of our analysis is that the game is generally advantageous for \(A\): whatever acceptance threshold \(b\) player \(B\) will choose, \(A\)’s probability of winning will in any case be at least 0.535, assuming she plays optimally. The most direct application of the optimal decision rules shown in Fig. 4 assumes that each player knows the acceptance threshold chosen by the opponent – which will typically not be the case. Even so, it seems natural for \(A\) to assume that \(B\) will in each case – whatever acceptance threshold \(A\) will choose – try to minimize \(\textsf{P}(a,b)\) in \(b\); thus, \(A\) will then seek to maximize that minimum in \(a\). Conversely, \(B\) will assume that \(A\) will in each case – whatever acceptance threshold \(B\) will choose – try to maximize \(\textsf{P}(a,b)\) in \(a\); thus, \(B\) will then seek to minimize that maximum in \(b\). These mutual assumptions concerning the opponent’s strategic behavior are evidently reasonable, and they will lead to the equilibrium point \((a^{*},b^{*})\).

It is no restriction of generality to assume that the card values (rvs) are, specifically, distributed uniformly on \([0,1]\). The game Le Her is concerned with ordinal comparisons of the card values only, and therefore the analysis and conclusions remain essentially unchanged if the rvs X, Y, and Z have an arbitrary – of course, identical – distribution. In contrast, the assumption that these rvs are independent is crucial.

That the game is generally advantageous for \(A\) is also true of the classic version of Le Her, when the players initially draw (without replacement) one card each from a Bridge deck of 52 cards. In this setup, \(A\) first decides to retain her card or to swap it with that of \(B\). Then \(B\) has the option to exchange his card against a new card drawn randomly from the deck of the 50 remaining cards. The analysis of this classic version of the game corresponds in all essential aspects to that given above, but it is more cumbersome and less transparent. This is due mainly to the dependency of successive events introduced by drawing cards without replacement, which complicates the analysis. Furthermore, the classic variant introduces some essentially arbitrary and artificial additional rules so as to balance the probabilities of winning more evenly, for example rules concerning the situation when both players hold the same card value, which is impossible with continuous rvs.

The classic variant of the game Le Her was already discussed in 1713 by Pierre Rémond de Montmort and Nikolaus Bernoulli; they determined the probability of winning and they discussed the mutual dependency of the optimal playing strategies (Anders Hald [6], Ch. 18.6, gives an excellent account; also see [1, 4, 7]). Even so, this early and instructive problem in the history of probability theory remained little known and was rarely treated, presumably because of the complexity of the solution – that is, there is no simple answer as to what is the optimal strategy. One of the few exceptions is the elegant treatment by R. A. Fisher [5] who related the choice of strategies in Le Her to the theory of randomized designs. It was only in the context of modern game and decision theory that Le Her was analyzed as a typical example of the so-called minimax strategy, see, for example, [3], and [2] or [4] for more general background.

From a didactic point of view it would seem desirable if the analysis of Le Her would gain more prominence, given its multifarious relations to probability, calculus, and decision theory. With its simple rules, the game is easy to explore by playing several rounds; students can be invited to guess or discuss for whom the game is favorable, or if they would prefer the role of \(A\) or \(B\). The game is also easily programmed, thus offering stimulating access to basic ideas and techniques of simulation. On this basis it is particularly easy to illustrate the effect of different playing strategies and acceptance thresholds; finally, simulated and theoretical results naturally lead on to elementary techniques of statistical comparison and evaluation.