When developing a general purpose time-series software, is it a good idea to make it scale invariant? How would one do that?

I took a time series of around 40 points, and then multiplied by factors ranging from 10E-9 to 10E3 and then ran through the ARIMA functions of Forecast Pro and Minitab. In Forecast Pro, all resulted in the same answer (automatic modeling), whereas in Minitab, they were not. Not sure what Forecast Pro does, but they might just scale up or down all the numbers to a certain scale (let's say 100s) before running the model. Is this good idea in general?


1 Answer 1


If the software computes the sum of squared errors in optimization (and most will), then you can run into trouble with very large numbers or very small numbers because of how floating point numbers are stored. The same applies to any statistical modelling, not just time series analysis. One way to avoid the problem is to scale the data before running the model, and then re-scale the results. For most time series models, including all linear models, that will work. Some nonlinear models won't scale however.

When I'm analysing data I will often scale the data myself, not just to prevent possible optimization problems but also to make graphs and tables easier to read.

  • 1
    $\begingroup$ Further to this, you might want to check out What Every Computer Scientist Should Know About Floating-Point Arithmetic, by David Goldberg for advice on how to deal with issues of numerical representation. $\endgroup$
    – fmark
    Nov 2, 2010 at 22:58
  • $\begingroup$ @Rob: Thanks for the answer. I guess you are then implying that it is alright to scale the series before doing the analysis. $\endgroup$
    – Samik R
    Nov 2, 2010 at 23:27
  • $\begingroup$ @fmark: Thanks for the comment - I am pretty familiar about that material actually. $\endgroup$
    – Samik R
    Nov 2, 2010 at 23:27
  • $\begingroup$ @Samik: For linear models such as Gaussian ARIMA processes, yes. $\endgroup$ Nov 2, 2010 at 23:46
  • 4
    $\begingroup$ Within vast limits, scaling makes no difference whatsoever for floating point calculations: it simply amounts to a shift of exponent with no loss of precision. Where scaling can help is where a calculation involves sets of data that are themselves on different scales. My guess is that the time series formulae are using some time measurement (milliseconds? years? just integral steps?) that may have a hugely different range than the range of the data. Good stats SW will internally scale its matrices to avoid loss of precision; this could explain the differences between FP and Minitab. $\endgroup$
    – whuber
    Nov 2, 2010 at 23:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.