# How do I find the frequency or percentage chance for two independent timed events to happen simultaneously?

If I have two events that occur on a specific interval (one every 8 seconds, the other every 200 milliseconds) but were not started synchronously, how can I calculate the frequency with which these two events will occur at the same time?

Looking at the numbers, it seems that unless they start synchronously, they will never coincide. If they started synchronously, in a perfect world, it would be every 8 seconds.

Obviously there is some variation/imperfection because they do coincide occasionally despite not starting at the same time.

I suppose I am looking for a harmonic, or additive function. Forgive me, my math knowledge is lacking.

-
 They need not start synchronously. For example, if event $E_{200ms}$ starts at a multiple of 200ms (200ms, 400ms, 600ms and so on) after event $E_{8s}$ has occurred then they will coincide. – jay-sun Jan 3 at 17:44 True; I should amend that to say if E_200ms doesn't start on a common denominator. (Grr, I give up on TEX formatting...) – JYelton Jan 3 at 17:51 Just a comment: if each event happens $\mathit{exactly}$ every $k$'th second, there is no probability involved - the process is purely deterministic – Alex Jan 3 at 23:14 They should be exact, but there is some variation, the amount of which is difficult to measure and not really that important. So, treating these as if they are on exact frequencies, what is a better way to tag the question since probability is not really applicable? – JYelton Jan 3 at 23:27

 So if $E_{8s}$ starts at 0ms, and $E_{200ms}$ starts at 50ms, the LCM is 8000*50 ms or 40 seconds? – JYelton Jan 3 at 18:03 The LCM of 8 sec and 200 msec is 8 seconds=200 msec *40. The LCM doesn't care when it starts. Then unless the start delay is a multiple of the GCD, which here is 200 msec, they will never occur together. In your example, the 8 second one always occurs exactly on the exact second, while the 200 msec one occurs at 0.050, 0.250. 0.450. 0.650, or 0.850 seconds after the exact second. – Ross Millikan Jan 3 at 18:17 @JYelton: The LCM is the smallest number that an integer number of each period fit into. This will be the span which is the repeating pattern. – Ross Millikan Jan 3 at 18:30 Thanks @Ross, I think this helps me out, even if I'm still stumbling. :) – JYelton Jan 3 at 18:30 @JYelton: you might try it by hand for small numbers, like 2 and 3 seconds. The GCD is 1 second and the LCM is 6 seconds. If the starting delay is not a multiple of 1 second, they will never happen together. The pattern, whatever it is, will recur evry 6 seconds. – Ross Millikan Jan 3 at 18:36