Jump to content

Time series: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
AnomieBOT (talk | contribs)
m Dating maintenance tags: {{Attention}}
 
(37 intermediate revisions by 18 users not shown)
Line 1: Line 1:
{{For|TV series|Time (TV series)}}
{{Use American English|date = March 2019}}
{{Short description|Sequence of data points over time}}
{{Short description|Sequence of data points over time}}
{{distinguish|Time (TV series){{!}}''Time'' (TV series)}}
{{Use American English|date = March 2019}}
[[File:Random-data-plus-trend-r2.png|thumb|250px|Time series: random data plus trend, with best-fit line and different applied filters|alt=|right]]
[[File:Random-data-plus-trend-r2.png|thumb|250px|Time series: random data plus trend, with best-fit line and different applied filters|alt=|right]]
In [[mathematics]], a '''time series''' is a series of [[data point]]s indexed (or listed or graphed) in time order. Most commonly, a time series is a [[sequence]] taken at successive equally spaced points in time. Thus it is a sequence of [[discrete-time]] data. Examples of time series are heights of ocean [[tides]], counts of [[sunspots]], and the daily closing value of the [[Dow Jones Industrial Average]].
In [[mathematics]], a '''time series''' is a series of [[data point]]s indexed (or listed or graphed) in time order. Most commonly, a time series is a [[sequence]] taken at successive equally spaced points in time. Thus it is a sequence of [[discrete-time]] data. Examples of time series are heights of ocean [[tides]], counts of [[sunspots]], and the daily closing value of the [[Dow Jones Industrial Average]].
Line 7: Line 7:
A time series is very frequently plotted via a [[run chart]] (which is a temporal [[line chart]]). Time series are used in [[statistics]], [[signal processing]], [[pattern recognition]], [[econometrics]], [[mathematical finance]], [[weather forecasting]], [[earthquake prediction]], [[electroencephalography]], [[control engineering]], [[astronomy]], [[communications engineering]], and largely in any domain of applied [[Applied science|science]] and [[engineering]] which involves [[Time|temporal]] measurements.
A time series is very frequently plotted via a [[run chart]] (which is a temporal [[line chart]]). Time series are used in [[statistics]], [[signal processing]], [[pattern recognition]], [[econometrics]], [[mathematical finance]], [[weather forecasting]], [[earthquake prediction]], [[electroencephalography]], [[control engineering]], [[astronomy]], [[communications engineering]], and largely in any domain of applied [[Applied science|science]] and [[engineering]] which involves [[Time|temporal]] measurements.


'''Time series ''analysis''''' comprises methods for analyzing time series data in order to extract meaningful statistics and other characteristics of the data. '''Time series ''forecasting''''' is the use of a [[model (abstract)|model]] to predict future values based on previously observed values. While [[regression analysis]] is often employed in such a way as to test relationships between one or more different time series, this type of analysis is not usually called "time series analysis", which refers in particular to relationships between different points in time within a single series.
'''Time series ''analysis''''' comprises methods for analyzing time series data in order to extract meaningful statistics and other characteristics of the data. '''Time series ''forecasting''''' is the use of a [[model (abstract)|model]] to predict future values based on previously observed values. Generally, time series data is modelled as a [[stochastic process]]. While [[regression analysis]] is often employed in such a way as to test relationships between one or more different time series, this type of analysis is not usually called "time series analysis", which refers in particular to relationships between different points in time within a single series.


Time series data have a natural temporal ordering. This makes time series analysis distinct from [[cross-sectional study|cross-sectional studies]], in which there is no natural ordering of the observations (e.g. explaining people's wages by reference to their respective education levels, where the individuals' data could be entered in any order). Time series analysis is also distinct from [[spatial data analysis]] where the observations typically relate to geographical locations (e.g. accounting for house prices by the location as well as the intrinsic characteristics of the houses). A [[stochastic]] model for a time series will generally reflect the fact that observations close together in time will be more closely related than observations further apart. In addition, time series models will often make use of the natural one-way ordering of time so that values for a given period will be expressed as deriving in some way from past values, rather than from future values (see [[time reversibility]]).
Time series data have a natural temporal ordering. This makes time series analysis distinct from [[cross-sectional study|cross-sectional studies]], in which there is no natural ordering of the observations (e.g. explaining people's wages by reference to their respective education levels, where the individuals' data could be entered in any order). Time series analysis is also distinct from [[spatial data analysis]] where the observations typically relate to geographical locations (e.g. accounting for house prices by the location as well as the intrinsic characteristics of the houses). A [[stochastic]] model for a time series will generally reflect the fact that observations close together in time will be more closely related than observations further apart. In addition, time series models will often make use of the natural one-way ordering of time so that values for a given period will be expressed as deriving in some way from past values, rather than from future values (see [[time reversibility]]).
Line 27: Line 27:


