I would like to estimate the total time between events over a period of time, given this situation, and I will provide an example.

I have a list of users, $users$ (say 100). Each day over a period $D$ (of say 20 days), every user sends a request for a special event. Over the period $D$, I have a pool of events to give, $events$ (say 400) and I want to distribute them uniformly over $D$ (so here, there will be $400/20 = 20$ events distributed a day). Each day, a user may only receive up to one event.

Given this information, my goal is to estimate, for the average user, the total period of time between the events (I call it $coverage$) the user received. For instance, if the user received one event on Day 1 and one event on Day 3 and one on Day 6, then their $coverage$ is 6 days (the day on which the event is received is counted).

I think this question is straightforward but I find it tricky to find the exact model for it. The basic model is:

$$Coverage = (\frac{events}{users} - 1) * frequency + 1$$

Where frequency can be interpreted as "on average, one user gets an event every $frequency$ days".

Basically, $coverage$ should be the average number of events per user minus 1, multiplied by how frequently the user receives the event ("once every 5 days"), plus 1 day (because we count the first day an event is received)

When simulating this, if I plug the real $frequency$ from the simulation into the model, I get the correct $coverage$. However, I am having trouble modeling $frequency$. I tried:

$$frequency= \frac{users * D}{events}$$

But this overestimates the real frequency.

Once I get this basic model right, I have additional constraints I want to study:

  • Coverage can only be counted between two events up to a certain value $Tau$ (say 7). So, a user that received the event on Day 1 and Day 9 has a coverage of 7, not 9)
  • What if I set a rule for each user, where a given user may not receive an event again within X days of its last event? This value would be between 1 (no constraint) and the average frequency

Any help, on the simple model or on the model with constraints, would be greatly appreciated!

  • $\begingroup$ Welcome to MSE. Please use MathJax. $\endgroup$ – José Carlos Santos Sep 2 '17 at 15:44
  • $\begingroup$ Sure, I'll edit my question thanks. $\endgroup$ – Konrad Sep 2 '17 at 15:45
  • $\begingroup$ Not that this is the only issue, but why do you think you should multiply by $5$ in your example? If the user averages one event per $d$ days, I would expect the coverage to go down as $d$ gets larger, not up. If each user averaged one event per day (that is, you have enough events for everyone every day and given no one multiple events per day), everyone's coverage would be complete (20 days). If each user averaged one event per 20 days, coverage would be much smaller. (The typical user would have one event so coverage of $1$ day, and some would have $0$ days coverage.) $\endgroup$ – Steve Kass Sep 2 '17 at 16:15
  • $\begingroup$ @SteveKass I've corrected a mistake in my example. If d gets larger, the gap between two events increases, but the total coverage does not change. If I receive one event each day, my coverage will be D = 20. If I receive one event on the first day, and one on the last, my coverage will still be D = 20. Increasing d also leads to decreasing the value on the left side of the equation. So I would not say coverage necessarily increases as d increases. $\endgroup$ – Konrad Sep 2 '17 at 16:45
  • $\begingroup$ True, but if there aren’t enough events to go around, not everyone will receive one on the first day (or the last), and average coverage will drop. If there are only $10$ events per day for the $100$ people, for example, the average person’s first event will not be until day $10$. Coverage depends on the number of consecutive initial and final days without an event, and (unless I’m misunderstanding your scenario), these numbers increase as $d$ (average days between a given person’s events) increases, so coverage decreases. $\endgroup$ – Steve Kass Sep 2 '17 at 16:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.