Poisson-like distribution but with varying success rate at each step, closed form?

56 Views Asked by At

I'm doing a personal math question based on the game Gloomhaven. In it, bosses have a deck of 8 cards. Abstracting down to the information needed for the math, 4 cards are "hits", 2 cards are "hits, then reshuffle the discard and deck back to 8 cards", and 2 cards are "misses". I'm investigating the percentages of at least $n$ hits in a row.

Starting from a state of a full deck, I've solved the problem using recursion. Let $p(n)$ be the probability of getting at least $n$ hits in a row from a full deck. Let $f(n)$ be the amount of times one can draw pure hits (no reshuffles) in a row.

Then breaking things down into when does the first hit and reshuffle happen, we get $$f(1)=\frac 4 8, f(2)=\frac 3 7 \cdot f(1), f(3)=\frac 2 6f(2), f(4)=\frac 15 f(3), f(5)=0$$ $$p(1)=\frac 6 8$$ $$p(2)=f(2)+f(1)\frac 2 7 + \frac 2 6 p(1)$$

$$p(3)=f(3)+f(2)\frac 2 6+f(1)\frac 2 7p(1)+\frac 2 8 p(2)$$ $$p(4)=f(4)+f(3)\frac 2 5+f(2)\frac 2 6p(1)+f(1)\frac 2 7 p(2)+\frac 2 8 p(3)$$ $$p(5)=f(4)\frac 2 4+f(3)\frac 2 5 p(1)+f(2)\frac 2 6p(2)+f(1)\frac 2 7 p(3)+\frac 2 8 p(4)$$ $$p(6)=f(4)\frac 2 4 p(1)+f(3)\frac 2 5 p(2)+f(2)\frac 2 6p(3)+f(1)\frac 2 7 p(4)+\frac 2 8 p(5)$$

$$p(n)=f(4)\frac 2 4 p(n-5)+f(3)\frac 2 5 p(n-4)+f(2)\frac 2 6p(n-3)+f(1)\frac 2 7 p(n-2)+\frac 2 8 p(n-1)$$ for $n>6$. To condense it down to a singular summation form with recursion, define $f(0)=1$ then we get $$p(n)=\sum_ {i=0}^4 \frac 2 {4+i}f(i)p(n-i-1)$$ I'm sure I could probably come up with notation/conventions for $p(0)$ through $p(-4)$ to fold in the earlier cases, not a priority.

I say it's poisson-like because it is counting "at least n hits in a row$ and the probability isn't fixed but shifts at each step. I put it all in to excel and got good working numbers.

My open questions:
(1) Is there any way to do this in a closed form without using recursion? (2) Is there any way to calculate an expected value? I suppose I'd have to modify it from "at least $n$" to "exactly $n$" by throwing a miss at the end, but even so I have no idea how to do countably infinite sum with a recursive formula...

1

There are 1 best solutions below

0
On BEST ANSWER

For your first question, sure you knows that the recursion is linear, so it have a closed form. However I dont see a way to have a closed form without the recursion, and if it exists I dont think it will be simpler as solving the linear recursion.

For your second question, the expectation, we can compute it easily from the recursion. If $X$ count the number of hits in a row, then

$$ \mu:=\operatorname{E}[X]=\sum_{k\geqslant 1}k \Pr [X=k]=\sum_{k\geqslant 1}\Pr [X\geqslant k] $$

Then, using your notation, we have that

$$ \mu=\sum_{n\geqslant 1}p(n)=\sum_{k=1}^5 c_k \sum_{n\geqslant 1}p(n-k)=\sum_{k=1}^5 c_k (k+\mu),\quad c_k:=\frac{2}{3+k}f(k-1)\\ \therefore\quad \mu=\frac{\sum_{k=1}^5 k\,c_k}{1-\sum_{k=1}^5 c_k} $$