Can you compute the average value of dependent probabilities?

54 Views Asked by At

I want to construct a formula to compute the expected value from a card game I am developing. Is this possible or will I have to use a Monte Carlo simulation?

The game has a concept of slots and objects to fill the slots, and your deck of shuffled, face down cards contains a mix of both types. Players turn over their cards one by one with slots added to the end of a row and objects placed on top of vacant slots. Cards are continually revealed until an object is drawn with no slots free to place it. To add further complexity the player can start with a number of open slots in addition to those cards in their hand.

So given I have o starting open slots, s slot cards, and n object cards in my hand what is the average number of objects each player could expect to reveal in any one turn?

1

There are 1 best solutions below

0
On

You can compute the expected number of slots covered recursively. Let $p,q,$ and $r$ be respectively the number of open slots, the number of slot cards remaining in the deck, and the number of object cards remaining in the deck, and let $e_{p,q,r}$ be the expected number of slots covered in this round, exclusive of any slots that have already been covered in the round. We have $$e_{p,q,r}=\begin{cases} 0,&r=0\\ r,&r\geq p\\ \frac r{q+r}(1+ e_{p-1,q,r-1})+\frac q{q+r}e_{p+1,q-1,r},&\text{otherwise} \end{cases}$$

It just becomes a matter of arranging the calculations in a convenient order, and eventually computing $e_{0,s,n}/$. If I were doing this, I would do it first for a small deck, and check the theoretical against a simulation. I would convince myself that the program was correct before running it with the true values of $s$ and $n$.