Statistics: passive attack intervals of three animals

Earlier, Caelan asked me to help him test his observation that his entourage hit enemies faster if he gives them orders before the enemy enters the room. This raised interesting questions about how the time intervals between attacks is distributed, and I gathered some data on the time interval between attacks with Caelan's help.

Fox:
For the first animal we tested,  the distribution is approximately bell-shaped (but not normal; the tails are too heavy). The sample mean was 7.485 seconds (we can reasonably assume the true mean to be 7.5) and the standard deviation was 0.385 seconds.

Raven:
A cursory examination of the data showed that it was heavily skewed (this was confirmed with a boxplot). Suspecting the time interval to be exponentially distributed, I fitted it with the exponential model and 'lo and behold, the quantiles corresponded quite well with the theoretical ones (see raven_qqplot.jpeg). There is some squiggliness that I assume to be due to the server running in ticks, and in my opinion this accounts for the low p-value from the Kolmogorov-Smirnov test.
The rate constant was estimated to be 0.101/sec, which corresponds to 9.932 seconds expected between attacks.

Butterfly:
The attack time intervals was exponential, with a lower rate than the raven. Rate constant was estimated to be 0.077/sec, corresponding to a mean time between attacks of 13.008 seconds.

Discussion:
The fox attacks consistently around once every 7.5 seconds. Raven and butterfly attack at around once ever 10 seconds and once every 13 seconds, respectively; the distributions of the latter two are memory-less, so knowing it's x seconds since last attack tells you nothing about how long you likely have to wait before the next attack. Consequently, you can pre-attack with the fox, but not with raven and butterfly.

Criticisms, comments, and questions are welcome.

=================================
Attached: relevant plots and R script (ent_passive.txt).

Comments

  • I think the simpler answer may be that 'every X seconds there is a Y chance to attack'.
  • Armali said:
    I think the simpler answer may be that 'every X seconds there is a Y chance to attack'.
    That is certainly a valid way to describe what's going on for the raven/butterfly (9.6% and 7.4% each second, respectively), but very obviously not the pattern for the fox.
  • Did you use server timestamps?
  • I forgot there were server timestamps, but it the correspondence/lack of correspondence is strong enough that variation in packet transit times would be irrelevant. I double checked today and the difference between serverside timestamp and Mudlet timestamp is consistently 4 seconds +/- 0.01 seconds, which is pretty good considering the serverside timestamp is only precise to the 0.01 second.
  • edited June 2018
    What sort of thresholds/limits are you using as a standard "confidence"(good fit?) level for correlation between your 3 models using the Kolmogorov-Smirnov test?

    Err.. also, given that you're testing the cumulative distribution of events, what sort of sample size did you use to get the data difference between actual/theoretical plotted?

    [ SnB PvP Guide | Link ]

    [ Runewarden Sparring Videos | Link ]
  • What sort of thresholds/limits are you using as a standard "confidence"(good fit?) level for correlation between your 3 models using the Kolmogorov-Smirnov test?

    Err.. also, given that you're testing the cumulative distribution of events, what sort of sample size did you use to get the data difference between actual/theoretical plotted?
    I meant this as an exercise in descriptive statistics, not hypothesis testing. The criteria for a "good fit" is that the quantile-quantile plot is a roughly straight line; if it is, the model is considered a decent approximation of the process that generated the data. If there are proposed alternative models that describes the process better (probably by including server ticks), I would have compared models using likelihood ratio test. However, the principle of parsimony weights against delving into a more complicated model when the simple model already fits well.

    The KS-test is mostly there to make sure I didn't miss an outlier somewhere near the edge of the plot area. If I had gotten a p-value somewhere on the order of 10^-9, I would have put on my reading glasses and dug into the plot/data more carefully. As it was, I got something on the order of 10^-3 for the raven, which is low but not horrendously so.

    The sample sizes were 47, 56, and 24 for fox, raven, and butterfly, respectively. They were determined by when we thought we'd sat there long enough. Not exactly de rigueur, but arbitrary enough that biases were unlikely to have been introduced due to cutoff point.
Sign In or Register to comment.