I basically have a timespan from January until August (or any other timespan) which is divided into active periods (denoted by a red line in the plot) and inactive periods (the rest).

What I want to compute from these periods is a measure of temporal spread (couldn't think of a better name).

I've already come up with a very simple measure, the percentage of active periods, but this doesn't tell me whether active periods are spread all over the timespan. For example, both plots below have a percentage of active periods of about 50%, but the latter should have more "continuity", or temporal spread.

enter image description here

enter image description here

In the last plot, the overall percentage is even lower than 50%, but spread should be the highest of all three, because there are also active periods in May or June.

enter image description here

As you can see, I don't know what I am looking for exactly, so I was wondering whether there exists some sort of standard measure for this problem.

  • $\begingroup$ Standard deviation of time when active seems a simple start. If active times are concentrated at the beginning or end it will be low. If active times are smeared over the whole interval, it will be high. Even simpler is time when last active $-$ time when first active. This says nothing about percent of time active, but you are measuring that already. $\endgroup$
    – Nick Cox
    Aug 16 '13 at 16:25
  • $\begingroup$ @NickCox kinda missed your comment, sorry. What do you mean by "standard deviation of time when active" - do you mean standard deviation of the length of these periods or standard deviation of the point in time a period started? If the former is meant, the second and the first example would result in nearly the same because in each example, the length of the periods is roughly the same (resulting in ~0 st. dev.) $\endgroup$
    – grssnbchr
    Aug 19 '13 at 13:20
  • $\begingroup$ The standard deviation of the times in red, so the second. How you calculate it depends on how you hold your data. As you say, the SD of period lengths doesn't capture spread. $\endgroup$
    – Nick Cox
    Aug 19 '13 at 13:30
  • $\begingroup$ To be exact: The standard deviation of times in red means the start time of each active interval, expressed in seconds from 0? So for the first example, this would give 0 with a st. dev. of 0, for the second example this would give something like 0, 400, with a st. dev. of 282. Correct? Just that I understand you correctly. $\endgroup$
    – grssnbchr
    Aug 19 '13 at 14:59
  • 2
    $\begingroup$ Longer intervals have longer weights. (The longer each individual interval is, the more varied time is.) $\endgroup$
    – Nick Cox
    Aug 19 '13 at 15:48

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.