# Probability of periodically happening event occurring at a given time based on previous data

Assume that an event $X$ happens periodically over time with a period $P_X$. When it starts it lasts for a time $T_X$. $P_X$ and $T_X$ may vary slightly. There is no correlation between $P_X$ and $T_X$. For example:

1. Event $X$ starts and lasts for 7 days.
2. 20 days of nothing
3. Event $X$ starts and lasts for 5 days.
4. 22 days of nothingt
5. Event $X$ starts and lasts for 6 days.
6. 19 days of nothing
7. etc.

I have a data set over previous time and now I want to be able to predict the probability, as well as the confidence level, of the event occurring e.g 3 months from now, on a given date.

I hope you can help. And sorry if I'm not using the correct statistical terms. I have a decent math knowledge, but never did much with statistics.

Assume that the time between events is a Poisson random variable $X\sim\mathcal{P(\lambda})$ with rate $\lambda$. This is a reasonable model under the given circumstances if it is acceptable that the length of the time intervals between events are independent of each other. If your $P_X$ is, for instance, $20$ days, then $\lambda$ is $\frac{1}{20}$ per day.
Say you want to find the probability that an event occurs after $n$ periods, i.e., after a time $nP_X=\frac{n}{\lambda}.$ To find this, you simply have to add the rates (see this answer), so $$p(X\;\text{happens after}\;n\;\text{periods})=\mathcal{P}(n\lambda).$$
It would then be standard to assume that the length of $X$, call it $Y\sim\mathcal{N}(0,\mu)$ where the event after $n$ periods have been placed at the origin, is normally distributed, with some standard deviation $\mu$, which is related to your $T_X$.
• @Timo A comment on the independence: Remember that $X$ is a random variable specifying the time in between events, and not the event itself (which is not "a quantity" that you can measure). I will edit my answer to include this point more clearly. – Bobson Dugnutt Apr 15 '17 at 11:10