Scan with sampling

Spent alot more time on this, and I think I’m approaching the problem wrong in general.

I think this could be a good fit for a hidden markov model with time varying transitions, where there are 2 states, rented and not rented, something like below, but the transition probabilities vary over time

\begin{equation*} \begin{bmatrix} 1- P_{rent} & P_{rent} \\ P_{return} & 1-P_{return} \end{bmatrix} \end{equation*}

Probability of being rented would change over time depending on demand and number of other units in stock (seems difficult, I’d have to keep track of all of the other states), and probability of being returned would be based on a lognormal distribution (where time to return from rental start is lognormally distributed).

This example seems similar.

I’m probably going to take the simple approach here and model demand and rental time separately, but if anyone has any pointers for the time varying markov model approach above I’d love to hear it