# Standard Error of the cumulative value for time series

I have two time series, as in the picture below. The data was gathered experimentally. A practical example could be a measured mass flow rate, where I measure the mass flow rate over a certain time period with changing boundary conditions, and I am interested in the total mass of fluid consumed during this period.

The depicted intervals represent the Standard error of the mean and were determined through ten repeated measurements of the entire cycle. For each time step, the interval equals: $$SEM= \frac{\sigma}{\sqrt{10}}$$ The ten replications naturally constitute ten identifiable time series.

I now have three questions:

1. How can I assess, at a specific time step, if the difference between the means of the time series is statistically significant? t-test?

2. How can I determine the SEM of the cumulated value for each time series?

3. How can I assess if the difference between the cumulated values of both time series is statistically significant?

Does it make sense to create an "interval" of the cumulative value of both time series by cumulating the upper bound values and lower bound values?

1) One could estimate a model for each of the ten separately and then estimate the parameters globally across all 10 items leading to an F test. Do this for each time step.

2) You can use Monte Carlo techniques (boostrapping) to obtain density functions for the next k periods and then simply sum the pseudo observations over time to get the probability density function of the sum and then mark of probability limits. This is a backdoor way to create the distribition of the sum or correlated values. I have implemented this in AUTOBOX, a piece of software that I helped to develop

3) By examining the coefficients in the identified models for each NOT in the sum of the forecasts.

• Could you indicate how the methods you mention are able to take advantage of the 10 replicates of each measurement?
– whuber
Mar 12, 2019 at 21:27
• Tks .. modified my first answer . Mar 12, 2019 at 21:41
• Wouldn't estimation of ten separate models involve arbitrary assignments of each replicate to a model, thereby increasing the variability and reducing the quality of the fit? I guess the issue comes down to whether the replications naturally constitute ten identifiable time series or are genuinely independent replications at each step.
– whuber
Mar 12, 2019 at 21:56
• As you said each of the 10 realizations would/must have their own thread or history and would be ten identifiable time series. Mar 12, 2019 at 22:10
• @whuber : I edited the question to stress that the replications naturally constitute ten identifiable time series and not independant measurements at each time step. Mar 13, 2019 at 7:58

1) You can not use a bunch of pair-wise t-tests because this will massively increase the likelihood of a type 1 error. You need to perform a 2-step procedure to avoid this:

Step 1. If your null hypothesis is that all the means are equal, and the alternative is that the means are not equal, first use a 1-Way ANOVA Test (similar to an F-test).

Step 2. If you reject the null, then you need to know which means are different and by how much. For this, you can use a Post-Hoc procedure for pair-wise comparisons. I would suggest Tukey's HSD, Bonferroni, or Mann-Whitney u test. All of these essentially to a something like a t-test but against a different distribution which avoids inflating the Type 1 errors. The Mann-Whitney u test is a non-parametric test so maybe more robust.

2) As suggested by IrishStat, Bootstrap is the way to go here as the sample size is small. If you looking for CI on the errors, you may need bias-corrected and accelerated bootstrap interval as the distribution may be skewed.

3) Create another test statistics called the difference in cumulative values, and bootstrap this statistic for inference.

• Thanks for your input, I will definitely look into bootstrap methods. What is your opinion about the last question where I create an interval for the cumulated mean value, by cumulating all the lower bound values and al the upper bound values ? Mar 15, 2019 at 15:36
• It seems that this would be a way to create a confidence interval for the cumulated mean but I doubt it is an efficient estimator for the interval due to the use of min/max statistics. Bootstrap intervals will be easier to interpret. Mar 15, 2019 at 15:44