# Measure for temporal "spread"

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.

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.

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.

• 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. Aug 16 '13 at 16:25
• @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.) Aug 19 '13 at 13:20
• 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. Aug 19 '13 at 13:30
• 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. Aug 19 '13 at 14:59
• Longer intervals have longer weights. (The longer each individual interval is, the more varied time is.) Aug 19 '13 at 15:48