# Probability distribution of actual time spent if randomly sampled at a known mean rate

I was experimenting with tagtime, which randomly asks the user what they're doing at a known mean rate $$\lambda$$. Let's say that every time I am sampled, I give a yes/no answer. If I answer yes $$k$$ times within some period, then I supposedly spent $$k\lambda$$ in the "yes" state, but clearly this is the mean of the probability distribution of what I was actually doing, since I could have actually spent anywhere from an infinitesimal to an infinite amount of time in "yes." What is the probability distribution of how much time I actually spent in "yes?"

I know a few of the distributions related to this, e.g. that the time between samples follows an exponential distribution with parameter $$\lambda$$; but not enough to answer my own question.

• You need an additional assumption: what is your prior distribution for the amount of time?
– whuber
Commented Jun 2, 2023 at 14:38
• Making the naive assumption that (given the overall proportion of time you are in "yes") what you are doing at any question time is independent of what you are doing at other question times, this is essentially estimating a binomial proportion. If you want a distribution, you may want to use Bayesian methods starting with a Beta conjugate prior for the proportion of time and then rescale to total time. There are many frequentist methods of producing confidence intervals. Commented Jun 2, 2023 at 16:47
• @Henry You should post your comment as an answer so I can accept it. Commented Jun 5, 2023 at 13:33