aez-notes

Winning an Unfair Game

A game consists of a sequence of plays; on each play either you or your opponent scores a point, you with probability \(p\) (less than \(1/2\)), he with probability \(1-p\). The number of plays is to be even — 2 or 4 or 6 and so on. To win the game you must get more than half the points. You know \(p\), say \(0.45\), and you get a prize if you win. You get to choose in advance the number of plays. How many do you choose?

There is a nice solution proposed for the general problem in the book, but for specific values of \(p\) it is very simple so solve for a solution.

load(distrib);

f(n,p) := cdf_binomial(n - 1, 2 * n, 1 - p);

for n: 4 step 1 thru 6 do print(2 * n, f(n, 0.45))
/*
8 0.2603807173828123
10 0.2615627007544924
12 0.2606850781010203
*/

Author: Alex Zarebski

Created: 2022-04-15 Fri 12:29

Validate