===Motivation===
===Motivation===
In the context of [[statistics]], [[econometrics]], [[quantitative finance]], [[seismology]], [[meteorology]], and [[geophysics]] the primary goal of time series analysis is [[forecasting]]. In the context of [[signal processing]], [[control engineering]] and [[communication engineering]] it is used for signal detection. Other applications are in [[data mining]], [[pattern recognition]] and [[machine learning]], where time series analysis can be used for [[cluster analysis|clustering]],<ref>{{cite journal | last1 = Liao | first1 = T. Warren | title = Clustering of time series data - a survey | journal = Pattern Recognition | volume = 38 | issue = 11 | pages = 1857–1874 | publisher = Elsevier | date = 2005 | language = en | doi = 10.1016/j.patcog.2005.01.025| bibcode = 2005PatRe..38.1857W | s2cid = 8973749 }}{{subscription required|via=ScienceDirect }}</ref><ref>{{cite journal | last1 = Aghabozorgi | first1 = Saeed | last2 = Shirkhorshidi | first2 = Ali S. | last3 = Wah | first3 = Teh Y. | title = Time-series clustering – A decade review | journal = Information Systems | volume = 53 | pages = 16–38 | publisher = Elsevier | date = 2015 | language = en | doi = 10.1016/j.is.2015.04.007| s2cid = 158707 }}{{subscription required|via=ScienceDirect }}</ref> [[Statistical classification|classification]],<ref>{{cite book | last1 = Keogh | first1 = Eamonn J. | title = Proceedings of the eighth ACM SIGKDD international conference on Knowledge discovery and data mining | chapter = On the need for time series data mining benchmarks: A survey and empirical demonstration | journal = Data Mining and Knowledge Discovery | volume = 7 | pages = 349–371 | publisher = Kluwer | date = 2003 | language = en | doi = 10.1145/775047.775062| isbn = 158113567X | s2cid = 41617550 }}{{subscription required|via=ACM Digital Library }}</ref> query by content,<ref>{{cite conference|last1=Agrawal|first1=Rakesh|last2=Faloutsos|first2=Christos|last3=Swami|first3=Arun| title=Foundations of Data Organization and Algorithms |date=October 1993|chapter=Efficient Similarity Search In Sequence Databases| series=Lecture Notes in Computer Science |conference=International Conference on Foundations of Data Organization and Algorithms|volume=730|pages=69–84|book-title=Proceedings of the 4th International Conference on Foundations of Data Organization and Algorithms|doi=10.1007/3-540-57301-1_5| isbn=978-3-540-57301-2 }}{{Subscription required|via=SpringerLink}}</ref> [[anomaly detection]] as well as [[forecasting]].<ref>{{cite journal|last1=Chen|first1=Cathy W. S.|last2=Chiu|first2=L. M.|date=September 2021|title=Ordinal Time Series Forecasting of the Air Quality Index|journal=Entropy|language=en|volume=23|issue=9|pages=1167|doi=10.3390/e23091167|pmid=34573792|pmc=8469594|bibcode=2021Entrp..23.1167C|doi-access=free}}</ref>
In the context of [[statistics]], [[econometrics]], [[quantitative finance]], [[seismology]], [[meteorology]], and [[geophysics]] the primary goal of time series analysis is [[forecasting]]. In the context of [[signal processing]], [[control engineering]] and [[communication engineering]] it is used for signal detection. Other applications are in [[data mining]], [[pattern recognition]] and [[machine learning]], where time series analysis can be used for [[cluster analysis|clustering]],<ref>{{cite journal |last1=Warren Liao |first1=T. |title=Clustering of time series data—a survey |journal=Pattern Recognition |date=November 2005 |volume=38 |issue=11 |pages=1857–1874 |doi=10.1016/j.patcog.2005.01.025 |bibcode=2005PatRe..38.1857W |s2cid=8973749 }}</ref><ref>{{cite journal |last1=Aghabozorgi |first1=Saeed |last2=Seyed Shirkhorshidi |first2=Ali |last3=Ying Wah |first3=Teh |title=Time-series clustering – A decade review |journal=Information Systems |date=October 2015 |volume=53 |pages=16–38 |doi=10.1016/j.is.2015.04.007 |s2cid=158707 }}</ref> [[Statistical classification|classification]],<ref>{{cite book |doi=10.1145/775047.775062 |chapter=On the need for time series data mining benchmarks: A survey and empirical demonstration |title=Proceedings of the eighth ACM SIGKDD international conference on Knowledge discovery and data mining |date=2002 |last1=Keogh |first1=Eamonn |last2=Kasetty |first2=Shruti |pages=102–111 |isbn=1-58113-567-X }}</ref> query by content,<ref>{{cite book |doi=10.1007/3-540-57301-1_5 |chapter=Efficient similarity search in sequence databases |title=Foundations of Data Organization and Algorithms |series=Lecture Notes in Computer Science |date=1993 |last1=Agrawal |first1=Rakesh |last2=Faloutsos |first2=Christos |last3=Swami |first3=Arun |volume=730 |pages=69–84 |isbn=978-3-540-57301-2 |s2cid=16748451 |url=https://figshare.com/articles/journal_contribution/6605123 }}</ref> [[anomaly detection]] as well as [[forecasting]].<ref>{{cite journal |last1=Chen |first1=Cathy W. S. |last2=Chiu |first2=L. M. |title=Ordinal Time Series Forecasting of the Air Quality Index |journal=Entropy |date=4 September 2021 |volume=23 |issue=9 |pages=1167 |doi=10.3390/e23091167 |pmid=34573792 |pmc=8469594 |bibcode=2021Entrp..23.1167C |doi-access=free }}</ref>


===Exploratory analysis===
===Exploratory analysis===
[[File:Tuberculosis incidence US 1953-2009.png|thumb|Tuberculosis incidence US 1953–2009]]
{{Further|Exploratory analysis}}
{{Further|Exploratory analysis}}
A straightforward way to examine a regular time series is manually with a [[line chart]]. An example chart is shown on the right for tuberculosis incidence in the United States, made with a spreadsheet program. The number of cases was standardized to a rate per 100,000 and the percent change per year in this rate was calculated. The nearly steadily dropping line shows that the TB incidence was decreasing in most years, but the percent change in this rate varied by as much as +/- 10%, with 'surges' in 1975 and around the early 1990s. The use of both vertical axes allows the comparison of two time series in one graphic.


[[File:Time series TB US.png|thumb|Time series of tuberculosis deaths in the United States 1954-2021.]]
A study of corporate data analysts found two challenges to exploratory time series analysis: discovering the shape of interesting patterns, and finding an explanation for these patterns.<ref>{{Cite book|last1=Sarkar|first1=Advait|last2=Spott|first2=Martin|last3=Blackwell|first3=Alan F.|last4=Jamnik|first4=Mateja|title=2016 IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC) |chapter=Visual discovery and model-driven explanation of time series patterns |date=2016|chapter-url=https://doi.org/10.1109/VLHCC.2016.7739668| pages=78–86 |publisher=IEEE|doi=10.1109/vlhcc.2016.7739668| isbn=978-1-5090-0252-8 | s2cid=9787931 |url=https://www.repository.cam.ac.uk/handle/1810/260285 }}</ref> Visual tools that represent time series data as [[Heat map|heat map matrices]] can help overcome these challenges.


A simple way to examine a regular time series is manually with a [[line chart]]. The datagraphic shows tuberculosis deaths in the United States,<ref>http://www.cdc.gov/tb/statistics/reports/2022/table1.htm</ref> along with the yearly change and the percentage change from year to year. The total number of deaths declined in every year until the mid-1980s, after which there were occasional increases, often proportionately - but not absolutely - quite large.
Other techniques include:


A study of corporate data analysts found two challenges to exploratory time series analysis: discovering the shape of interesting patterns, and finding an explanation for these patterns.<ref>{{cite book |doi=10.1109/vlhcc.2016.7739668 |chapter=Visual discovery and model-driven explanation of time series patterns |title=2016 IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC) |date=2016 |last1=Sarkar |first1=Advait |last2=Spott |first2=Martin |last3=Blackwell |first3=Alan F. |last4=Jamnik |first4=Mateja |pages=78–86 |isbn=978-1-5090-0252-8 |s2cid=9787931 |chapter-url=https://www.repository.cam.ac.uk/handle/1810/260285 }}</ref> Visual tools that represent time series data as [[Heat map|heat map matrices]] can help overcome these challenges.

===Estimation, filtering, and smoothing===

This approach may be based on [[harmonic analysis]] and filtering of signals in the [[frequency domain]] using the [[Fourier transform]], and [[spectral density estimation]]. Its development was significantly accelerated during [[World War II]] by mathematician [[Norbert Wiener]], electrical engineers [[Rudolf E. Kálmán]], [[Dennis Gabor]] and others for filtering signals from noise and predicting signal values at a certain point in time.

An equivalent effect may be achieved in the time domain, as in a [[Kalman filter]]; see [[filter (signal processing)|filtering]] and [[smoothing|smoothing]] for more techniques.

Other related techniques include:
* [[Autocorrelation]] analysis to examine [[serial dependence]]
* [[Autocorrelation]] analysis to examine [[serial dependence]]
* [[Frequency spectrum#Spectrum analysis|Spectral analysis]] to examine cyclic behavior which need not be related to [[seasonality]]. For example, sunspot activity varies over 11 year cycles.<ref>{{cite book |last=Bloomfield |first=P. |year=1976 |title=Fourier analysis of time series: An introduction |location=New York |publisher=Wiley |isbn=978-0471082569 }}</ref><ref>{{cite book |last=Shumway |first=R. H. |year=1988 |title=Applied statistical time series analysis |location=Englewood Cliffs, NJ |publisher=Prentice Hall |isbn=978-0130415004 }}</ref> Other common examples include celestial phenomena, weather patterns, neural activity, commodity prices, and economic activity.
* [[Frequency spectrum#Spectrum analysis|Spectral analysis]] to examine cyclic behavior which need not be related to [[seasonality]]. For example, sunspot activity varies over 11 year cycles.<ref>{{cite book |last1=Bloomfield |first1=Peter |title=Fourier Analysis of Time Series: An Introduction |date=1976 |publisher=Wiley |isbn=978-0-471-08256-9 }}{{page needed|date=January 2024}}</ref><ref>{{cite book |last1=Shumway |first1=Robert H. |title=Applied Statistical Time Series Analysis |date=1988 |publisher=Prentice-Hall |isbn=978-0-13-041500-4 }}{{page needed|date=January 2024}}</ref> Other common examples include celestial phenomena, weather patterns, neural activity, commodity prices, and economic activity.
* Separation into components representing trend, seasonality, slow and fast variation, and cyclical irregularity: see [[trend estimation]] and [[decomposition of time series]]
* Separation into components representing trend, seasonality, slow and fast variation, and cyclical irregularity: see [[trend estimation]] and [[decomposition of time series]]


Line 45: Line 52:
{{Main|Curve fitting}}
{{Main|Curve fitting}}


Curve fitting<ref>Sandra Lach Arlinghaus, PHB Practical Handbook of Curve Fitting. CRC Press, 1994.</ref><ref>William M. Kolb. Curve Fitting for Programmable Calculators. Syntec, Incorporated, 1984.</ref> is the process of constructing a [[curve]], or [[function (mathematics)|mathematical function]], that has the best fit to a series of [[data]] points,<ref>S.S. Halli, K.V. Rao. 1992. Advanced Techniques of Population Analysis. {{isbn|0306439972}} Page 165 (''cf''. ... functions are fulfilled if we have a good to moderate fit for the observed data.)</ref> possibly subject to constraints.<ref>''[https://archive.org/details/signalnoisewhymo00silv The Signal and the Noise]: Why So Many Predictions Fail-but Some Don't.'' By Nate Silver</ref><ref>[https://books.google.com/books?id=hhdVr9F-JfAC Data Preparation for Data Mining]: Text. By Dorian Pyle.</ref> Curve fitting can involve either [[interpolation]],<ref>Numerical Methods in Engineering with MATLAB®. By [[Jaan Kiusalaas]]. Page 24.</ref><ref>[https://books.google.com/books?id=YlkgAwAAQBAJ&q=%22curve+fitting%22 Numerical Methods in Engineering with Python 3]. By Jaan Kiusalaas. Page 21.</ref> where an exact fit to the data is required, or [[smoothing]],<ref>[https://books.google.com/books?id=UjnB0FIWv_AC Numerical Methods of Curve Fitting]. By P. G. Guest, Philip George Guest. Page 349.</ref><ref>See also: [[Mollifier]]</ref> in which a "smooth" function is constructed that approximately fits the data. A related topic is [[regression analysis]],<ref>[http://www.facm.ucl.ac.be/intranet/books/statistics/Prism-Regression-Book.unlocked.pdf Fitting Models to Biological Data Using Linear and Nonlinear Regression] {{Webarchive|url=https://web.archive.org/web/20180809091156/http://www.facm.ucl.ac.be/intranet/books/statistics/Prism-Regression-Book.unlocked.pdf |date=2018-08-09 }}. By Harvey Motulsky, Arthur Christopoulos.</ref><ref>Regression Analysis By Rudolf J. Freund, William J. Wilson, Ping Sa. Page 269.</ref> which focuses more on questions of [[statistical inference]] such as how much uncertainty is present in a curve that is fit to data observed with random errors. Fitted curves can be used as an aid for data visualization,<ref>Visual Informatics. Edited by Halimah Badioze Zaman, Peter Robinson, Maria Petrou, Patrick Olivier, Heiko Schröder. Page 689.</ref><ref>[https://books.google.com/books?id=rdJvXG1k3HsC Numerical Methods for Nonlinear Engineering Models]. By John R. Hauser. Page 227.</ref> to infer values of a function where no data are available,<ref>Methods of Experimental Physics: Spectroscopy, Volume 13, Part 1. By Claire Marton. Page 150.</ref> and to summarize the relationships among two or more variables.<ref>Encyclopedia of Research Design, Volume 1. Edited by Neil J. Salkind. Page 266.</ref> [[Extrapolation]] refers to the use of a fitted curve beyond the [[range (statistics)|range]] of the observed data,<ref>[https://books.google.com/books?id=ba0hAQAAQBAJ Community Analysis and Planning Techniques]. By Richard E. Klosterman. Page 1.</ref> and is subject to a [[Uncertainty|degree of uncertainty]]<ref>An Introduction to Risk and Uncertainty in the Evaluation of Environmental Investments. DIANE Publishing. [https://books.google.com/books?id=rJ23LWaZAqsC&pg=PA69 Pg 69]</ref> since it may reflect the method used to construct the curve as much as it reflects the observed data.
Curve fitting<ref>{{cite book |last1=Arlinghaus |first1=Sandra |title=Practical Handbook of Curve Fitting |date=1994 |publisher=CRC Press |isbn=978-0-8493-0143-8 }}{{page needed|date=January 2024}}</ref><ref>{{cite book |last1=Kolb |first1=William M. |title=Curve Fitting for Programmable Calculators |date=1984 |publisher=SYNTEC |isbn=978-0-943494-02-9 }}{{page needed|date=January 2024}}</ref> is the process of constructing a [[curve]], or [[function (mathematics)|mathematical function]], that has the best fit to a series of [[data]] points,<ref>{{cite book |last1=Halli |first1=S. S. |last2=Rao |first2=K. V. |title=Advanced Techniques of Population Analysis |date=1992 |publisher=Springer Science & Business Media |isbn=978-0-306-43997-1 |page=165 |quote=functions are fulfilled if we have a good to moderate fit for the observed data. }}</ref> possibly subject to constraints.<ref>''[https://archive.org/details/signalnoisewhymo00silv The Signal and the Noise]: Why So Many Predictions Fail-but Some Don't.'' By Nate Silver</ref><ref>{{cite book |last1=Pyle |first1=Dorian |title=Data Preparation for Data Mining |date=1999 |publisher=Morgan Kaufmann |isbn=978-1-55860-529-9 }}{{page needed|date=January 2024}}</ref> Curve fitting can involve either [[interpolation]],<ref>Numerical Methods in Engineering with MATLAB®. By [[Jaan Kiusalaas]]. Page 24.</ref><ref>{{cite book |last1=Kiusalaas |first1=Jaan |title=Numerical Methods in Engineering with Python 3 |date=2013 |publisher=Cambridge University Press |isbn=978-1-139-62058-1 |page=21 }}</ref> where an exact fit to the data is required, or [[smoothing]],<ref>{{cite book |last1=Guest |first1=Philip George |title=Numerical Methods of Curve Fitting |date=2012 |publisher=Cambridge University Press |isbn=978-1-107-64695-7 |page=349 }}</ref><ref>See also: [[Mollifier]]</ref> in which a "smooth" function is constructed that approximately fits the data. A related topic is [[regression analysis]],<ref>{{cite book |last1=Motulsky |first1=Harvey |last2=Christopoulos |first2=Arthur |title=Fitting Models to Biological Data Using Linear and Nonlinear Regression: A Practical Guide to Curve Fitting |date=2004 |publisher=Oxford University Press |isbn=978-0-19-803834-4 }}{{page needed|date=January 2024}}</ref><ref>Regression Analysis By Rudolf J. Freund, William J. Wilson, Ping Sa. Page 269.{{date missing}}</ref> which focuses more on questions of [[statistical inference]] such as how much uncertainty is present in a curve that is fit to data observed with random errors. Fitted curves can be used as an aid for data visualization,<ref>{{cite book |doi=10.1007/978-3-642-05036-7_65 |chapter=Modeling of Electromagnetic Waves Using Statistical and Numerical Techniques |title=Visual Informatics: Bridging Research and Practice |series=Lecture Notes in Computer Science |date=2009 |last1=Daud |first1=Hanita |last2=Sagayan |first2=Vijanth |last3=Yahya |first3=Noorhana |last4=Najwati |first4=Wan |volume=5857 |pages=686–695 |isbn=978-3-642-05035-0 }}</ref><ref>{{cite book |last1=Hauser |first1=John R. |title=Numerical Methods for Nonlinear Engineering Models |date=2009 |publisher=Springer Science & Business Media |isbn=978-1-4020-9920-5 |page=227 }}</ref> to infer values of a function where no data are available,<ref>{{cite book |doi=10.1016/S0076-695X(08)60643-2 |chapter=Nuclear and Atomic Spectroscopy |title=Spectroscopy |series=Methods in Experimental Physics |date=1976 |volume=13 |pages=115–346 [150] |isbn=978-0-12-475913-8 |editor1-first=Dudley |editor1-last=William }}</ref> and to summarize the relationships among two or more variables.<ref>{{cite book |last1=Salkind |first1=Neil J. |title=Encyclopedia of Research Design |date=2010 |publisher=SAGE |isbn=978-1-4129-6127-1 |page=266 |url=https://books.google.com/books?id=HVmsxuaQl2oC&pg=PA266 }}</ref> [[Extrapolation]] refers to the use of a fitted curve beyond the [[range (statistics)|range]] of the observed data,<ref>{{cite book |last1=Klosterman |first1=Richard E. |title=Community Analysis and Planning Techniques |date=1990 |publisher=Rowman & Littlefield Publishers |isbn=978-0-7425-7440-3 |page=1 }}</ref> and is subject to a [[Uncertainty|degree of uncertainty]]<ref>{{cite report |last1=Yoe |first1=Charles E. |title=An Introduction to Risk and Uncertainty in the Evaluation of Environmental Investments |date=March 1996 |publisher=U.S. Army Corps of Engineers |id={{DTIC|ADA316839}} |page=69 }}</ref> since it may reflect the method used to construct the curve as much as it reflects the observed data.


[[File:Growth equations.png|thumb|Growth equations]]
[[File:Growth equations.png|thumb|Growth equations]]


For processes that are expected to generally grow in magnitude one of the curves in the graphic at right (and many others) can be fitted by estimating their parameters.
For processes that are expected to generally grow in magnitude one of the curves in the graphic (and many others) can be fitted by estimating their parameters.


The construction of economic time series involves the estimation of some components for some dates by [[interpolation]] between values ("benchmarks") for earlier and later dates. Interpolation is estimation of an unknown quantity between two known quantities (historical data), or drawing conclusions about missing information from the available information ("reading between the lines").<ref>Hamming, Richard. Numerical methods for scientists and engineers. Courier Corporation, 2012.</ref> Interpolation is useful where the data surrounding the missing data is available and its trend, seasonality, and longer-term cycles are known. This is often done by using a related series known for all relevant dates.<ref>Friedman, Milton. "[http://www.nber.org/chapters/c2062.pdf The interpolation of time series by related series]." Journal of the American Statistical Association 57.300 (1962): 729–757.</ref> Alternatively [[polynomial interpolation]] or [[spline interpolation]] is used where piecewise [[polynomial]] functions are fit into time intervals such that they fit smoothly together. A different problem which is closely related to interpolation is the approximation of a complicated function by a simple function (also called [[Polynomial regression|regression]]). The main difference between regression and interpolation is that polynomial regression gives a single polynomial that models the entire data set. Spline interpolation, however, yield a piecewise continuous function composed of many polynomials to model the data set.
The construction of economic time series involves the estimation of some components for some dates by [[interpolation]] between values ("benchmarks") for earlier and later dates. Interpolation is estimation of an unknown quantity between two known quantities (historical data), or drawing conclusions about missing information from the available information ("reading between the lines").<ref>{{cite book |last1=Hamming |first1=Richard |title=Numerical Methods for Scientists and Engineers |date=2012 |publisher=Courier Corporation |isbn=978-0-486-13482-6 }}{{page needed|date=January 2024}}</ref> Interpolation is useful where the data surrounding the missing data is available and its trend, seasonality, and longer-term cycles are known. This is often done by using a related series known for all relevant dates.<ref>{{cite journal |last1=Friedman |first1=Milton |title=The Interpolation of Time Series by Related Series |journal=Journal of the American Statistical Association |date=December 1962 |volume=57 |issue=300 |pages=729–757 |doi=10.1080/01621459.1962.10500812 }}</ref> Alternatively [[polynomial interpolation]] or [[spline interpolation]] is used where piecewise [[polynomial]] functions are fitted in time intervals such that they fit smoothly together. A different problem which is closely related to interpolation is the approximation of a complicated function by a simple function (also called [[Polynomial regression|regression]]). The main difference between regression and interpolation is that polynomial regression gives a single polynomial that models the entire data set. Spline interpolation, however, yield a piecewise continuous function composed of many polynomials to model the data set.


[[Extrapolation]] is the process of estimating, beyond the original observation range, the value of a variable on the basis of its relationship with another variable. It is similar to [[interpolation]], which produces estimates between known observations, but extrapolation is subject to greater [[uncertainty]] and a higher risk of producing meaningless results.
[[Extrapolation]] is the process of estimating, beyond the original observation range, the value of a variable on the basis of its relationship with another variable. It is similar to [[interpolation]], which produces estimates between known observations, but extrapolation is subject to greater [[uncertainty]] and a higher risk of producing meaningless results.
Line 60: Line 67:
One can distinguish two major classes of function approximation problems: First, for known target functions, [[approximation theory]] is the branch of [[numerical analysis]] that investigates how certain known functions (for example, [[special function]]s) can be approximated by a specific class of functions (for example, [[polynomial]]s or [[rational function]]s) that often have desirable properties (inexpensive computation, continuity, integral and limit values, etc.).
One can distinguish two major classes of function approximation problems: First, for known target functions, [[approximation theory]] is the branch of [[numerical analysis]] that investigates how certain known functions (for example, [[special function]]s) can be approximated by a specific class of functions (for example, [[polynomial]]s or [[rational function]]s) that often have desirable properties (inexpensive computation, continuity, integral and limit values, etc.).


Second, the target function, call it ''g'', may be unknown; instead of an explicit formula, only a set of points (a time series) of the form (''x'', ''g''(''x'')) is provided. Depending on the structure of the [[domain of a function|domain]] and [[codomain]] of ''g'', several techniques for approximating ''g'' may be applicable. For example, if ''g'' is an operation on the [[real number]]s, techniques of [[interpolation]], [[extrapolation]], [[regression analysis]], and [[curve fitting]] can be used. If the [[codomain]] (range or target set) of ''g'' is a finite set, one is dealing with a [[statistical classification|classification]] problem instead. A related problem of ''online'' time series approximation<ref>Gandhi, Sorabh, Luca Foschini, and Subhash Suri. "[https://ieeexplore.ieee.org/abstract/document/5447930/ Space-efficient online approximation of time series data: Streams, amnesia, and out-of-order]." Data Engineering (ICDE), 2010 IEEE 26th International Conference on. IEEE, 2010.</ref> is to summarize the data in one-pass and construct an approximate representation that can support a variety of time series queries with bounds on worst-case error.
Second, the target function, call it ''g'', may be unknown; instead of an explicit formula, only a set of points (a time series) of the form (''x'', ''g''(''x'')) is provided. Depending on the structure of the [[domain of a function|domain]] and [[codomain]] of ''g'', several techniques for approximating ''g'' may be applicable. For example, if ''g'' is an operation on the [[real number]]s, techniques of [[interpolation]], [[extrapolation]], [[regression analysis]], and [[curve fitting]] can be used. If the [[codomain]] (range or target set) of ''g'' is a finite set, one is dealing with a [[statistical classification|classification]] problem instead. A related problem of ''online'' time series approximation<ref>{{cite book |doi=10.1109/ICDE.2010.5447930 |chapter=Space-efficient online approximation of time series data: Streams, amnesia, and out-of-order |title=2010 IEEE 26th International Conference on Data Engineering (ICDE 2010) |date=2010 |last1=Gandhi |first1=Sorabh |last2=Foschini |first2=Luca |last3=Suri |first3=Subhash |pages=924–935 |isbn=978-1-4244-5445-7 |s2cid=16072352 }}</ref> is to summarize the data in one-pass and construct an approximate representation that can support a variety of time series queries with bounds on worst-case error.


To some extent, the different problems ([[regression analysis|regression]], [[Statistical classification|classification]], [[fitness approximation]]) have received a unified treatment in [[statistical learning theory]], where they are viewed as [[supervised learning]] problems.
To some extent, the different problems ([[regression analysis|regression]], [[Statistical classification|classification]], [[fitness approximation]]) have received a unified treatment in [[statistical learning theory]], where they are viewed as [[supervised learning]] problems.
Line 74: Line 81:
{{Main|Statistical classification}}
{{Main|Statistical classification}}
Assigning time series pattern to a specific category, for example identify a word based on series of hand movements in [[sign language]].
Assigning time series pattern to a specific category, for example identify a word based on series of hand movements in [[sign language]].

===Signal estimation===
{{See also|Signal processing|Estimation theory}}
This approach is based on [[harmonic analysis]] and filtering of signals in the [[frequency domain]] using the [[Fourier transform]], and [[spectral density estimation]], the development of which was significantly accelerated during [[World War II]] by mathematician [[Norbert Wiener]], electrical engineers [[Rudolf E. Kálmán]], [[Dennis Gabor]] and others for filtering signals from noise and predicting signal values at a certain point in time. See [[Kalman filter]], [[Estimation theory]], and [[Digital signal processing]]


===Segmentation===
===Segmentation===
Line 84: Line 87:


=== Clustering ===
=== Clustering ===
Time series data may be clustered, however special care has to be taken when considering subsequence clustering.<ref>{{cite journal |last1=Zolhavarieh |first1=Seyedjamal |last2=Aghabozorgi |first2=Saeed |last3=Teh |first3=Ying Wah |title=A Review of Subsequence Time Series Clustering |journal=The Scientific World Journal |date=2014 |volume=2014 |pages=312521 |doi=10.1155/2014/312521 |doi-access=free |pmid=25140332 |pmc=4130317 }}</ref>
{{Attention|reason=more description needed|date=January 2024}}
Time series clustering may be split into
Time series data may be clustered, however special care has to be taken when considering subsequence clustering <ref>https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4130317/</ref>.
* whole time series clustering (multiple time series for which to find a cluster)
* subsequence time series clustering (single timeseries, split into chunks using sliding windows)
* time point clustering

==== Subsequence time series clustering ====
Subsequence time series clustering resulted in unstable (random) clusters ''induced by the feature extraction'' using chunking with sliding windows.<ref>{{cite journal |last1=Keogh |first1=Eamonn |last2=Lin |first2=Jessica |title=Clustering of time-series subsequences is meaningless: implications for previous and future research |journal=Knowledge and Information Systems |date=August 2005 |volume=8 |issue=2 |pages=154–177 |doi=10.1007/s10115-004-0172-7 }}</ref> It was found that the cluster centers (the average of the time series in a cluster - also a time series) follow an arbitrarily shifted sine pattern (regardless of the dataset, even on realizations of a [[random walk]]). This means that the found cluster centers are non-descriptive for the dataset because the cluster centers are always nonrepresentative sine waves.


==Models==
==Models==
Models for time series data can have many forms and represent different [[stochastic processes]]. When modeling variations in the level of a process, three broad classes of practical importance are the ''[[autoregressive]]'' (AR) models, the ''integrated'' (I) models, and the ''[[moving-average model|moving-average]]'' (MA) models. These three classes depend linearly on previous data points.<ref name="linear time series">{{cite book |author-link=Neil Gershenfeld |last=Gershenfeld |first=N. |year=1999 |title=The Nature of Mathematical Modeling |url=https://archive.org/details/naturemathematic00gers_334 |url-access=limited |location=New York |publisher=Cambridge University Press |pages=[https://archive.org/details/naturemathematic00gers_334/page/n206 205]–208 |isbn=978-0521570954 }}</ref> Combinations of these ideas produce [[autoregressive moving-average model|autoregressive moving-average]] (ARMA) and [[autoregressive integrated moving average|autoregressive integrated moving-average]] (ARIMA) models. The [[autoregressive fractionally integrated moving average|autoregressive fractionally integrated moving-average]] (ARFIMA) model generalizes the former three. Extensions of these classes to deal with vector-valued data are available under the heading of multivariate time-series models and sometimes the preceding acronyms are extended by including an initial "V" for "vector", as in VAR for [[vector autoregression]]. An additional set of extensions of these models is available for use where the observed time-series is driven by some "forcing" time-series (which may not have a causal effect on the observed series): the distinction from the multivariate case is that the forcing series may be deterministic or under the experimenter's control. For these models, the acronyms are extended with a final "X" for "exogenous".
Models for time series data can have many forms and represent different [[stochastic processes]]. When modeling variations in the level of a process, three broad classes of practical importance are the ''[[autoregressive]]'' (AR) models, the ''integrated'' (I) models, and the ''[[moving-average model|moving-average]]'' (MA) models. These three classes depend ''linearly'' on previous data points.<ref name="linear time series">{{cite book |author-link=Neil Gershenfeld |last=Gershenfeld |first=N. |year=1999 |title=The Nature of Mathematical Modeling |url=https://archive.org/details/naturemathematic00gers_334 |url-access=limited |location=New York |publisher=Cambridge University Press |pages=[https://archive.org/details/naturemathematic00gers_334/page/n206 205]–208 |isbn=978-0521570954 }}</ref> Combinations of these ideas produce [[autoregressive moving-average model|autoregressive moving-average]] (ARMA) and [[autoregressive integrated moving average|autoregressive integrated moving-average]] (ARIMA) models. The [[autoregressive fractionally integrated moving average|autoregressive fractionally integrated moving-average]] (ARFIMA) model generalizes the former three. Extensions of these classes to deal with vector-valued data are available under the heading of multivariate time-series models and sometimes the preceding acronyms are extended by including an initial "V" for "vector", as in VAR for [[vector autoregression]]. An additional set of extensions of these models is available for use where the observed time-series is driven by some "forcing" time-series (which may not have a causal effect on the observed series): the distinction from the multivariate case is that the forcing series may be deterministic or under the experimenter's control. For these models, the acronyms are extended with a final "X" for "exogenous".


Non-linear dependence of the level of a series on previous data points is of interest, partly because of the possibility of producing a [[chaos theory|chaotic]] time series. However, more importantly, empirical investigations can indicate the advantage of using predictions derived from non-linear models, over those from linear models, as for example in [[nonlinear autoregressive exogenous model]]s. Further references on nonlinear time series analysis: (Kantz and Schreiber),<ref>{{cite book|last1=Kantz|first1=Holger|last2=Thomas|first2=Schreiber|title=Nonlinear Time Series Analysis|date=2004|publisher=Cambridge University Press|location=London|isbn=978-0521529020}}</ref> and (Abarbanel)<ref>{{cite book|last1=Abarbanel|first1=Henry|title=Analysis of Observed Chaotic Data|date=Nov 25, 1997|publisher=Springer|location=New York|isbn=978-0387983721}}</ref>
Non-linear dependence of the level of a series on previous data points is of interest, partly because of the possibility of producing a [[chaos theory|chaotic]] time series. However, more importantly, empirical investigations can indicate the advantage of using predictions derived from non-linear models, over those from linear models, as for example in [[nonlinear autoregressive exogenous model]]s. Further references on nonlinear time series analysis: (Kantz and Schreiber),<ref>{{cite book|last1=Kantz|first1=Holger|last2=Thomas|first2=Schreiber|title=Nonlinear Time Series Analysis|date=2004|publisher=Cambridge University Press|location=London|isbn=978-0521529020}}</ref> and (Abarbanel)<ref>{{cite book|last1=Abarbanel|first1=Henry|title=Analysis of Observed Chaotic Data|date=Nov 25, 1997|publisher=Springer|location=New York|isbn=978-0387983721}}</ref>
Line 94: Line 103:
Among other types of non-linear time series models, there are models to represent the changes of variance over time ([[heteroskedasticity]]). These models represent [[autoregressive conditional heteroskedasticity]] (ARCH) and the collection comprises a wide variety of representation ([[GARCH]], TARCH, EGARCH, FIGARCH, CGARCH, etc.). Here changes in variability are related to, or predicted by, recent past values of the observed series. This is in contrast to other possible representations of locally varying variability, where the variability might be modelled as being driven by a separate time-varying process, as in a [[doubly stochastic model]].
Among other types of non-linear time series models, there are models to represent the changes of variance over time ([[heteroskedasticity]]). These models represent [[autoregressive conditional heteroskedasticity]] (ARCH) and the collection comprises a wide variety of representation ([[GARCH]], TARCH, EGARCH, FIGARCH, CGARCH, etc.). Here changes in variability are related to, or predicted by, recent past values of the observed series. This is in contrast to other possible representations of locally varying variability, where the variability might be modelled as being driven by a separate time-varying process, as in a [[doubly stochastic model]].


In recent work on model-free analyses, wavelet transform based methods (for example locally stationary wavelets and wavelet decomposed neural networks) have gained favor. Multiscale (often referred to as multiresolution) techniques decompose a given time series, attempting to illustrate time dependence at multiple scales. See also [[Markov switching multifractal]] (MSMF) techniques for modeling volatility evolution.
In recent work on model-free analyses, wavelet transform based methods (for example locally stationary wavelets and wavelet decomposed neural networks) have gained favor.<ref>{{Cite journal |last1=Tomás |first1=R. |last2=Li |first2=Z. |last3=Lopez-Sanchez |first3=J. M. |last4=Liu |first4=P. |last5=Singleton |first5=A. |date=June 2016 |title=Using wavelet tools to analyse seasonal variations from InSAR time-series data: a case study of the Huangtupo landslide |url=http://link.springer.com/10.1007/s10346-015-0589-y |journal=Landslides |language=en |volume=13 |issue=3 |pages=437–450 |doi=10.1007/s10346-015-0589-y |bibcode=2016Lands..13..437T |hdl=10045/62160 |issn=1612-510X}}</ref> Multiscale (often referred to as multiresolution) techniques decompose a given time series, attempting to illustrate time dependence at multiple scales. See also [[Markov switching multifractal]] (MSMF) techniques for modeling volatility evolution.


A [[Hidden Markov model]] (HMM) is a statistical Markov model in which the system being modeled is assumed to be a Markov process with unobserved (hidden) states. An HMM can be considered as the simplest [[dynamic Bayesian network]]. HMM models are widely used in [[speech recognition]], for translating a time series of spoken words into text.
A [[hidden Markov model]] (HMM) is a statistical Markov model in which the system being modeled is assumed to be a Markov process with unobserved (hidden) states. An HMM can be considered as the simplest [[dynamic Bayesian network]]. HMM models are widely used in [[speech recognition]], for translating a time series of spoken words into text.


Many of these models are collected in the python package [[sktime]].
Many of these models are collected in the python package [[sktime]].
Line 102: Line 111:
===Notation===
===Notation===
A number of different notations are in use for time-series analysis. A common notation specifying a time series ''X'' that is indexed by the [[natural number]]s is written
A number of different notations are in use for time-series analysis. A common notation specifying a time series ''X'' that is indexed by the [[natural number]]s is written
:''X'' = (''X''<sub>1</sub>, ''X''<sub>2</sub>, ...).
:{{math|1=''X'' = (''X''<sub>1</sub>, ''X''<sub>2</sub>, ...)}}.


Another common notation is
Another common notation is
:''Y'' = (''Y<sub>t</sub>'': ''t'' ∈ ''T''),
:{{math|1=''Y'' = (''Y<sub>t</sub>'': ''t'' ∈ ''T'')}},
where ''T'' is the [[index set]].
where ''T'' is the [[index set]].


Line 121: Line 130:


* Consideration of the [[autocorrelation|autocorrelation function]] and the [[spectral density|spectral density function]] (also [[cross-correlation function]]s and cross-spectral density functions)
* Consideration of the [[autocorrelation|autocorrelation function]] and the [[spectral density|spectral density function]] (also [[cross-correlation function]]s and cross-spectral density functions)
* [[Scaled correlation|Scaled]] cross- and auto-correlation functions to remove contributions of slow components<ref name="Nikolicetal">{{cite journal |last1=Nikolić |first1=D. |last2=Muresan |first2=R. C. |last3=Feng |first3=W. |last4=Singer |first4=W. |year=2012 |title=Scaled correlation analysis: a better way to compute a cross-correlogram |journal=European Journal of Neuroscience |volume=35 |issue=5 |pages=742–762 |doi=10.1111/j.1460-9568.2011.07987.x |pmid=22324876 |s2cid=4694570 |url=https://semanticscholar.org/paper/caa784fc3c22656413143559c402b54d0567f4d1 }}</ref>
* [[Scaled correlation|Scaled]] cross- and auto-correlation functions to remove contributions of slow components<ref name="Nikolicetal">{{cite journal |last1=Nikolić |first1=Danko |last2=Mureşan |first2=Raul C. |last3=Feng |first3=Weijia |last4=Singer |first4=Wolf |title=Scaled correlation analysis: a better way to compute a cross-correlogram |journal=European Journal of Neuroscience |date=March 2012 |volume=35 |issue=5 |pages=742–762 |doi=10.1111/j.1460-9568.2011.07987.x |pmid=22324876 |s2cid=4694570 }}</ref>
* Performing a [[Fourier transform]] to investigate the series in the [[frequency domain]]
* Performing a [[Fourier transform]] to investigate the series in the [[frequency domain]]
* Discrete, continuous or mixed spectra of time series, depending on whether the time series contains a (generalized) harmonic signal or not
* Discrete, continuous or mixed spectra of time series, depending on whether the time series contains a (generalized) harmonic signal or not
Line 128: Line 137:
* [[Singular spectrum analysis]]
* [[Singular spectrum analysis]]
* "Structural" models:
* "Structural" models:
** General [[State Space Model]]s
** General [[state space model]]s
** Unobserved Components Models
** Unobserved components models
* [[Machine Learning]]
* [[Machine learning]]
** [[Artificial neural network]]s
** [[Artificial neural network]]s
** [[Support vector machine]]
** [[Support vector machine]]
** [[Fuzzy logic]]
** [[Fuzzy logic]]
** [[Gaussian process]]
** [[Gaussian process]]
** [[Genetic Programming]]
** [[Genetic programming]]
** [[Gene expression programming]]
** [[Gene expression programming]]
** [[Hidden Markov model]]
** [[Hidden Markov model]]
Line 146: Line 155:
* [[Detrended fluctuation analysis]]
* [[Detrended fluctuation analysis]]
* [[Nonlinear mixed-effects model]]ing
* [[Nonlinear mixed-effects model]]ing
* [[Dynamic time warping]]<ref name="Sakoe 1978">{{cite book |last1=Sakoe |first1=Hiroaki |last2=Chiba |first2=Seibi |year=1978 |chapter=Dynamic programming algorithm optimization for spoken word recognition |volume=26 |pages=43–49 |doi=10.1109/TASSP.1978.1163055 |journal=IEEE Transactions on Acoustics, Speech, and Signal Processing |s2cid=17900407 }}</ref>
* [[Dynamic time warping]]<ref name="Sakoe 1978">{{cite journal |last1=Sakoe |first1=H. |last2=Chiba |first2=S. |title=Dynamic programming algorithm optimization for spoken word recognition |journal=IEEE Transactions on Acoustics, Speech, and Signal Processing |date=February 1978 |volume=26 |issue=1 |pages=43–49 |doi=10.1109/TASSP.1978.1163055 |s2cid=17900407 }}</ref>
* [[Dynamic Bayesian network]]
* [[Dynamic Bayesian network]]
* [[Time-frequency representation|Time-frequency analysis techniques:]]
* [[Time-frequency representation|Time-frequency analysis techniques:]]
Line 182: Line 191:
** [[Approximate entropy]]<ref>{{cite web |last1=Land |first1=Bruce |last2=Elias |first2=Damian |title=Measuring the 'Complexity' of a time series |url=http://www.nbb.cornell.edu/neurobio/land/PROJECTS/Complexity/ }}</ref>
** [[Approximate entropy]]<ref>{{cite web |last1=Land |first1=Bruce |last2=Elias |first2=Damian |title=Measuring the 'Complexity' of a time series |url=http://www.nbb.cornell.edu/neurobio/land/PROJECTS/Complexity/ }}</ref>
** [[Sample entropy]]
** [[Sample entropy]]
** {{iw2|Fourier entropy||uk|Ентропія Фур'є}}
** {{ill|Fourier entropy|uk|Ентропія Фур'є}}
** Wavelet entropy
** Wavelet entropy
** Dispersion entropy
** Dispersion entropy
Line 197: Line 206:
** [[Algorithmic information theory|Algorithmic complexity]]
** [[Algorithmic information theory|Algorithmic complexity]]
** [[Kolmogorov complexity]] estimates
** [[Kolmogorov complexity]] estimates
** [[Hidden Markov Model]] states
** [[Hidden Markov model]] states
** [[Rough path#Signature|Rough path signature]]<ref>[1] Chevyrev, I., Kormilitzin, A. (2016) "[https://arxiv.org/abs/1603.03788 A Primer on the Signature Method in Machine Learning], arXiv:1603.03788v1"</ref>
** [[Rough path#Signature|Rough path signature]]<ref>{{cite preprint |arxiv=1603.03788 |last1=Chevyrev |first1=Ilya |last2=Kormilitzin |first2=Andrey |title=A Primer on the Signature Method in Machine Learning |date=2016 }}</ref>
** Surrogate time series and surrogate correction
** Surrogate time series and surrogate correction
** Loss of recurrence (degree of non-stationarity)
** Loss of recurrence (degree of non-stationarity)
Line 209: Line 218:
** Measures for [[phase synchronization]]
** Measures for [[phase synchronization]]
** Measures for [[phase locking]]
** Measures for [[phase locking]]
* '''Similarity measures''':<ref>{{cite book |last1=Ropella |first1=G. E. P. |last2=Nag |first2=D. A. |last3=Hunt |first3=C. A. |title=Proceedings of the 25th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (IEEE Cat. No.03CH37439) |chapter=Similarity measures for automated comparison of in silico and in vitro experimental results |journal=Engineering in Medicine and Biology Society |year=2003 |volume=3 |pages=2933–2936 |doi=10.1109/IEMBS.2003.1280532 |isbn=978-0-7803-7789-9 |s2cid=17798157 }}</ref>
* '''Similarity measures''':<ref>{{cite book |doi=10.1109/IEMBS.2003.1280532 |chapter=Similarity measures for automated comparison of in silico and in vitro experimental results |title=Proceedings of the 25th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (IEEE Cat. No.03CH37439) |date=2003 |last1=Ropella |first1=G.E.P. |last2=Nag |first2=D.A. |last3=Hunt |first3=C.A. |pages=2933–2936 |isbn=978-0-7803-7789-9 |s2cid=17798157 }}</ref>
** [[Cross-correlation]]
** [[Cross-correlation]]
** [[Dynamic Time Warping]]<ref name="Sakoe 1978"/>
** [[Dynamic time warping]]<ref name="Sakoe 1978"/>
** [[Hidden Markov Models]]
** [[Hidden Markov model]]
** [[Edit distance]]
** [[Edit distance]]
** [[Total correlation]]
** [[Total correlation]]
** [[Newey–West estimator]]
** [[Newey–West estimator]]
** [[Prais–Winsten estimation|Prais–Winsten transformation]]
** [[Prais–Winsten estimation|Prais–Winsten transformation]]
** Data as Vectors in a Metrizable Space
** Data as vectors in a metrizable space
*** [[Minkowski distance]]
*** [[Minkowski distance]]
*** [[Mahalanobis distance]]
*** [[Mahalanobis distance]]
Line 238: Line 247:
* Line charts
* Line charts
* Slope graphs
* Slope graphs
* {{iw2|GapChart||fr}}
* {{ill|GapChart|fr}}


===Separated charts===
===Separated charts===

Latest revision as of 20:48, 23 November 2024

Time series: random data plus trend, with best-fit line and different applied filters

In mathematics, a time series is a series of data points indexed (or listed or graphed) in time order. Most commonly, a time series is a sequence taken at successive equally spaced points in time. Thus it is a sequence of discrete-time data. Examples of time series are heights of ocean tides, counts of sunspots, and the daily closing value of the Dow Jones Industrial Average.

A time series is very frequently plotted via a run chart (which is a temporal line chart). Time series are used in statistics, signal processing, pattern recognition, econometrics, mathematical finance, weather forecasting, earthquake prediction, electroencephalography, control engineering, astronomy, communications engineering, and largely in any domain of applied science and engineering which involves temporal measurements.

Time series analysis comprises methods for analyzing time series data in order to extract meaningful statistics and other characteristics of the data. Time series forecasting is the use of a model to predict future values based on previously observed values. Generally, time series data is modelled as a stochastic process. While regression analysis is often employed in such a way as to test relationships between one or more different time series, this type of analysis is not usually called "time series analysis", which refers in particular to relationships between different points in time within a single series.

Time series data have a natural temporal ordering. This makes time series analysis distinct from cross-sectional studies, in which there is no natural ordering of the observations (e.g. explaining people's wages by reference to their respective education levels, where the individuals' data could be entered in any order). Time series analysis is also distinct from spatial data analysis where the observations typically relate to geographical locations (e.g. accounting for house prices by the location as well as the intrinsic characteristics of the houses). A stochastic model for a time series will generally reflect the fact that observations close together in time will be more closely related than observations further apart. In addition, time series models will often make use of the natural one-way ordering of time so that values for a given period will be expressed as deriving in some way from past values, rather than from future values (see time reversibility).

Time series analysis can be applied to real-valued, continuous data, discrete numeric data, or discrete symbolic data (i.e. sequences of characters, such as letters and words in the English language[1]).

Methods for analysis

[edit]

Methods for time series analysis may be divided into two classes: frequency-domain methods and time-domain methods. The former include spectral analysis and wavelet analysis; the latter include auto-correlation and cross-correlation analysis. In the time domain, correlation and analysis can be made in a filter-like manner using scaled correlation, thereby mitigating the need to operate in the frequency domain.

Additionally, time series analysis techniques may be divided into parametric and non-parametric methods. The parametric approaches assume that the underlying stationary stochastic process has a certain structure which can be described using a small number of parameters (for example, using an autoregressive or moving-average model). In these approaches, the task is to estimate the parameters of the model that describes the stochastic process. By contrast, non-parametric approaches explicitly estimate the covariance or the spectrum of the process without assuming that the process has any particular structure.

Methods of time series analysis may also be divided into linear and non-linear, and univariate and multivariate.

Panel data

[edit]

A time series is one type of panel data. Panel data is the general class, a multidimensional data set, whereas a time series data set is a one-dimensional panel (as is a cross-sectional dataset). A data set may exhibit characteristics of both panel data and time series data. One way to tell is to ask what makes one data record unique from the other records. If the answer is the time data field, then this is a time series data set candidate. If determining a unique record requires a time data field and an additional identifier which is unrelated to time (e.g. student ID, stock symbol, country code), then it is panel data candidate. If the differentiation lies on the non-time identifier, then the data set is a cross-sectional data set candidate.

Analysis

[edit]

There are several types of motivation and data analysis available for time series which are appropriate for different purposes.

Motivation

[edit]

In the context of statistics, econometrics, quantitative finance, seismology, meteorology, and geophysics the primary goal of time series analysis is forecasting. In the context of signal processing, control engineering and communication engineering it is used for signal detection. Other applications are in data mining, pattern recognition and machine learning, where time series analysis can be used for clustering,[2][3] classification,[4] query by content,[5] anomaly detection as well as forecasting.[6]

Exploratory analysis

[edit]
Time series of tuberculosis deaths in the United States 1954-2021.

A simple way to examine a regular time series is manually with a line chart. The datagraphic shows tuberculosis deaths in the United States,[7] along with the yearly change and the percentage change from year to year. The total number of deaths declined in every year until the mid-1980s, after which there were occasional increases, often proportionately - but not absolutely - quite large.

A study of corporate data analysts found two challenges to exploratory time series analysis: discovering the shape of interesting patterns, and finding an explanation for these patterns.[8] Visual tools that represent time series data as heat map matrices can help overcome these challenges.

Estimation, filtering, and smoothing

[edit]

This approach may be based on harmonic analysis and filtering of signals in the frequency domain using the Fourier transform, and spectral density estimation. Its development was significantly accelerated during World War II by mathematician Norbert Wiener, electrical engineers Rudolf E. Kálmán, Dennis Gabor and others for filtering signals from noise and predicting signal values at a certain point in time.

An equivalent effect may be achieved in the time domain, as in a Kalman filter; see filtering and smoothing for more techniques.

Other related techniques include:

Curve fitting

[edit]

Curve fitting[11][12] is the process of constructing a curve, or mathematical function, that has the best fit to a series of data points,[13] possibly subject to constraints.[14][15] Curve fitting can involve either interpolation,[16][17] where an exact fit to the data is required, or smoothing,[18][19] in which a "smooth" function is constructed that approximately fits the data. A related topic is regression analysis,[20][21] which focuses more on questions of statistical inference such as how much uncertainty is present in a curve that is fit to data observed with random errors. Fitted curves can be used as an aid for data visualization,[22][23] to infer values of a function where no data are available,[24] and to summarize the relationships among two or more variables.[25] Extrapolation refers to the use of a fitted curve beyond the range of the observed data,[26] and is subject to a degree of uncertainty[27] since it may reflect the method used to construct the curve as much as it reflects the observed data.

Growth equations

For processes that are expected to generally grow in magnitude one of the curves in the graphic (and many others) can be fitted by estimating their parameters.

The construction of economic time series involves the estimation of some components for some dates by interpolation between values ("benchmarks") for earlier and later dates. Interpolation is estimation of an unknown quantity between two known quantities (historical data), or drawing conclusions about missing information from the available information ("reading between the lines").[28] Interpolation is useful where the data surrounding the missing data is available and its trend, seasonality, and longer-term cycles are known. This is often done by using a related series known for all relevant dates.[29] Alternatively polynomial interpolation or spline interpolation is used where piecewise polynomial functions are fitted in time intervals such that they fit smoothly together. A different problem which is closely related to interpolation is the approximation of a complicated function by a simple function (also called regression). The main difference between regression and interpolation is that polynomial regression gives a single polynomial that models the entire data set. Spline interpolation, however, yield a piecewise continuous function composed of many polynomials to model the data set.

Extrapolation is the process of estimating, beyond the original observation range, the value of a variable on the basis of its relationship with another variable. It is similar to interpolation, which produces estimates between known observations, but extrapolation is subject to greater uncertainty and a higher risk of producing meaningless results.

Function approximation

[edit]

In general, a function approximation problem asks us to select a function among a well-defined class that closely matches ("approximates") a target function in a task-specific way. One can distinguish two major classes of function approximation problems: First, for known target functions, approximation theory is the branch of numerical analysis that investigates how certain known functions (for example, special functions) can be approximated by a specific class of functions (for example, polynomials or rational functions) that often have desirable properties (inexpensive computation, continuity, integral and limit values, etc.).

Second, the target function, call it g, may be unknown; instead of an explicit formula, only a set of points (a time series) of the form (x, g(x)) is provided. Depending on the structure of the domain and codomain of g, several techniques for approximating g may be applicable. For example, if g is an operation on the real numbers, techniques of interpolation, extrapolation, regression analysis, and curve fitting can be used. If the codomain (range or target set) of g is a finite set, one is dealing with a classification problem instead. A related problem of online time series approximation[30] is to summarize the data in one-pass and construct an approximate representation that can support a variety of time series queries with bounds on worst-case error.

To some extent, the different problems (regression, classification, fitness approximation) have received a unified treatment in statistical learning theory, where they are viewed as supervised learning problems.

Prediction and forecasting

[edit]

In statistics, prediction is a part of statistical inference. One particular approach to such inference is known as predictive inference, but the prediction can be undertaken within any of the several approaches to statistical inference. Indeed, one description of statistics is that it provides a means of transferring knowledge about a sample of a population to the whole population, and to other related populations, which is not necessarily the same as prediction over time. When information is transferred across time, often to specific points in time, the process is known as forecasting.

  • Fully formed statistical models for stochastic simulation purposes, so as to generate alternative versions of the time series, representing what might happen over non-specific time-periods in the future
  • Simple or fully formed statistical models to describe the likely outcome of the time series in the immediate future, given knowledge of the most recent outcomes (forecasting).
  • Forecasting on time series is usually done using automated statistical software packages and programming languages, such as Julia, Python, R, SAS, SPSS and many others.
  • Forecasting on large scale data can be done with Apache Spark using the Spark-TS library, a third-party package.[31]

Classification

[edit]

Assigning time series pattern to a specific category, for example identify a word based on series of hand movements in sign language.

Segmentation

[edit]

Splitting a time-series into a sequence of segments. It is often the case that a time-series can be represented as a sequence of individual segments, each with its own characteristic properties. For example, the audio signal from a conference call can be partitioned into pieces corresponding to the times during which each person was speaking. In time-series segmentation, the goal is to identify the segment boundary points in the time-series, and to characterize the dynamical properties associated with each segment. One can approach this problem using change-point detection, or by modeling the time-series as a more sophisticated system, such as a Markov jump linear system.

Clustering

[edit]

Time series data may be clustered, however special care has to be taken when considering subsequence clustering.[32] Time series clustering may be split into

  • whole time series clustering (multiple time series for which to find a cluster)
  • subsequence time series clustering (single timeseries, split into chunks using sliding windows)
  • time point clustering

Subsequence time series clustering

[edit]

Subsequence time series clustering resulted in unstable (random) clusters induced by the feature extraction using chunking with sliding windows.[33] It was found that the cluster centers (the average of the time series in a cluster - also a time series) follow an arbitrarily shifted sine pattern (regardless of the dataset, even on realizations of a random walk). This means that the found cluster centers are non-descriptive for the dataset because the cluster centers are always nonrepresentative sine waves.

Models

[edit]

Models for time series data can have many forms and represent different stochastic processes. When modeling variations in the level of a process, three broad classes of practical importance are the autoregressive (AR) models, the integrated (I) models, and the moving-average (MA) models. These three classes depend linearly on previous data points.[34] Combinations of these ideas produce autoregressive moving-average (ARMA) and autoregressive integrated moving-average (ARIMA) models. The autoregressive fractionally integrated moving-average (ARFIMA) model generalizes the former three. Extensions of these classes to deal with vector-valued data are available under the heading of multivariate time-series models and sometimes the preceding acronyms are extended by including an initial "V" for "vector", as in VAR for vector autoregression. An additional set of extensions of these models is available for use where the observed time-series is driven by some "forcing" time-series (which may not have a causal effect on the observed series): the distinction from the multivariate case is that the forcing series may be deterministic or under the experimenter's control. For these models, the acronyms are extended with a final "X" for "exogenous".

Non-linear dependence of the level of a series on previous data points is of interest, partly because of the possibility of producing a chaotic time series. However, more importantly, empirical investigations can indicate the advantage of using predictions derived from non-linear models, over those from linear models, as for example in nonlinear autoregressive exogenous models. Further references on nonlinear time series analysis: (Kantz and Schreiber),[35] and (Abarbanel)[36]

Among other types of non-linear time series models, there are models to represent the changes of variance over time (heteroskedasticity). These models represent autoregressive conditional heteroskedasticity (ARCH) and the collection comprises a wide variety of representation (GARCH, TARCH, EGARCH, FIGARCH, CGARCH, etc.). Here changes in variability are related to, or predicted by, recent past values of the observed series. This is in contrast to other possible representations of locally varying variability, where the variability might be modelled as being driven by a separate time-varying process, as in a doubly stochastic model.

In recent work on model-free analyses, wavelet transform based methods (for example locally stationary wavelets and wavelet decomposed neural networks) have gained favor.[37] Multiscale (often referred to as multiresolution) techniques decompose a given time series, attempting to illustrate time dependence at multiple scales. See also Markov switching multifractal (MSMF) techniques for modeling volatility evolution.

A hidden Markov model (HMM) is a statistical Markov model in which the system being modeled is assumed to be a Markov process with unobserved (hidden) states. An HMM can be considered as the simplest dynamic Bayesian network. HMM models are widely used in speech recognition, for translating a time series of spoken words into text.

Many of these models are collected in the python package sktime.

Notation

[edit]

A number of different notations are in use for time-series analysis. A common notation specifying a time series X that is indexed by the natural numbers is written

X = (X1, X2, ...).

Another common notation is

Y = (Yt: tT),

where T is the index set.

Conditions

[edit]

There are two sets of conditions under which much of the theory is built:

Ergodicity implies stationarity, but the converse is not necessarily the case. Stationarity is usually classified into strict stationarity and wide-sense or second-order stationarity. Both models and applications can be developed under each of these conditions, although the models in the latter case might be considered as only partly specified.

In addition, time-series analysis can be applied where the series are seasonally stationary or non-stationary. Situations where the amplitudes of frequency components change with time can be dealt with in time-frequency analysis which makes use of a time–frequency representation of a time-series or signal.[38]

Tools

[edit]

Tools for investigating time-series data include:

Measures

[edit]

Time-series metrics or features that can be used for time series classification or regression analysis:[41]

Visualization

[edit]

Time series can be visualized with two categories of chart: Overlapping Charts and Separated Charts. Overlapping Charts display all-time series on the same layout while Separated Charts presents them on different layouts (but aligned for comparison purpose)[45]

Overlapping charts

[edit]

Separated charts

[edit]
  • Horizon graphs
  • Reduced line chart (small multiples)
  • Silhouette graph
  • Circular silhouette graph

See also

[edit]

References

[edit]
  1. ^ Lin, Jessica; Keogh, Eamonn; Lonardi, Stefano; Chiu, Bill (2003). "A symbolic representation of time series, with implications for streaming algorithms". Proceedings of the 8th ACM SIGMOD workshop on Research issues in data mining and knowledge discovery. New York: ACM Press. pp. 2–11. CiteSeerX 10.1.1.14.5597. doi:10.1145/882082.882086. ISBN 9781450374224. S2CID 6084733.
  2. ^ Warren Liao, T. (November 2005). "Clustering of time series data—a survey". Pattern Recognition. 38 (11): 1857–1874. Bibcode:2005PatRe..38.1857W. doi:10.1016/j.patcog.2005.01.025. S2CID 8973749.
  3. ^ Aghabozorgi, Saeed; Seyed Shirkhorshidi, Ali; Ying Wah, Teh (October 2015). "Time-series clustering – A decade review". Information Systems. 53: 16–38. doi:10.1016/j.is.2015.04.007. S2CID 158707.
  4. ^ Keogh, Eamonn; Kasetty, Shruti (2002). "On the need for time series data mining benchmarks: A survey and empirical demonstration". Proceedings of the eighth ACM SIGKDD international conference on Knowledge discovery and data mining. pp. 102–111. doi:10.1145/775047.775062. ISBN 1-58113-567-X.
  5. ^ Agrawal, Rakesh; Faloutsos, Christos; Swami, Arun (1993). "Efficient similarity search in sequence databases". Foundations of Data Organization and Algorithms. Lecture Notes in Computer Science. Vol. 730. pp. 69–84. doi:10.1007/3-540-57301-1_5. ISBN 978-3-540-57301-2. S2CID 16748451.
  6. ^ Chen, Cathy W. S.; Chiu, L. M. (4 September 2021). "Ordinal Time Series Forecasting of the Air Quality Index". Entropy. 23 (9): 1167. Bibcode:2021Entrp..23.1167C. doi:10.3390/e23091167. PMC 8469594. PMID 34573792.
  7. ^ http://www.cdc.gov/tb/statistics/reports/2022/table1.htm
  8. ^ Sarkar, Advait; Spott, Martin; Blackwell, Alan F.; Jamnik, Mateja (2016). "Visual discovery and model-driven explanation of time series patterns". 2016 IEEE Symposium on Visual Languages and Human-Centric Computing (VL/HCC). pp. 78–86. doi:10.1109/vlhcc.2016.7739668. ISBN 978-1-5090-0252-8. S2CID 9787931.
  9. ^ Bloomfield, Peter (1976). Fourier Analysis of Time Series: An Introduction. Wiley. ISBN 978-0-471-08256-9.[page needed]
  10. ^ Shumway, Robert H. (1988). Applied Statistical Time Series Analysis. Prentice-Hall. ISBN 978-0-13-041500-4.[page needed]
  11. ^ Arlinghaus, Sandra (1994). Practical Handbook of Curve Fitting. CRC Press. ISBN 978-0-8493-0143-8.[page needed]
  12. ^ Kolb, William M. (1984). Curve Fitting for Programmable Calculators. SYNTEC. ISBN 978-0-943494-02-9.[page needed]
  13. ^ Halli, S. S.; Rao, K. V. (1992). Advanced Techniques of Population Analysis. Springer Science & Business Media. p. 165. ISBN 978-0-306-43997-1. functions are fulfilled if we have a good to moderate fit for the observed data.
  14. ^ The Signal and the Noise: Why So Many Predictions Fail-but Some Don't. By Nate Silver
  15. ^ Pyle, Dorian (1999). Data Preparation for Data Mining. Morgan Kaufmann. ISBN 978-1-55860-529-9.[page needed]
  16. ^ Numerical Methods in Engineering with MATLAB®. By Jaan Kiusalaas. Page 24.
  17. ^ Kiusalaas, Jaan (2013). Numerical Methods in Engineering with Python 3. Cambridge University Press. p. 21. ISBN 978-1-139-62058-1.
  18. ^ Guest, Philip George (2012). Numerical Methods of Curve Fitting. Cambridge University Press. p. 349. ISBN 978-1-107-64695-7.
  19. ^ See also: Mollifier
  20. ^ Motulsky, Harvey; Christopoulos, Arthur (2004). Fitting Models to Biological Data Using Linear and Nonlinear Regression: A Practical Guide to Curve Fitting. Oxford University Press. ISBN 978-0-19-803834-4.[page needed]
  21. ^ Regression Analysis By Rudolf J. Freund, William J. Wilson, Ping Sa. Page 269.[date missing]
  22. ^ Daud, Hanita; Sagayan, Vijanth; Yahya, Noorhana; Najwati, Wan (2009). "Modeling of Electromagnetic Waves Using Statistical and Numerical Techniques". Visual Informatics: Bridging Research and Practice. Lecture Notes in Computer Science. Vol. 5857. pp. 686–695. doi:10.1007/978-3-642-05036-7_65. ISBN 978-3-642-05035-0.
  23. ^ Hauser, John R. (2009). Numerical Methods for Nonlinear Engineering Models. Springer Science & Business Media. p. 227. ISBN 978-1-4020-9920-5.
  24. ^ William, Dudley, ed. (1976). "Nuclear and Atomic Spectroscopy". Spectroscopy. Methods in Experimental Physics. Vol. 13. pp. 115–346 [150]. doi:10.1016/S0076-695X(08)60643-2. ISBN 978-0-12-475913-8.
  25. ^ Salkind, Neil J. (2010). Encyclopedia of Research Design. SAGE. p. 266. ISBN 978-1-4129-6127-1.
  26. ^ Klosterman, Richard E. (1990). Community Analysis and Planning Techniques. Rowman & Littlefield Publishers. p. 1. ISBN 978-0-7425-7440-3.
  27. ^ Yoe, Charles E. (March 1996). An Introduction to Risk and Uncertainty in the Evaluation of Environmental Investments (Report). U.S. Army Corps of Engineers. p. 69. DTIC ADA316839.
  28. ^ Hamming, Richard (2012). Numerical Methods for Scientists and Engineers. Courier Corporation. ISBN 978-0-486-13482-6.[page needed]
  29. ^ Friedman, Milton (December 1962). "The Interpolation of Time Series by Related Series". Journal of the American Statistical Association. 57 (300): 729–757. doi:10.1080/01621459.1962.10500812.
  30. ^ Gandhi, Sorabh; Foschini, Luca; Suri, Subhash (2010). "Space-efficient online approximation of time series data: Streams, amnesia, and out-of-order". 2010 IEEE 26th International Conference on Data Engineering (ICDE 2010). pp. 924–935. doi:10.1109/ICDE.2010.5447930. ISBN 978-1-4244-5445-7. S2CID 16072352.
  31. ^ Sandy Ryza (2020-03-18). "Time Series Analysis with Spark" (slides of a talk at Spark Summit East 2016). Databricks. Retrieved 2021-01-12.
  32. ^ Zolhavarieh, Seyedjamal; Aghabozorgi, Saeed; Teh, Ying Wah (2014). "A Review of Subsequence Time Series Clustering". The Scientific World Journal. 2014: 312521. doi:10.1155/2014/312521. PMC 4130317. PMID 25140332.
  33. ^ Keogh, Eamonn; Lin, Jessica (August 2005). "Clustering of time-series subsequences is meaningless: implications for previous and future research". Knowledge and Information Systems. 8 (2): 154–177. doi:10.1007/s10115-004-0172-7.
  34. ^ Gershenfeld, N. (1999). The Nature of Mathematical Modeling. New York: Cambridge University Press. pp. 205–208. ISBN 978-0521570954.
  35. ^ Kantz, Holger; Thomas, Schreiber (2004). Nonlinear Time Series Analysis. London: Cambridge University Press. ISBN 978-0521529020.
  36. ^ Abarbanel, Henry (Nov 25, 1997). Analysis of Observed Chaotic Data. New York: Springer. ISBN 978-0387983721.
  37. ^ Tomás, R.; Li, Z.; Lopez-Sanchez, J. M.; Liu, P.; Singleton, A. (June 2016). "Using wavelet tools to analyse seasonal variations from InSAR time-series data: a case study of the Huangtupo landslide". Landslides. 13 (3): 437–450. Bibcode:2016Lands..13..437T. doi:10.1007/s10346-015-0589-y. hdl:10045/62160. ISSN 1612-510X.
  38. ^ Boashash, B. (ed.), (2003) Time-Frequency Signal Analysis and Processing: A Comprehensive Reference, Elsevier Science, Oxford, 2003 ISBN 0-08-044335-4
  39. ^ Nikolić, Danko; Mureşan, Raul C.; Feng, Weijia; Singer, Wolf (March 2012). "Scaled correlation analysis: a better way to compute a cross-correlogram". European Journal of Neuroscience. 35 (5): 742–762. doi:10.1111/j.1460-9568.2011.07987.x. PMID 22324876. S2CID 4694570.
  40. ^ a b Sakoe, H.; Chiba, S. (February 1978). "Dynamic programming algorithm optimization for spoken word recognition". IEEE Transactions on Acoustics, Speech, and Signal Processing. 26 (1): 43–49. doi:10.1109/TASSP.1978.1163055. S2CID 17900407.
  41. ^ Mormann, Florian; Andrzejak, Ralph G.; Elger, Christian E.; Lehnertz, Klaus (2007). "Seizure prediction: the long and winding road". Brain. 130 (2): 314–333. doi:10.1093/brain/awl241. PMID 17008335.
  42. ^ Land, Bruce; Elias, Damian. "Measuring the 'Complexity' of a time series".
  43. ^ Chevyrev, Ilya; Kormilitzin, Andrey (2016). "A Primer on the Signature Method in Machine Learning". arXiv:1603.03788.
  44. ^ Ropella, G.E.P.; Nag, D.A.; Hunt, C.A. (2003). "Similarity measures for automated comparison of in silico and in vitro experimental results". Proceedings of the 25th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (IEEE Cat. No.03CH37439). pp. 2933–2936. doi:10.1109/IEMBS.2003.1280532. ISBN 978-0-7803-7789-9. S2CID 17798157.
  45. ^ Tominski, Christian; Aigner, Wolfgang. "The TimeViz Browser:A Visual Survey of Visualization Techniques for Time-Oriented Data". Retrieved 1 June 2014.

Further reading

[edit]
[edit]