🕷️ Crawler Inspector

URL Lookup

Direct Parameter Lookup

Raw Queries and Responses

1. Shard Calculation

Query:
Response:
Calculated Shard: 152 (from laksa022)

2. Crawled Status Check

Query:
Response:

3. Robots.txt Check

Query:
Response:

4. Spam/Ban Check

Query:
Response:

5. Seen Status Check

ℹ️ Skipped - page is already crawled

📄
INDEXABLE
CRAWLED
8 days ago
🤖
ROBOTS ALLOWED

Page Info Filters

FilterStatusConditionDetails
HTTP statusPASSdownload_http_code = 200HTTP 200
Age cutoffPASSdownload_stamp > now() - 6 MONTH0.3 months ago (distributed domain, exempt)
History dropPASSisNull(history_drop_reason)No drop reason
Spam/banPASSfh_dont_index != 1 AND ml_spam_score = 0ml_spam_score=0
CanonicalPASSmeta_canonical IS NULL OR = '' OR = src_unparsedNot set

Page Details

PropertyValue
URLhttps://en.wikipedia.org/wiki/Moving_average
Last Crawled2026-04-02 07:13:03 (8 days ago)
First Indexed2013-08-08 16:22:51 (12 years ago)
HTTP Status Code200
Meta TitleMoving average - Wikipedia
Meta Descriptionnull
Meta Canonicalnull
Boilerpipe Text
From Wikipedia, the free encyclopedia Smoothing of a noisy sine (blue curve) with a moving average (red curve). In statistics , a moving average ( rolling average or running average or moving mean [ 1 ] or rolling mean ) is a calculation to analyze data points by creating a series of averages of different selections of the full data set. Variations include: simple , cumulative , or weighted forms. Mathematically, a moving average is a type of convolution . Thus in signal processing it is viewed as a low-pass finite impulse response filter. Because the boxcar function outlines its filter coefficients, it is called a boxcar filter . It is sometimes followed by downsampling . Given a series of numbers and a fixed subset size, the first element of the moving average is obtained by taking the average of the initial fixed subset of the number series. Then the subset is modified by "shifting forward"; that is, excluding the first number of the series and including the next value in the series. A moving average is commonly used with time series data to smooth out short-term fluctuations and highlight longer-term trends or cycles - in this case the calculation is sometimes called a time average . The threshold between short-term and long-term depends on the application, and the parameters of the moving average will be set accordingly. It is also used in economics to examine gross domestic product, employment or other macroeconomic time series. When used with non-time series data, a moving average filters higher frequency components without any specific connection to time, although typically some kind of ordering is implied. Viewed simplistically it can be regarded as smoothing the data. The technique of moving averages was invented by the Bank of England in 1833 to conceal the state of its bullion reserves. [ 2 ] Simple moving average [ edit ] In financial applications a simple moving average ( SMA ) is the unweighted mean of the previous data-points. However, in science and engineering, the mean is normally taken from an equal number of data on either side of a central value. This ensures that variations in the mean are aligned with the variations in the data rather than being shifted in time. An example of a simple equally weighted running mean is the mean over the last entries of a data-set containing entries. Let those data-points be . This could be closing prices of a stock. The mean over the last data-points (days in this example) is denoted as and calculated as: When calculating the next mean with the same sampling width the range from to is considered. A new value comes into the sum and the oldest value drops out. This simplifies the calculations by reusing the previous mean . This means that the moving average filter can be computed quite cheaply on real time data with a FIFO / circular buffer and only 3 arithmetic steps. During the initial filling of the FIFO / circular buffer the sampling window is equal to the data-set size thus and the average calculation is performed as a cumulative moving average . The period selected ( ) depends on the type of movement of interest, such as short, intermediate, or long-term. If the data used are not centered around the mean, a simple moving average lags behind the latest datum by half the sample width. An SMA can also be disproportionately influenced by old data dropping out or new data coming in. One characteristic of the SMA is that if the data has a periodic fluctuation, then applying an SMA of that period will eliminate that variation (the average always containing one complete cycle). But a perfectly regular cycle is rarely encountered. [ 3 ] For a number of applications, it is advantageous to avoid the shifting induced by using only "past" data. Hence a central moving average can be computed, using data equally spaced on either side of the point in the series where the mean is calculated. [ 4 ] This requires using an odd number of points in the sample window. A major drawback of the SMA is that it lets through a significant amount of the signal shorter than the window length. This can lead to unexpected artifacts, such as peaks in the smoothed result appearing where there were troughs in the data. It also leads to the result being less smooth than expected since some of the higher frequencies are not properly removed. Its frequency response is a type of low-pass filter called sinc-in-frequency . Continuous moving average [ edit ] The continuous moving average of an integrable function is defined via integration as: where the environment around defines the intensity of smoothing of the graph of the integrable function. A larger smooths the source graph of the function (blue) more. The animations below show the moving average as animation in dependency of different values for   . The fraction is used, because is the interval width for the integral. Naturally, by fundamental theorem of calculus and L'Hôpital's rule . Continuous moving average sine and polynom - visualization of the smoothing with a small interval for integration Continuous moving average sine and polynom - visualization of the smoothing with a larger interval for integration Animation showing the impact of interval width and smoothing by moving average. In a cumulative average ( CA ), the data arrive in an ordered datum stream, and the user would like to get the average of all of the data up until the current datum. For example, an investor may want the average price of all of the stock transactions for a particular stock up until the current time. As each new transaction occurs, the average price at the time of the transaction can be calculated for all of the transactions up to that point using the cumulative average, typically an equally weighted average of the sequence of n values up to the current time: The brute-force method to calculate this would be to store all of the data and calculate the sum and divide by the number of points every time a new datum arrived. However, it is possible to simply update cumulative average as a new value, becomes available, using the formula Thus the current cumulative average for a new datum is equal to the previous cumulative average, times n , plus the latest datum, all divided by the number of points received so far, n +1. When all of the data arrive ( n = N ), then the cumulative average will equal the final average. It is also possible to store a running total of the data as well as the number of points and dividing the total by the number of points to get the CA each time a new datum arrives. The derivation of the cumulative average formula is straightforward. Using and similarly for n + 1 , it is seen that Solving this equation for results in Weighted moving average [ edit ] A weighted average is an average that has multiplying factors to give different weights to data at different positions in the sample window. Mathematically, the weighted moving average is the convolution of the data with a fixed weighting function. One application is removing pixelization from a digital graphical image. This is also known as Anti-aliasing [ citation needed ] In the financial field, and more specifically in the analyses of financial data, a weighted moving average (WMA) has the specific meaning of weights that decrease in arithmetical progression. [ 5 ] In an n -day WMA the latest day has weight n , the second latest , etc., down to one. WMA weights n = 15 The denominator is a triangle number equal to In the more general case the denominator will always be the sum of the individual weights. When calculating the WMA across successive values, the difference between the numerators of and is . If we denote the sum by , then The graph at the right shows how the weights decrease, from highest weight for the most recent data, down to zero. It can be compared to the weights in the exponential moving average which follows. Exponential moving average [ edit ] An exponential moving average (EMA) , also known as an exponentially weighted moving average (EWMA) , [ 6 ] is a first-order infinite impulse response filter that applies weighting factors which decrease exponentially . The weighting for each older datum decreases exponentially, never reaching zero. This formulation is according to Hunter (1986). [ 7 ] There is also a multivariate implementation of EWMA, known as MEWMA. [ 8 ] Other weighting systems are used occasionally – for example, in share trading a volume weighting will weight each time period in proportion to its trading volume. A further weighting, used by actuaries, is Spencer's 15-Point Moving Average [ 9 ] (a central moving average). Its symmetric weight coefficients are [−3, −6, −5, 3, 21, 46, 67, 74, 67, 46, 21, 3, −5, −6, −3], which factors as ⁠ [1, 1, 1, 1]×[1, 1, 1, 1]×[1, 1, 1, 1, 1]×[−3, 3, 4, 3, −3] / 320 ⁠ and leaves samples of any quadratic or cubic polynomial unchanged. [ 10 ] [ 11 ] Outside the world of finance, weighted running means have many forms and applications. Each weighting function or "kernel" has its own characteristics. In engineering and science the frequency and phase response of the filter is often of primary importance in understanding the desired and undesired distortions that a particular filter will apply to the data. A mean does not just "smooth" the data. A mean is a form of low-pass filter. The effects of the particular filter used should be understood in order to make an appropriate choice. [ citation needed ] From a statistical point of view, the moving average, when used to estimate the underlying trend in a time series, is susceptible to rare events such as rapid shocks or other anomalies. A more robust estimate of the trend is the simple moving median over n time points: where the median is found by, for example, sorting the values inside the brackets and finding the value in the middle. For larger values of n , the median can be efficiently computed by updating an indexable skiplist . [ 12 ] Statistically, the moving average is optimal for recovering the underlying trend of the time series when the fluctuations about the trend are normally distributed . However, the normal distribution does not place high probability on very large deviations from the trend which explains why such deviations will have a disproportionately large effect on the trend estimate. It can be shown that if the fluctuations are instead assumed to be Laplace distributed , then the moving median is statistically optimal. [ 13 ] For a given variance, the Laplace distribution places higher probability on rare events than does the normal, which explains why the moving median tolerates shocks better than the moving mean. When the simple moving median above is central, the smoothing is identical to the median filter which has applications in, for example, image signal processing. The Moving Median is a more robust alternative to the Moving Average when it comes to estimating the underlying trend in a time series. While the Moving Average is optimal for recovering the trend if the fluctuations around the trend are normally distributed, it is susceptible to the impact of rare events such as rapid shocks or anomalies. In contrast, the Moving Median, which is found by sorting the values inside the time window and finding the value in the middle, is more resistant to the impact of such rare events. This is because, for a given variance, the Laplace distribution, which the Moving Median assumes, places higher probability on rare events than the normal distribution that the Moving Average assumes. As a result, the Moving Median provides a more reliable and stable estimate of the underlying trend even when the time series is affected by large deviations from the trend. Additionally, the Moving Median smoothing is identical to the Median Filter, which has various applications in image signal processing. Moving average regression model [ edit ] In a moving average regression model , a variable of interest is assumed to be a weighted moving average of unobserved independent error terms; the weights in the moving average are parameters to be estimated. Those two concepts are often confused due to their name, but while they share many similarities, they represent distinct methods and are used in very different contexts. Exponential smoothing Local regression (LOESS and LOWESS) Kernel smoothing Moving average convergence/divergence indicator Martingale (probability theory) Moving average crossover Moving least squares Rising moving average Rolling hash Running total Savitzky–Golay filter Window function Zero lag exponential moving average ^ Hydrologic Variability of the Cosumnes River Floodplain (Booth et al., San Francisco Estuary and Watershed Science, Volume 4, Issue 2, 2006) ^ Klein, Judy L. (1997-10-28). Statistical Visions in Time . Cambridge University Press . p. 88. ISBN   9780521420464 . ^ Statistical Analysis , Ya-lun Chou, Holt International, 1975, ISBN   0-03-089422-0 , section 17.9. ^ The derivation and properties of the simple central moving average are given in full at Savitzky–Golay filter . ^ "Weighted Moving Averages: The Basics" . Investopedia. ^ "DEALING WITH MEASUREMENT NOISE - Averaging Filter" . Archived from the original on 2010-03-29 . Retrieved 2010-10-26 . ^ NIST/SEMATECH e-Handbook of Statistical Methods: Single Exponential Smoothing at the National Institute of Standards and Technology ^ Yeh, A.; Lin, D.; Zhou, H.; Venkataramani, C. (2003). "A multivariate exponentially weighted moving average control chart for monitoring process variability" (PDF) . Journal of Applied Statistics . 30 (5): 507– 536. Bibcode : 2003JApSt..30..507Y . doi : 10.1080/0266476032000053655 . ISSN   0266-4763 . Retrieved 16 January 2025 . ^ Spencer's 15-Point Moving Average — from Wolfram MathWorld ^ Rob J Hyndman. " Moving averages ". 2009-11-08. Accessed 2020-08-20. ^ Aditya Guntuboyina. " Statistics 153 (Time Series) : Lecture Three ". 2012-01-24. Accessed 2024-01-07. ^ "Efficient Running Median using an Indexable Skiplist « Python recipes « ActiveState Code" . ^ G.R. Arce, "Nonlinear Signal Processing: A Statistical Approach", Wiley:New Jersey, US, 2005.
Markdown
[Jump to content](https://en.wikipedia.org/wiki/Moving_average#bodyContent) Main menu Main menu move to sidebar hide Navigation - [Main page](https://en.wikipedia.org/wiki/Main_Page "Visit the main page [z]") - [Contents](https://en.wikipedia.org/wiki/Wikipedia:Contents "Guides to browsing Wikipedia") - [Current events](https://en.wikipedia.org/wiki/Portal:Current_events "Articles related to current events") - [Random article](https://en.wikipedia.org/wiki/Special:Random "Visit a randomly selected article [x]") - [About Wikipedia](https://en.wikipedia.org/wiki/Wikipedia:About "Learn about Wikipedia and how it works") - [Contact us](https://en.wikipedia.org/wiki/Wikipedia:Contact_us "How to contact Wikipedia") Contribute - [Help](https://en.wikipedia.org/wiki/Help:Contents "Guidance on how to use and edit Wikipedia") - [Learn to edit](https://en.wikipedia.org/wiki/Help:Introduction "Learn how to edit Wikipedia") - [Community portal](https://en.wikipedia.org/wiki/Wikipedia:Community_portal "The hub for editors") - [Recent changes](https://en.wikipedia.org/wiki/Special:RecentChanges "A list of recent changes to Wikipedia [r]") - [Upload file](https://en.wikipedia.org/wiki/Wikipedia:File_upload_wizard "Add images or other media for use on Wikipedia") - [Special pages](https://en.wikipedia.org/wiki/Special:SpecialPages "A list of all special pages [q]") [![](https://en.wikipedia.org/static/images/icons/enwiki-25.svg) ![Wikipedia](https://en.wikipedia.org/static/images/mobile/copyright/wikipedia-wordmark-en-25.svg) ![The Free Encyclopedia](https://en.wikipedia.org/static/images/mobile/copyright/wikipedia-tagline-en-25.svg)](https://en.wikipedia.org/wiki/Main_Page) [Search](https://en.wikipedia.org/wiki/Special:Search "Search Wikipedia [f]") Appearance - [Donate](https://donate.wikimedia.org/?wmf_source=donate&wmf_medium=sidebar&wmf_campaign=en.wikipedia.org&uselang=en) - [Create account](https://en.wikipedia.org/w/index.php?title=Special:CreateAccount&returnto=Moving+average "You are encouraged to create an account and log in; however, it is not mandatory") - [Log in](https://en.wikipedia.org/w/index.php?title=Special:UserLogin&returnto=Moving+average "You're encouraged to log in; however, it's not mandatory. [o]") Personal tools - [Donate](https://donate.wikimedia.org/?wmf_source=donate&wmf_medium=sidebar&wmf_campaign=en.wikipedia.org&uselang=en) - [Create account](https://en.wikipedia.org/w/index.php?title=Special:CreateAccount&returnto=Moving+average "You are encouraged to create an account and log in; however, it is not mandatory") - [Log in](https://en.wikipedia.org/w/index.php?title=Special:UserLogin&returnto=Moving+average "You're encouraged to log in; however, it's not mandatory. [o]") ## Contents move to sidebar hide - [(Top)](https://en.wikipedia.org/wiki/Moving_average) - [1 History](https://en.wikipedia.org/wiki/Moving_average#History) - [2 Simple moving average](https://en.wikipedia.org/wiki/Moving_average#Simple_moving_average) - [3 Continuous moving average](https://en.wikipedia.org/wiki/Moving_average#Continuous_moving_average) - [4 Cumulative average](https://en.wikipedia.org/wiki/Moving_average#Cumulative_average) - [5 Weighted moving average](https://en.wikipedia.org/wiki/Moving_average#Weighted_moving_average) - [6 Exponential moving average](https://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average) - [7 Other weightings](https://en.wikipedia.org/wiki/Moving_average#Other_weightings) - [8 Moving median](https://en.wikipedia.org/wiki/Moving_average#Moving_median) - [9 Moving average regression model](https://en.wikipedia.org/wiki/Moving_average#Moving_average_regression_model) - [10 See also](https://en.wikipedia.org/wiki/Moving_average#See_also) - [11 References](https://en.wikipedia.org/wiki/Moving_average#References) Toggle the table of contents # Moving average 27 languages - [Български](https://bg.wikipedia.org/wiki/%D0%9F%D1%8A%D0%BB%D0%B7%D1%8F%D1%89%D0%B0_%D1%81%D1%80%D0%B5%D0%B4%D0%BD%D0%B0_%D1%81%D1%82%D0%BE%D0%B9%D0%BD%D0%BE%D1%81%D1%82 "Пълзяща средна стойност – Bulgarian") - [Català](https://ca.wikipedia.org/wiki/Mitjana_m%C3%B2bil "Mitjana mòbil – Catalan") - [Čeština](https://cs.wikipedia.org/wiki/Klouzav%C3%BD_pr%C5%AFm%C4%9Br "Klouzavý průměr – Czech") - [Deutsch](https://de.wikipedia.org/wiki/Gleitender_Mittelwert "Gleitender Mittelwert – German") - [Ελληνικά](https://el.wikipedia.org/wiki/%CE%9A%CE%B9%CE%BD%CE%B7%CF%84%CF%8C%CF%82_%CE%BC%CE%AD%CF%83%CE%BF%CF%82_%CF%8C%CF%81%CE%BF%CF%82 "Κινητός μέσος όρος – Greek") - [Español](https://es.wikipedia.org/wiki/Media_m%C3%B3vil "Media móvil – Spanish") - [Euskara](https://eu.wikipedia.org/wiki/Batezbesteko_higikor "Batezbesteko higikor – Basque") - [فارسی](https://fa.wikipedia.org/wiki/%D9%85%DB%8C%D8%A7%D9%86%DA%AF%DB%8C%D9%86_%D9%85%D8%AA%D8%AD%D8%B1%DA%A9 "میانگین متحرک – Persian") - [Suomi](https://fi.wikipedia.org/wiki/Liukuva_keskiarvo "Liukuva keskiarvo – Finnish") - [Français](https://fr.wikipedia.org/wiki/Moyenne_mobile "Moyenne mobile – French") - [עברית](https://he.wikipedia.org/wiki/%D7%9E%D7%9E%D7%95%D7%A6%D7%A2_%D7%A0%D7%A2 "ממוצע נע – Hebrew") - [Bahasa Indonesia](https://id.wikipedia.org/wiki/Moving_average "Moving average – Indonesian") - [Italiano](https://it.wikipedia.org/wiki/Media_mobile "Media mobile – Italian") - [日本語](https://ja.wikipedia.org/wiki/%E7%A7%BB%E5%8B%95%E5%B9%B3%E5%9D%87 "移動平均 – Japanese") - [한국어](https://ko.wikipedia.org/wiki/%EC%9D%B4%EB%8F%99%ED%8F%89%EA%B7%A0 "이동평균 – Korean") - [Македонски](https://mk.wikipedia.org/wiki/%D0%9F%D1%80%D0%BE%D1%86%D0%B5%D1%81_%D0%BD%D0%B0_%D0%BF%D0%BE%D0%B4%D0%B2%D0%B8%D0%B6%D0%BD%D0%B8_%D1%81%D1%80%D0%B5%D0%B4%D0%B8%D0%BD%D0%B8 "Процес на подвижни средини – Macedonian") - [Nederlands](https://nl.wikipedia.org/wiki/Voortschrijdend_gemiddelde "Voortschrijdend gemiddelde – Dutch") - [Norsk bokmål](https://no.wikipedia.org/wiki/Flytende_gjennomsnitt "Flytende gjennomsnitt – Norwegian Bokmål") - [Polski](https://pl.wikipedia.org/wiki/%C5%9Arednia_ruchoma "Średnia ruchoma – Polish") - [Português](https://pt.wikipedia.org/wiki/M%C3%A9dia_m%C3%B3vel "Média móvel – Portuguese") - [Русский](https://ru.wikipedia.org/wiki/%D0%A1%D0%BA%D0%BE%D0%BB%D1%8C%D0%B7%D1%8F%D1%89%D0%B0%D1%8F_%D1%81%D1%80%D0%B5%D0%B4%D0%BD%D1%8F%D1%8F "Скользящая средняя – Russian") - [Svenska](https://sv.wikipedia.org/wiki/Glidande_medelv%C3%A4rde "Glidande medelvärde – Swedish") - [Tagalog](https://tl.wikipedia.org/wiki/Moving_Average "Moving Average – Tagalog") - [Українська](https://uk.wikipedia.org/wiki/%D0%A0%D1%83%D1%85%D0%BE%D0%BC%D0%B5_%D1%81%D0%B5%D1%80%D0%B5%D0%B4%D0%BD%D1%94 "Рухоме середнє – Ukrainian") - [اردو](https://ur.wikipedia.org/wiki/%D9%85%D8%AA%D8%AD%D8%B1%DA%A9_%D8%A7%D9%88%D8%B3%D8%B7 "متحرک اوسط – Urdu") - [Tiếng Việt](https://vi.wikipedia.org/wiki/Trung_b%C3%ACnh_tr%C6%B0%E1%BB%A3t "Trung bình trượt – Vietnamese") - [中文](https://zh.wikipedia.org/wiki/%E7%A7%BB%E5%8B%95%E5%B9%B3%E5%9D%87 "移動平均 – Chinese") [Edit links](https://www.wikidata.org/wiki/Special:EntityPage/Q1130194#sitelinks-wikipedia "Edit interlanguage links") - [Article](https://en.wikipedia.org/wiki/Moving_average "View the content page [c]") - [Talk](https://en.wikipedia.org/wiki/Talk:Moving_average "Discuss improvements to the content page [t]") English - [Read](https://en.wikipedia.org/wiki/Moving_average) - [Edit](https://en.wikipedia.org/w/index.php?title=Moving_average&action=edit "Edit this page [e]") - [View history](https://en.wikipedia.org/w/index.php?title=Moving_average&action=history "Past revisions of this page [h]") Tools Tools move to sidebar hide Actions - [Read](https://en.wikipedia.org/wiki/Moving_average) - [Edit](https://en.wikipedia.org/w/index.php?title=Moving_average&action=edit "Edit this page [e]") - [View history](https://en.wikipedia.org/w/index.php?title=Moving_average&action=history) General - [What links here](https://en.wikipedia.org/wiki/Special:WhatLinksHere/Moving_average "List of all English Wikipedia pages containing links to this page [j]") - [Related changes](https://en.wikipedia.org/wiki/Special:RecentChangesLinked/Moving_average "Recent changes in pages linked from this page [k]") - [Upload file](https://en.wikipedia.org/wiki/Wikipedia:File_Upload_Wizard "Upload files [u]") - [Permanent link](https://en.wikipedia.org/w/index.php?title=Moving_average&oldid=1332517228 "Permanent link to this revision of this page") - [Page information](https://en.wikipedia.org/w/index.php?title=Moving_average&action=info "More information about this page") - [Cite this page](https://en.wikipedia.org/w/index.php?title=Special:CiteThisPage&page=Moving_average&id=1332517228&wpFormIdentifier=titleform "Information on how to cite this page") - [Get shortened URL](https://en.wikipedia.org/w/index.php?title=Special:UrlShortener&url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FMoving_average) Print/export - [Download as PDF](https://en.wikipedia.org/w/index.php?title=Special:DownloadAsPdf&page=Moving_average&action=show-download-screen "Download this page as a PDF file") - [Printable version](https://en.wikipedia.org/w/index.php?title=Moving_average&printable=yes "Printable version of this page [p]") In other projects - [Wikimedia Commons](https://commons.wikimedia.org/wiki/Category:Moving_averages) - [Wikidata item](https://www.wikidata.org/wiki/Special:EntityPage/Q1130194 "Structured data on this page hosted by Wikidata [g]") Appearance move to sidebar hide From Wikipedia, the free encyclopedia Type of statistical measure over subsets of a dataset For other uses, see [Moving-average model](https://en.wikipedia.org/wiki/Moving-average_model "Moving-average model") and [Moving average (disambiguation)](https://en.wikipedia.org/wiki/Moving_average_\(disambiguation\) "Moving average (disambiguation)"). [![](https://upload.wikimedia.org/wikipedia/commons/thumb/6/6d/Lissage_sinus_bruite_moyenne_glissante.svg/250px-Lissage_sinus_bruite_moyenne_glissante.svg.png)](https://en.wikipedia.org/wiki/File:Lissage_sinus_bruite_moyenne_glissante.svg) Smoothing of a noisy sine (blue curve) with a moving average (red curve). In [statistics](https://en.wikipedia.org/wiki/Statistics "Statistics"), a **moving average** (**rolling average** or **running average** or **moving mean**[\[1\]](https://en.wikipedia.org/wiki/Moving_average#cite_note-1) or **rolling mean**) is a calculation to analyze data points by creating a series of [averages](https://en.wikipedia.org/wiki/Average "Average") of different selections of the full data set. Variations include: [simple](https://en.wikipedia.org/wiki/Moving_average#Simple_moving_average), [cumulative](https://en.wikipedia.org/wiki/Moving_average#Cumulative_average), or [weighted](https://en.wikipedia.org/wiki/Moving_average#Weighted_moving_average) forms. Mathematically, a moving average is a type of [convolution](https://en.wikipedia.org/wiki/Convolution "Convolution"). Thus in [signal processing](https://en.wikipedia.org/wiki/Signal_processing "Signal processing") it is viewed as a [low-pass](https://en.wikipedia.org/wiki/Low-pass_filter "Low-pass filter") [finite impulse response](https://en.wikipedia.org/wiki/Finite_impulse_response "Finite impulse response") filter. Because the [boxcar function](https://en.wikipedia.org/wiki/Boxcar_function "Boxcar function") outlines its filter coefficients, it is called a **boxcar filter**. It is sometimes followed by [downsampling](https://en.wikipedia.org/wiki/Downsampling_\(signal_processing\) "Downsampling (signal processing)"). Given a series of numbers and a fixed subset size, the first element of the moving average is obtained by taking the average of the initial fixed subset of the number series. Then the subset is modified by "shifting forward"; that is, excluding the first number of the series and including the next value in the series. A moving average is commonly used with [time series](https://en.wikipedia.org/wiki/Time_series "Time series") data to smooth out short-term fluctuations and highlight longer-term trends or cycles - in this case the calculation is sometimes called a **time average**. The threshold between short-term and long-term depends on the application, and the parameters of the moving average will be set accordingly. It is also used in [economics](https://en.wikipedia.org/wiki/Economics "Economics") to examine gross domestic product, employment or other macroeconomic time series. When used with non-time series data, a moving average filters higher frequency components without any specific connection to time, although typically some kind of ordering is implied. Viewed simplistically it can be regarded as smoothing the data. ## History \[[edit](https://en.wikipedia.org/w/index.php?title=Moving_average&action=edit&section=1 "Edit section: History")\] The technique of moving averages was invented by the [Bank of England](https://en.wikipedia.org/wiki/Bank_of_England "Bank of England") in 1833 to conceal the state of its bullion reserves.[\[2\]](https://en.wikipedia.org/wiki/Moving_average#cite_note-2) ## Simple moving average \[[edit](https://en.wikipedia.org/w/index.php?title=Moving_average&action=edit&section=2 "Edit section: Simple moving average")\] [![](https://upload.wikimedia.org/wikipedia/commons/thumb/9/93/Moving_Average_Types_comparison_-_Simple_and_Exponential.png/250px-Moving_Average_Types_comparison_-_Simple_and_Exponential.png)](https://en.wikipedia.org/wiki/File:Moving_Average_Types_comparison_-_Simple_and_Exponential.png) In financial applications a **simple moving average** (**SMA**) is the unweighted [mean](https://en.wikipedia.org/wiki/Arithmetic_mean "Arithmetic mean") of the previous k {\\displaystyle k} ![{\\displaystyle k}](https://wikimedia.org/api/rest_v1/media/math/render/svg/c3c9a2c7b599b37105512c5d570edc034056dd40) data-points. However, in science and engineering, the mean is normally taken from an equal number of data on either side of a central value. This ensures that variations in the mean are aligned with the variations in the data rather than being shifted in time. An example of a simple equally weighted running mean is the mean over the last k {\\displaystyle k} ![{\\displaystyle k}](https://wikimedia.org/api/rest_v1/media/math/render/svg/c3c9a2c7b599b37105512c5d570edc034056dd40) entries of a data-set containing n {\\displaystyle n} ![{\\displaystyle n}](https://wikimedia.org/api/rest_v1/media/math/render/svg/a601995d55609f2d9f5e233e36fbe9ea26011b3b) entries. Let those data-points be p 1 , p 2 , … , p n {\\displaystyle p\_{1},p\_{2},\\dots ,p\_{n}} ![{\\displaystyle p\_{1},p\_{2},\\dots ,p\_{n}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/69d4afc30479593f8b2dd046bf3cb3038181e32a). This could be closing prices of a stock. The mean over the last k {\\displaystyle k} ![{\\displaystyle k}](https://wikimedia.org/api/rest_v1/media/math/render/svg/c3c9a2c7b599b37105512c5d570edc034056dd40) data-points (days in this example) is denoted as SMA k {\\displaystyle {\\textit {SMA}}\_{k}} ![{\\displaystyle {\\textit {SMA}}\_{k}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/55c5a6c3df171f0fe3d369ac1fa437ab2e93268f) and calculated as: SMA k \= p n − k \+ 1 \+ p n − k \+ 2 \+ ⋯ \+ p n k \= 1 k ∑ i \= n − k \+ 1 n p i {\\displaystyle {\\begin{aligned}{\\textit {SMA}}\_{k}&={\\frac {p\_{n-k+1}+p\_{n-k+2}+\\cdots +p\_{n}}{k}}\\\\&={\\frac {1}{k}}\\sum \_{i=n-k+1}^{n}p\_{i}\\end{aligned}}} ![{\\displaystyle {\\begin{aligned}{\\textit {SMA}}\_{k}&={\\frac {p\_{n-k+1}+p\_{n-k+2}+\\cdots +p\_{n}}{k}}\\\\&={\\frac {1}{k}}\\sum \_{i=n-k+1}^{n}p\_{i}\\end{aligned}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/98e0c2d28bd25794ca4cac22bbd381fc84f2210d) When calculating the next mean SMA k , next {\\displaystyle {\\textit {SMA}}\_{k,{\\text{next}}}} ![{\\displaystyle {\\textit {SMA}}\_{k,{\\text{next}}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/c4e2ab5ed407abf2ded17f9ad461163bc3cccc3b) with the same sampling width k {\\displaystyle k} ![{\\displaystyle k}](https://wikimedia.org/api/rest_v1/media/math/render/svg/c3c9a2c7b599b37105512c5d570edc034056dd40) the range from n − k \+ 2 {\\displaystyle n-k+2} ![{\\displaystyle n-k+2}](https://wikimedia.org/api/rest_v1/media/math/render/svg/148fed984f3685c93d652b2d38983af41fc66e2e) to n \+ 1 {\\displaystyle n+1} ![{\\displaystyle n+1}](https://wikimedia.org/api/rest_v1/media/math/render/svg/2a135e65a42f2d73cccbfc4569523996ca0036f1) is considered. A new value p n \+ 1 {\\displaystyle p\_{n+1}} ![{\\displaystyle p\_{n+1}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/50eddadedad57fa1d2648327f2bb9b67c50975b0) comes into the sum and the oldest value p n − k \+ 1 {\\displaystyle p\_{n-k+1}} ![{\\displaystyle p\_{n-k+1}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/16bebff1f65e503ea4546c80a79defc9f593ec97) drops out. This simplifies the calculations by reusing the previous mean SMA k , prev {\\displaystyle {\\textit {SMA}}\_{k,{\\text{prev}}}} ![{\\displaystyle {\\textit {SMA}}\_{k,{\\text{prev}}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/242f5ca68177bb35beaa354d790802d4492eccbd). SMA k , next \= 1 k ∑ i \= n − k \+ 2 n \+ 1 p i \= 1 k ( p n − k \+ 2 \+ p n − k \+ 3 \+ ⋯ \+ p n \+ p n \+ 1 ⏟ ∑ i \= n − k \+ 2 n \+ 1 p i \+ p n − k \+ 1 − p n − k \+ 1 ⏟ \= 0 ) \= 1 k ( p n − k \+ 1 \+ p n − k \+ 2 \+ ⋯ \+ p n ) ⏟ \= SMA k , prev − p n − k \+ 1 k \+ p n \+ 1 k \= SMA k , prev \+ 1 k ( p n \+ 1 − p n − k \+ 1 ) {\\displaystyle {\\begin{aligned}{\\textit {SMA}}\_{k,{\\text{next}}}&={\\frac {1}{k}}\\sum \_{i=n-k+2}^{n+1}p\_{i}\\\\&={\\frac {1}{k}}{\\Big (}\\underbrace {p\_{n-k+2}+p\_{n-k+3}+\\dots +p\_{n}+p\_{n+1}} \_{\\sum \_{i=n-k+2}^{n+1}p\_{i}}+\\underbrace {p\_{n-k+1}-p\_{n-k+1}} \_{=0}{\\Big )}\\\\&=\\underbrace {{\\frac {1}{k}}{\\Big (}p\_{n-k+1}+p\_{n-k+2}+\\dots +p\_{n}{\\Big )}} \_{={\\textit {SMA}}\_{k,{\\text{prev}}}}-{\\frac {p\_{n-k+1}}{k}}+{\\frac {p\_{n+1}}{k}}\\\\&={\\textit {SMA}}\_{k,{\\text{prev}}}+{\\frac {1}{k}}{\\Big (}p\_{n+1}-p\_{n-k+1}{\\Big )}\\end{aligned}}} ![{\\displaystyle {\\begin{aligned}{\\textit {SMA}}\_{k,{\\text{next}}}&={\\frac {1}{k}}\\sum \_{i=n-k+2}^{n+1}p\_{i}\\\\&={\\frac {1}{k}}{\\Big (}\\underbrace {p\_{n-k+2}+p\_{n-k+3}+\\dots +p\_{n}+p\_{n+1}} \_{\\sum \_{i=n-k+2}^{n+1}p\_{i}}+\\underbrace {p\_{n-k+1}-p\_{n-k+1}} \_{=0}{\\Big )}\\\\&=\\underbrace {{\\frac {1}{k}}{\\Big (}p\_{n-k+1}+p\_{n-k+2}+\\dots +p\_{n}{\\Big )}} \_{={\\textit {SMA}}\_{k,{\\text{prev}}}}-{\\frac {p\_{n-k+1}}{k}}+{\\frac {p\_{n+1}}{k}}\\\\&={\\textit {SMA}}\_{k,{\\text{prev}}}+{\\frac {1}{k}}{\\Big (}p\_{n+1}-p\_{n-k+1}{\\Big )}\\end{aligned}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/32c76c2a9899a7a1c9ca5055eee5dc57aca71003) This means that the moving average filter can be computed quite cheaply on real time data with a FIFO / [circular buffer](https://en.wikipedia.org/wiki/Circular_buffer "Circular buffer") and only 3 arithmetic steps. During the initial filling of the FIFO / circular buffer the sampling window is equal to the data-set size thus k \= n {\\displaystyle k=n} ![{\\displaystyle k=n}](https://wikimedia.org/api/rest_v1/media/math/render/svg/c4b8cc6fcba0c0b24656b0fb33414d2e6cffb83c) and the average calculation is performed as a [cumulative moving average](https://en.wikipedia.org/wiki/Moving_average#Cumulative_average). The period selected (k {\\displaystyle k} ![{\\displaystyle k}](https://wikimedia.org/api/rest_v1/media/math/render/svg/c3c9a2c7b599b37105512c5d570edc034056dd40)) depends on the type of movement of interest, such as short, intermediate, or long-term. If the data used are not centered around the mean, a simple moving average lags behind the latest datum by half the sample width. An SMA can also be disproportionately influenced by old data dropping out or new data coming in. One characteristic of the SMA is that if the data has a periodic fluctuation, then applying an SMA of that period will eliminate that variation (the average always containing one complete cycle). But a perfectly regular cycle is rarely encountered.[\[3\]](https://en.wikipedia.org/wiki/Moving_average#cite_note-3) For a number of applications, it is advantageous to avoid the shifting induced by using only "past" data. Hence a **central moving average** can be computed, using data equally spaced on either side of the point in the series where the mean is calculated.[\[4\]](https://en.wikipedia.org/wiki/Moving_average#cite_note-4) This requires using an odd number of points in the sample window. A major drawback of the SMA is that it lets through a significant amount of the signal shorter than the window length. This can lead to unexpected artifacts, such as peaks in the smoothed result appearing where there were troughs in the data. It also leads to the result being less smooth than expected since some of the higher frequencies are not properly removed. Its frequency response is a type of low-pass filter called [sinc-in-frequency](https://en.wikipedia.org/wiki/Sinc_filter#Frequency-domain_sinc "Sinc filter"). ## Continuous moving average \[[edit](https://en.wikipedia.org/w/index.php?title=Moving_average&action=edit&section=3 "Edit section: Continuous moving average")\] The continuous moving average of an integrable function f : R → R {\\displaystyle f:\\mathbb {R} \\rightarrow \\mathbb {R} } ![{\\displaystyle f:\\mathbb {R} \\rightarrow \\mathbb {R} }](https://wikimedia.org/api/rest_v1/media/math/render/svg/85e6e186aabef9e51814bbce62e625dc67e825f2) is defined via integration as: M f , ε : R → R x ↦ 1 2 ε ∫ x − ε x \+ ε f ( t ) d t {\\displaystyle {\\begin{array}{rl}M\_{f,\\varepsilon }:\\mathbb {R} &\\rightarrow \\mathbb {R} \\\\x&\\mapsto \\displaystyle {\\frac {1}{2\\,\\varepsilon }}\\int \_{x-\\varepsilon }^{x+\\varepsilon }f(t)\\,dt\\end{array}}} ![{\\displaystyle {\\begin{array}{rl}M\_{f,\\varepsilon }:\\mathbb {R} &\\rightarrow \\mathbb {R} \\\\x&\\mapsto \\displaystyle {\\frac {1}{2\\,\\varepsilon }}\\int \_{x-\\varepsilon }^{x+\\varepsilon }f(t)\\,dt\\end{array}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/ed0d8f2198ff820ff82c5c88487319e3761fcf0f) where the ε {\\displaystyle \\varepsilon } ![{\\displaystyle \\varepsilon }](https://wikimedia.org/api/rest_v1/media/math/render/svg/a30c89172e5b88edbd45d3e2772c7f5e562e5173) environment \[ x − ε , x \+ ε \] {\\displaystyle \[x-\\varepsilon ,x+\\varepsilon \]} ![{\\displaystyle \[x-\\varepsilon ,x+\\varepsilon \]}](https://wikimedia.org/api/rest_v1/media/math/render/svg/707696f3f51603bfa830b1f6d8512cb50f6899e5) around x {\\displaystyle x} ![{\\displaystyle x}](https://wikimedia.org/api/rest_v1/media/math/render/svg/87f9e315fd7e2ba406057a97300593c4802b53e4) defines the intensity of smoothing of the graph of the integrable function. A larger ε \> 0 {\\displaystyle \\varepsilon \>0} ![{\\displaystyle \\varepsilon \>0}](https://wikimedia.org/api/rest_v1/media/math/render/svg/e04ec3670b50384a3ce48aca42e7cc5131a06b12) smooths the source graph of the function (blue) f {\\displaystyle f} ![{\\displaystyle f}](https://wikimedia.org/api/rest_v1/media/math/render/svg/132e57acb643253e7810ee9702d9581f159a1c61) more. The animations below show the moving average as animation in dependency of different values for ε \> 0 {\\displaystyle \\varepsilon \>0} ![{\\displaystyle \\varepsilon \>0}](https://wikimedia.org/api/rest_v1/media/math/render/svg/e04ec3670b50384a3ce48aca42e7cc5131a06b12). The fraction 1 2 ε {\\displaystyle {\\frac {1}{2\\,\\varepsilon }}} ![{\\displaystyle {\\frac {1}{2\\,\\varepsilon }}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/246b668de4fb8d5ea9d429e9890b52e0fbda2f61) is used, because 2 ε {\\displaystyle 2\\,\\varepsilon } ![{\\displaystyle 2\\,\\varepsilon }](https://wikimedia.org/api/rest_v1/media/math/render/svg/12b0ea1c487dc6a234abf6cc1ca036a2bd270f98) is the interval width for the integral. Naturally, lim ε → 0 M f , ε \= f {\\displaystyle \\lim \_{\\varepsilon \\to 0}M\_{f,\\ \\varepsilon }=f} ![{\\displaystyle \\lim \_{\\varepsilon \\to 0}M\_{f,\\ \\varepsilon }=f}](https://wikimedia.org/api/rest_v1/media/math/render/svg/1765767fb36a5ac894c82037c756e1080ad35d06) by [fundamental theorem of calculus](https://en.wikipedia.org/wiki/Fundamental_theorem_of_calculus "Fundamental theorem of calculus") and [L'Hôpital's rule](https://en.wikipedia.org/wiki/L%27H%C3%B4pital%27s_rule "L'Hôpital's rule"). - [![Continuous moving average sine and polynom - visualization of the smoothing with a small interval for integration](https://upload.wikimedia.org/wikipedia/commons/thumb/3/37/Moving_average_sin_polynom_mov_av.gif/250px-Moving_average_sin_polynom_mov_av.gif)](https://en.wikipedia.org/wiki/File:Moving_average_sin_polynom_mov_av.gif "Continuous moving average sine and polynom - visualization of the smoothing with a small interval for integration") Continuous moving average sine and polynom - visualization of the smoothing with a small interval for integration - [![Continuous moving average sine and polynom - visualization of the smoothing with a larger interval for integration](https://upload.wikimedia.org/wikipedia/commons/thumb/4/4d/Moving_average_sine_and_polynom_with_a_larger_interval.gif/250px-Moving_average_sine_and_polynom_with_a_larger_interval.gif)](https://en.wikipedia.org/wiki/File:Moving_average_sine_and_polynom_with_a_larger_interval.gif "Continuous moving average sine and polynom - visualization of the smoothing with a larger interval for integration") Continuous moving average sine and polynom - visualization of the smoothing with a larger interval for integration - [![Animation showing the impact of interval width and smoothing by moving average.](https://upload.wikimedia.org/wikipedia/commons/thumb/5/5c/Moving_average_sine_and_polynom_-_visualization_of_interval_width.gif/250px-Moving_average_sine_and_polynom_-_visualization_of_interval_width.gif)](https://en.wikipedia.org/wiki/File:Moving_average_sine_and_polynom_-_visualization_of_interval_width.gif "Animation showing the impact of interval width and smoothing by moving average.") Animation showing the impact of interval width and smoothing by moving average. ## Cumulative average \[[edit](https://en.wikipedia.org/w/index.php?title=Moving_average&action=edit&section=4 "Edit section: Cumulative average")\] In a **cumulative average** (**CA**), the data arrive in an ordered datum stream, and the user would like to get the average of all of the data up until the current datum. For example, an investor may want the average price of all of the stock transactions for a particular stock up until the current time. As each new transaction occurs, the average price at the time of the transaction can be calculated for all of the transactions up to that point using the cumulative average, typically an equally weighted [average](https://en.wikipedia.org/wiki/Average "Average") of the sequence of *n* values x 1 . … , x n {\\displaystyle x\_{1}.\\ldots ,x\_{n}} ![{\\displaystyle x\_{1}.\\ldots ,x\_{n}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/d0f5d7d42eb3825e0c04f90d638c4f26acd2dd67) up to the current time: CA n \= x 1 \+ ⋯ \+ x n n . {\\displaystyle {\\textit {CA}}\_{n}={{x\_{1}+\\cdots +x\_{n}} \\over n}\\,.} ![{\\displaystyle {\\textit {CA}}\_{n}={{x\_{1}+\\cdots +x\_{n}} \\over n}\\,.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/91507f689b79243c79028d86b4af0dc0f8776b66) The brute-force method to calculate this would be to store all of the data and calculate the sum and divide by the number of points every time a new datum arrived. However, it is possible to simply update cumulative average as a new value, x n \+ 1 {\\displaystyle x\_{n+1}} ![{\\displaystyle x\_{n+1}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/6e76103271a353337f6b3c697209cb19359807df) becomes available, using the formula CA n \+ 1 \= x n \+ 1 \+ n ⋅ CA n n \+ 1 . {\\displaystyle {\\textit {CA}}\_{n+1}={{x\_{n+1}+n\\cdot {\\textit {CA}}\_{n}} \\over {n+1}}.} ![{\\displaystyle {\\textit {CA}}\_{n+1}={{x\_{n+1}+n\\cdot {\\textit {CA}}\_{n}} \\over {n+1}}.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/0c9c0947a999bec96f1d85f05ea66359ea7f9863) Thus the current cumulative average for a new datum is equal to the previous cumulative average, times *n*, plus the latest datum, all divided by the number of points received so far, *n*\+1. When all of the data arrive (*n* = *N*), then the cumulative average will equal the final average. It is also possible to store a running total of the data as well as the number of points and dividing the total by the number of points to get the CA each time a new datum arrives. The derivation of the cumulative average formula is straightforward. Using x 1 \+ ⋯ \+ x n \= n ⋅ CA n {\\displaystyle x\_{1}+\\cdots +x\_{n}=n\\cdot {\\textit {CA}}\_{n}} ![{\\displaystyle x\_{1}+\\cdots +x\_{n}=n\\cdot {\\textit {CA}}\_{n}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/7ae385bc53e8b8499e6f021daab25b4cb8ad4174) and similarly for *n* + 1, it is seen that x n \+ 1 \= ( x 1 \+ ⋯ \+ x n \+ 1 ) − ( x 1 \+ ⋯ \+ x n ) {\\displaystyle x\_{n+1}=(x\_{1}+\\cdots +x\_{n+1})-(x\_{1}+\\cdots +x\_{n})} ![{\\displaystyle x\_{n+1}=(x\_{1}+\\cdots +x\_{n+1})-(x\_{1}+\\cdots +x\_{n})}](https://wikimedia.org/api/rest_v1/media/math/render/svg/d21a0f785513e0187aa61a9fcce3ff20f332161d) x n \+ 1 \= ( n \+ 1 ) ⋅ CA n \+ 1 − n ⋅ CA n {\\displaystyle x\_{n+1}=(n+1)\\cdot {\\textit {CA}}\_{n+1}-n\\cdot {\\textit {CA}}\_{n}} ![{\\displaystyle x\_{n+1}=(n+1)\\cdot {\\textit {CA}}\_{n+1}-n\\cdot {\\textit {CA}}\_{n}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/67b074af685a59a1153bc44d83a78e25e45be94a) Solving this equation for CA n \+ 1 {\\displaystyle {\\textit {CA}}\_{n+1}} ![{\\displaystyle {\\textit {CA}}\_{n+1}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/b98c0092f626fc5e18049c1bbcf795059723b1d2) results in CA n \+ 1 \= x n \+ 1 \+ n ⋅ CA n n \+ 1 \= x n \+ 1 \+ ( n \+ 1 − 1 ) ⋅ CA n n \+ 1 \= ( n \+ 1 ) ⋅ CA n \+ x n \+ 1 − CA n n \+ 1 \= CA n \+ x n \+ 1 − CA n n \+ 1 {\\displaystyle {\\begin{aligned}{\\textit {CA}}\_{n+1}&={x\_{n+1}+n\\cdot {\\textit {CA}}\_{n} \\over {n+1}}\\\\\[6pt\]&={x\_{n+1}+(n+1-1)\\cdot {\\textit {CA}}\_{n} \\over {n+1}}\\\\\[6pt\]&={(n+1)\\cdot {\\textit {CA}}\_{n}+x\_{n+1}-{\\textit {CA}}\_{n} \\over {n+1}}\\\\\[6pt\]&={{\\textit {CA}}\_{n}}+{{x\_{n+1}-{\\textit {CA}}\_{n}} \\over {n+1}}\\end{aligned}}} ![{\\displaystyle {\\begin{aligned}{\\textit {CA}}\_{n+1}&={x\_{n+1}+n\\cdot {\\textit {CA}}\_{n} \\over {n+1}}\\\\\[6pt\]&={x\_{n+1}+(n+1-1)\\cdot {\\textit {CA}}\_{n} \\over {n+1}}\\\\\[6pt\]&={(n+1)\\cdot {\\textit {CA}}\_{n}+x\_{n+1}-{\\textit {CA}}\_{n} \\over {n+1}}\\\\\[6pt\]&={{\\textit {CA}}\_{n}}+{{x\_{n+1}-{\\textit {CA}}\_{n}} \\over {n+1}}\\end{aligned}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/eab3ed436a35de9f7238d74520b1c16f0ad3c224) ## Weighted moving average \[[edit](https://en.wikipedia.org/w/index.php?title=Moving_average&action=edit&section=5 "Edit section: Weighted moving average")\] A weighted average is an average that has multiplying factors to give different weights to data at different positions in the sample window. Mathematically, the weighted moving average is the [convolution](https://en.wikipedia.org/wiki/Convolution "Convolution") of the data with a fixed weighting function. One application is removing [pixelization](https://en.wikipedia.org/wiki/Pixelization "Pixelization") from a digital graphical image. This is also known as [Anti-aliasing](https://en.wikipedia.org/wiki/Anti-aliasing "Anti-aliasing") \[*[citation needed](https://en.wikipedia.org/wiki/Wikipedia:Citation_needed "Wikipedia:Citation needed")*\] In the financial field, and more specifically in the analyses of financial data, a **weighted moving average** (WMA) has the specific meaning of weights that decrease in arithmetical progression.[\[5\]](https://en.wikipedia.org/wiki/Moving_average#cite_note-5) In an *n*\-day WMA the latest day has weight *n*, the second latest n − 1 {\\displaystyle n-1} ![{\\displaystyle n-1}](https://wikimedia.org/api/rest_v1/media/math/render/svg/fbd0b0f32b28f51962943ee9ede4fb34198a2521), etc., down to one. WMA M \= n p M \+ ( n − 1 ) p M − 1 \+ ⋯ \+ 2 p ( ( M − n ) \+ 2 ) \+ p ( ( M − n ) \+ 1 ) n \+ ( n − 1 ) \+ ⋯ \+ 2 \+ 1 {\\displaystyle {\\text{WMA}}\_{M}={np\_{M}+(n-1)p\_{M-1}+\\cdots +2p\_{((M-n)+2)}+p\_{((M-n)+1)} \\over n+(n-1)+\\cdots +2+1}} ![{\\displaystyle {\\text{WMA}}\_{M}={np\_{M}+(n-1)p\_{M-1}+\\cdots +2p\_{((M-n)+2)}+p\_{((M-n)+1)} \\over n+(n-1)+\\cdots +2+1}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/7780333af18da7e27a1186a3d566e28da21b2840) [![](https://upload.wikimedia.org/wikipedia/commons/thumb/7/78/Weighted_moving_average_weights_N%3D15.svg/250px-Weighted_moving_average_weights_N%3D15.svg.png)](https://en.wikipedia.org/wiki/File:Weighted_moving_average_weights_N%3D15.svg) WMA weights *n* = 15 The denominator is a [triangle number](https://en.wikipedia.org/wiki/Triangle_number "Triangle number") equal to n ( n \+ 1 ) 2 . {\\textstyle {\\frac {n(n+1)}{2}}.} ![{\\textstyle {\\frac {n(n+1)}{2}}.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/b1af8c9d0cf9c1347c5149810b72a4b3aa807cd5) In the more general case the denominator will always be the sum of the individual weights. When calculating the WMA across successive values, the difference between the numerators of WMA M \+ 1 {\\displaystyle {\\text{WMA}}\_{M+1}} ![{\\displaystyle {\\text{WMA}}\_{M+1}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/0e3e4c31526380ec9d380f6f3fc0ce6b0da80601) and WMA M {\\displaystyle {\\text{WMA}}\_{M}} ![{\\displaystyle {\\text{WMA}}\_{M}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/3b5be3609fe0ceb37a60d6a129aa29ebef7ae772) is n p M \+ 1 − p M − ⋯ − p M − n \+ 1 {\\displaystyle np\_{M+1}-p\_{M}-\\dots -p\_{M-n+1}} ![{\\displaystyle np\_{M+1}-p\_{M}-\\dots -p\_{M-n+1}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/8585100ebaaa360e885f752388f6d370243b5a6e). If we denote the sum p M \+ ⋯ \+ p M − n \+ 1 {\\displaystyle p\_{M}+\\dots +p\_{M-n+1}} ![{\\displaystyle p\_{M}+\\dots +p\_{M-n+1}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/58c49be7e51bbba3b6429c4d6404ac7c48c03759) by Total M {\\displaystyle {\\text{Total}}\_{M}} ![{\\displaystyle {\\text{Total}}\_{M}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/4cc0e5078472a69e40521d8e65fd4ebbea1fc846), then Total M \+ 1 \= Total M \+ p M \+ 1 − p M − n \+ 1 Numerator M \+ 1 \= Numerator M \+ n p M \+ 1 − Total M WMA M \+ 1 \= Numerator M \+ 1 n \+ ( n − 1 ) \+ ⋯ \+ 2 \+ 1 {\\displaystyle {\\begin{aligned}{\\text{Total}}\_{M+1}&={\\text{Total}}\_{M}+p\_{M+1}-p\_{M-n+1}\\\\\[3pt\]{\\text{Numerator}}\_{M+1}&={\\text{Numerator}}\_{M}+np\_{M+1}-{\\text{Total}}\_{M}\\\\\[3pt\]{\\text{WMA}}\_{M+1}&={{\\text{Numerator}}\_{M+1} \\over n+(n-1)+\\cdots +2+1}\\end{aligned}}} ![{\\displaystyle {\\begin{aligned}{\\text{Total}}\_{M+1}&={\\text{Total}}\_{M}+p\_{M+1}-p\_{M-n+1}\\\\\[3pt\]{\\text{Numerator}}\_{M+1}&={\\text{Numerator}}\_{M}+np\_{M+1}-{\\text{Total}}\_{M}\\\\\[3pt\]{\\text{WMA}}\_{M+1}&={{\\text{Numerator}}\_{M+1} \\over n+(n-1)+\\cdots +2+1}\\end{aligned}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/8ff41461f4d60351300c4ef7cee5f75821fed5ab) The graph at the right shows how the weights decrease, from highest weight for the most recent data, down to zero. It can be compared to the weights in the exponential moving average which follows. ## Exponential moving average \[[edit](https://en.wikipedia.org/w/index.php?title=Moving_average&action=edit&section=6 "Edit section: Exponential moving average")\] Main article: [Exponential smoothing](https://en.wikipedia.org/wiki/Exponential_smoothing "Exponential smoothing") Further information: [EWMA chart](https://en.wikipedia.org/wiki/EWMA_chart "EWMA chart") An **exponential moving average (EMA)**, also known as an **exponentially weighted moving average (EWMA)**,[\[6\]](https://en.wikipedia.org/wiki/Moving_average#cite_note-6) is a first-order [infinite impulse response](https://en.wikipedia.org/wiki/Infinite_impulse_response "Infinite impulse response") filter that applies weighting factors which decrease [exponentially](https://en.wikipedia.org/wiki/Exponential_decay "Exponential decay"). The weighting for each older [datum](https://en.wikipedia.org/wiki/Data "Data") decreases exponentially, never reaching zero. This formulation is according to Hunter (1986).[\[7\]](https://en.wikipedia.org/wiki/Moving_average#cite_note-7) There is also a multivariate implementation of EWMA, known as MEWMA.[\[8\]](https://en.wikipedia.org/wiki/Moving_average#cite_note-8) ## Other weightings \[[edit](https://en.wikipedia.org/w/index.php?title=Moving_average&action=edit&section=7 "Edit section: Other weightings")\] Other weighting systems are used occasionally – for example, in share trading a **volume weighting** will weight each time period in proportion to its trading volume. A further weighting, used by actuaries, is Spencer's 15-Point Moving Average[\[9\]](https://en.wikipedia.org/wiki/Moving_average#cite_note-9) (a central moving average). Its symmetric weight coefficients are \[−3, −6, −5, 3, 21, 46, 67, 74, 67, 46, 21, 3, −5, −6, −3\], which factors as ⁠\[1, 1, 1, 1\]×\[1, 1, 1, 1\]×\[1, 1, 1, 1, 1\]×\[−3, 3, 4, 3, −3\]/320⁠ and leaves samples of any quadratic or cubic polynomial unchanged.[\[10\]](https://en.wikipedia.org/wiki/Moving_average#cite_note-10)[\[11\]](https://en.wikipedia.org/wiki/Moving_average#cite_note-11) Outside the world of finance, weighted running means have many forms and applications. Each weighting function or "kernel" has its own characteristics. In engineering and science the frequency and phase response of the filter is often of primary importance in understanding the desired and undesired distortions that a particular filter will apply to the data. A mean does not just "smooth" the data. A mean is a form of low-pass filter. The effects of the particular filter used should be understood in order to make an appropriate choice.\[*[citation needed](https://en.wikipedia.org/wiki/Wikipedia:Citation_needed "Wikipedia:Citation needed")*\] ## Moving median \[[edit](https://en.wikipedia.org/w/index.php?title=Moving_average&action=edit&section=8 "Edit section: Moving median")\] From a statistical point of view, the moving average, when used to estimate the underlying trend in a time series, is susceptible to rare events such as rapid shocks or other anomalies. A more robust estimate of the trend is the **simple moving median** over *n* time points: p ~ SM \= Median ( p M , p M − 1 , … , p M − n \+ 1 ) {\\displaystyle {\\widetilde {p}}\_{\\text{SM}}={\\text{Median}}(p\_{M},p\_{M-1},\\ldots ,p\_{M-n+1})} ![{\\displaystyle {\\widetilde {p}}\_{\\text{SM}}={\\text{Median}}(p\_{M},p\_{M-1},\\ldots ,p\_{M-n+1})}](https://wikimedia.org/api/rest_v1/media/math/render/svg/929afc05575be455d3571b94a39d824330d8d8db) where the [median](https://en.wikipedia.org/wiki/Median "Median") is found by, for example, sorting the values inside the brackets and finding the value in the middle. For larger values of *n*, the median can be efficiently computed by updating an [indexable skiplist](https://en.wikipedia.org/wiki/Skip_list#Indexable_skiplist "Skip list").[\[12\]](https://en.wikipedia.org/wiki/Moving_average#cite_note-12) Statistically, the moving average is optimal for recovering the underlying trend of the time series when the fluctuations about the trend are [normally distributed](https://en.wikipedia.org/wiki/Normal_distribution "Normal distribution"). However, the normal distribution does not place high probability on very large deviations from the trend which explains why such deviations will have a disproportionately large effect on the trend estimate. It can be shown that if the fluctuations are instead assumed to be [Laplace distributed](https://en.wikipedia.org/wiki/Laplace_distribution "Laplace distribution"), then the moving median is statistically optimal.[\[13\]](https://en.wikipedia.org/wiki/Moving_average#cite_note-13) For a given variance, the Laplace distribution places higher probability on rare events than does the normal, which explains why the moving median tolerates shocks better than the moving mean. When the simple moving median above is central, the smoothing is identical to the [median filter](https://en.wikipedia.org/wiki/Median_filter "Median filter") which has applications in, for example, image signal processing. The Moving Median is a more robust alternative to the Moving Average when it comes to estimating the underlying trend in a time series. While the Moving Average is optimal for recovering the trend if the fluctuations around the trend are normally distributed, it is susceptible to the impact of rare events such as rapid shocks or anomalies. In contrast, the Moving Median, which is found by sorting the values inside the time window and finding the value in the middle, is more resistant to the impact of such rare events. This is because, for a given variance, the Laplace distribution, which the Moving Median assumes, places higher probability on rare events than the normal distribution that the Moving Average assumes. As a result, the Moving Median provides a more reliable and stable estimate of the underlying trend even when the time series is affected by large deviations from the trend. Additionally, the Moving Median smoothing is identical to the Median Filter, which has various applications in image signal processing. ## Moving average regression model \[[edit](https://en.wikipedia.org/w/index.php?title=Moving_average&action=edit&section=9 "Edit section: Moving average regression model")\] Main article: [Moving-average model](https://en.wikipedia.org/wiki/Moving-average_model "Moving-average model") In a [moving average regression model](https://en.wikipedia.org/wiki/Moving_average_model "Moving average model"), a variable of interest is assumed to be a weighted moving average of unobserved independent error terms; the weights in the moving average are parameters to be estimated. Those two concepts are often confused due to their name, but while they share many similarities, they represent distinct methods and are used in very different contexts. ## See also \[[edit](https://en.wikipedia.org/w/index.php?title=Moving_average&action=edit&section=10 "Edit section: See also")\] [![Wikimedia Commons logo](https://upload.wikimedia.org/wikipedia/en/thumb/4/4a/Commons-logo.svg/40px-Commons-logo.svg.png)](https://en.wikipedia.org/wiki/File:Commons-logo.svg) Wikimedia Commons has media related to [Moving averages](https://commons.wikimedia.org/wiki/Category:Moving_averages "commons:Category:Moving averages"). - [Exponential smoothing](https://en.wikipedia.org/wiki/Exponential_smoothing "Exponential smoothing") - [Local regression](https://en.wikipedia.org/wiki/Local_regression "Local regression") (LOESS and LOWESS) - [Kernel smoothing](https://en.wikipedia.org/wiki/Kernel_smoothing "Kernel smoothing") - [Moving average convergence/divergence indicator](https://en.wikipedia.org/wiki/MACD "MACD") - [Martingale (probability theory)](https://en.wikipedia.org/wiki/Martingale_\(probability_theory\) "Martingale (probability theory)") - [Moving average crossover](https://en.wikipedia.org/wiki/Moving_average_crossover "Moving average crossover") - [Moving least squares](https://en.wikipedia.org/wiki/Moving_least_squares "Moving least squares") - [Rising moving average](https://en.wikipedia.org/wiki/Rising_moving_average "Rising moving average") - [Rolling hash](https://en.wikipedia.org/wiki/Rolling_hash "Rolling hash") - [Running total](https://en.wikipedia.org/wiki/Running_total "Running total") - [Savitzky–Golay filter](https://en.wikipedia.org/wiki/Savitzky%E2%80%93Golay_filter "Savitzky–Golay filter") - [Window function](https://en.wikipedia.org/wiki/Window_function "Window function") - [Zero lag exponential moving average](https://en.wikipedia.org/wiki/Zero_lag_exponential_moving_average "Zero lag exponential moving average") ## References \[[edit](https://en.wikipedia.org/w/index.php?title=Moving_average&action=edit&section=11 "Edit section: References")\] 1. **[^](https://en.wikipedia.org/wiki/Moving_average#cite_ref-1)** [Hydrologic Variability of the Cosumnes River Floodplain](http://www.waterboards.ca.gov/waterrights/water_issues/programs/bay_delta/docs/cmnt091412/sldmwa/booth_et_al_2006.pdf) (Booth et al., San Francisco Estuary and Watershed Science, Volume 4, Issue 2, 2006) 2. **[^](https://en.wikipedia.org/wiki/Moving_average#cite_ref-2)** Klein, Judy L. (1997-10-28). *Statistical Visions in Time*. [Cambridge University Press](https://en.wikipedia.org/wiki/Cambridge_University_Press "Cambridge University Press"). p. 88. [ISBN](https://en.wikipedia.org/wiki/ISBN_\(identifier\) "ISBN (identifier)") [9780521420464](https://en.wikipedia.org/wiki/Special:BookSources/9780521420464 "Special:BookSources/9780521420464") . 3. **[^](https://en.wikipedia.org/wiki/Moving_average#cite_ref-3)** *Statistical Analysis*, Ya-lun Chou, Holt International, 1975, [ISBN](https://en.wikipedia.org/wiki/ISBN_\(identifier\) "ISBN (identifier)") [0-03-089422-0](https://en.wikipedia.org/wiki/Special:BookSources/0-03-089422-0 "Special:BookSources/0-03-089422-0") , section 17.9. 4. **[^](https://en.wikipedia.org/wiki/Moving_average#cite_ref-4)** The derivation and properties of the simple central moving average are given in full at [Savitzky–Golay filter](https://en.wikipedia.org/wiki/Savitzky%E2%80%93Golay_filter "Savitzky–Golay filter"). 5. **[^](https://en.wikipedia.org/wiki/Moving_average#cite_ref-5)** ["Weighted Moving Averages: The Basics"](http://www.investopedia.com/articles/technical/060401.asp). Investopedia. 6. **[^](https://en.wikipedia.org/wiki/Moving_average#cite_ref-6)** ["DEALING WITH MEASUREMENT NOISE - Averaging Filter"](https://web.archive.org/web/20100329135531/http://lorien.ncl.ac.uk/ming/filter/filewma.htm). Archived from [the original](http://lorien.ncl.ac.uk/ming/filter/filewma.htm) on 2010-03-29. Retrieved 2010-10-26. 7. **[^](https://en.wikipedia.org/wiki/Moving_average#cite_ref-7)** [NIST/SEMATECH e-Handbook of Statistical Methods: Single Exponential Smoothing](http://www.itl.nist.gov/div898/handbook/pmc/section4/pmc431.htm) at the [National Institute of Standards and Technology](https://en.wikipedia.org/wiki/National_Institute_of_Standards_and_Technology "National Institute of Standards and Technology") 8. **[^](https://en.wikipedia.org/wiki/Moving_average#cite_ref-8)** Yeh, A.; Lin, D.; Zhou, H.; Venkataramani, C. (2003). ["A multivariate exponentially weighted moving average control chart for monitoring process variability"](https://www.stat.purdue.edu/~dkjlin/documents/publications/2003/2003_AppStat1.pdf) (PDF). *[Journal of Applied Statistics](https://en.wikipedia.org/wiki/Journal_of_Applied_Statistics "Journal of Applied Statistics")*. **30** (5): 507–536\. [Bibcode](https://en.wikipedia.org/wiki/Bibcode_\(identifier\) "Bibcode (identifier)"):[2003JApSt..30..507Y](https://ui.adsabs.harvard.edu/abs/2003JApSt..30..507Y). [doi](https://en.wikipedia.org/wiki/Doi_\(identifier\) "Doi (identifier)"):[10\.1080/0266476032000053655](https://doi.org/10.1080%2F0266476032000053655). [ISSN](https://en.wikipedia.org/wiki/ISSN_\(identifier\) "ISSN (identifier)") [0266-4763](https://search.worldcat.org/issn/0266-4763). Retrieved 16 January 2025. 9. **[^](https://en.wikipedia.org/wiki/Moving_average#cite_ref-9)** [Spencer's 15-Point Moving Average — from Wolfram MathWorld](http://mathworld.wolfram.com/Spencers15-PointMovingAverage.html) 10. **[^](https://en.wikipedia.org/wiki/Moving_average#cite_ref-10)** Rob J Hyndman. "[Moving averages](https://robjhyndman.com/papers/movingaverage.pdf)". 2009-11-08. Accessed 2020-08-20. 11. **[^](https://en.wikipedia.org/wiki/Moving_average#cite_ref-11)** Aditya Guntuboyina. "[Statistics 153 (Time Series) : Lecture Three](https://www.stat.berkeley.edu/~aditya/Site/Statistics_153;_Spring_2012_files/Spring2012Statistics153LectureThree.pdf)". 2012-01-24. Accessed 2024-01-07. 12. **[^](https://en.wikipedia.org/wiki/Moving_average#cite_ref-12)** ["Efficient Running Median using an Indexable Skiplist « Python recipes « ActiveState Code"](http://code.activestate.com/recipes/576930/). 13. **[^](https://en.wikipedia.org/wiki/Moving_average#cite_ref-13)** G.R. Arce, "Nonlinear Signal Processing: A Statistical Approach", Wiley:New Jersey, US, 2005. | [v](https://en.wikipedia.org/wiki/Template:Statistics "Template:Statistics") [t](https://en.wikipedia.org/wiki/Template_talk:Statistics "Template talk:Statistics") [e](https://en.wikipedia.org/wiki/Special:EditPage/Template:Statistics "Special:EditPage/Template:Statistics")[Statistics](https://en.wikipedia.org/wiki/Statistics "Statistics") | | |---|---| | [Outline](https://en.wikipedia.org/wiki/Outline_of_statistics "Outline of statistics") [Index](https://en.wikipedia.org/wiki/List_of_statistics_articles "List of statistics articles") | | | [Descriptive statistics](https://en.wikipedia.org/wiki/Descriptive_statistics "Descriptive statistics") | | | | | | [Continuous data](https://en.wikipedia.org/wiki/Continuous_probability_distribution "Continuous probability distribution") | | | | | | [Center](https://en.wikipedia.org/wiki/Central_tendency "Central tendency") | [Mean](https://en.wikipedia.org/wiki/Mean "Mean") [Arithmetic](https://en.wikipedia.org/wiki/Arithmetic_mean "Arithmetic mean") [Arithmetic-Geometric](https://en.wikipedia.org/wiki/Arithmetic%E2%80%93geometric_mean "Arithmetic–geometric mean") [Contraharmonic](https://en.wikipedia.org/wiki/Contraharmonic_mean "Contraharmonic mean") [Cubic](https://en.wikipedia.org/wiki/Cubic_mean "Cubic mean") [Generalized/power](https://en.wikipedia.org/wiki/Generalized_mean "Generalized mean") [Geometric](https://en.wikipedia.org/wiki/Geometric_mean "Geometric mean") [Harmonic](https://en.wikipedia.org/wiki/Harmonic_mean "Harmonic mean") [Heronian](https://en.wikipedia.org/wiki/Heronian_mean "Heronian mean") [Heinz](https://en.wikipedia.org/wiki/Heinz_mean "Heinz mean") [Lehmer](https://en.wikipedia.org/wiki/Lehmer_mean "Lehmer mean") [Median](https://en.wikipedia.org/wiki/Median "Median") [Mode](https://en.wikipedia.org/wiki/Mode_\(statistics\) "Mode (statistics)") | | [Dispersion](https://en.wikipedia.org/wiki/Statistical_dispersion "Statistical dispersion") | [Average absolute deviation](https://en.wikipedia.org/wiki/Average_absolute_deviation "Average absolute deviation") [Coefficient of variation](https://en.wikipedia.org/wiki/Coefficient_of_variation "Coefficient of variation") [Interquartile range](https://en.wikipedia.org/wiki/Interquartile_range "Interquartile range") [Percentile](https://en.wikipedia.org/wiki/Percentile "Percentile") [Range](https://en.wikipedia.org/wiki/Range_\(statistics\) "Range (statistics)") [Standard deviation](https://en.wikipedia.org/wiki/Standard_deviation "Standard deviation") [Variance](https://en.wikipedia.org/wiki/Variance#Sample_variance "Variance") | | [Shape](https://en.wikipedia.org/wiki/Shape_of_the_distribution "Shape of the distribution") | [Central limit theorem](https://en.wikipedia.org/wiki/Central_limit_theorem "Central limit theorem") [Moments](https://en.wikipedia.org/wiki/Moment_\(mathematics\) "Moment (mathematics)") [Kurtosis](https://en.wikipedia.org/wiki/Kurtosis "Kurtosis") [L-moments](https://en.wikipedia.org/wiki/L-moment "L-moment") [Skewness](https://en.wikipedia.org/wiki/Skewness "Skewness") | | [Count data](https://en.wikipedia.org/wiki/Count_data "Count data") | [Index of dispersion](https://en.wikipedia.org/wiki/Index_of_dispersion "Index of dispersion") | | Summary tables | [Contingency table](https://en.wikipedia.org/wiki/Contingency_table "Contingency table") [Frequency distribution](https://en.wikipedia.org/wiki/Frequency_distribution "Frequency distribution") [Grouped data](https://en.wikipedia.org/wiki/Grouped_data "Grouped data") | | [Dependence](https://en.wikipedia.org/wiki/Correlation_and_dependence "Correlation and dependence") | [Partial correlation](https://en.wikipedia.org/wiki/Partial_correlation "Partial correlation") [Pearson product-moment correlation](https://en.wikipedia.org/wiki/Pearson_correlation_coefficient "Pearson correlation coefficient") [Rank correlation](https://en.wikipedia.org/wiki/Rank_correlation "Rank correlation") [Kendall's τ](https://en.wikipedia.org/wiki/Kendall_rank_correlation_coefficient "Kendall rank correlation coefficient") [Spearman's ρ](https://en.wikipedia.org/wiki/Spearman%27s_rank_correlation_coefficient "Spearman's rank correlation coefficient") [Scatter plot](https://en.wikipedia.org/wiki/Scatter_plot "Scatter plot") | | [Graphics](https://en.wikipedia.org/wiki/Statistical_graphics "Statistical graphics") | [Bar chart](https://en.wikipedia.org/wiki/Bar_chart "Bar chart") [Biplot](https://en.wikipedia.org/wiki/Biplot "Biplot") [Box plot](https://en.wikipedia.org/wiki/Box_plot "Box plot") [Control chart](https://en.wikipedia.org/wiki/Control_chart "Control chart") [Correlogram](https://en.wikipedia.org/wiki/Correlogram "Correlogram") [Fan chart](https://en.wikipedia.org/wiki/Fan_chart_\(statistics\) "Fan chart (statistics)") [Forest plot](https://en.wikipedia.org/wiki/Forest_plot "Forest plot") [Histogram](https://en.wikipedia.org/wiki/Histogram "Histogram") [Pie chart](https://en.wikipedia.org/wiki/Pie_chart "Pie chart") [Q–Q plot](https://en.wikipedia.org/wiki/Q%E2%80%93Q_plot "Q–Q plot") [Radar chart](https://en.wikipedia.org/wiki/Radar_chart "Radar chart") [Run chart](https://en.wikipedia.org/wiki/Run_chart "Run chart") [Scatter plot](https://en.wikipedia.org/wiki/Scatter_plot "Scatter plot") [Stem-and-leaf display](https://en.wikipedia.org/wiki/Stem-and-leaf_display "Stem-and-leaf display") [Violin plot](https://en.wikipedia.org/wiki/Violin_plot "Violin plot") [Heatmap](https://en.wikipedia.org/wiki/Heatmap "Heatmap") [Scatter Plot Matrix](https://en.wikipedia.org/wiki/Scatter_plot "Scatter plot") [ECDF plot](https://en.wikipedia.org/wiki/Empirical_distribution_function "Empirical distribution function") | | [Statistical data processing](https://en.wikipedia.org/wiki/Data_preprocessing "Data preprocessing") | | | | | | [Transformations](https://en.wikipedia.org/wiki/Data_transformation_\(statistics\) "Data transformation (statistics)") | [Data transformation](https://en.wikipedia.org/wiki/Data_transformation_\(statistics\) "Data transformation (statistics)") [Log transformation](https://en.wikipedia.org/w/index.php?title=Log_transformation&action=edit&redlink=1 "Log transformation (page does not exist)") [Power transform](https://en.wikipedia.org/wiki/Power_transform "Power transform") [Box–Cox transformation](https://en.wikipedia.org/wiki/Box%E2%80%93Cox_transformation "Box–Cox transformation") [Yeo–Johnson transformation](https://en.wikipedia.org/wiki/Yeo%E2%80%93Johnson_transformation "Yeo–Johnson transformation") [Variance-stabilizing transformation](https://en.wikipedia.org/wiki/Variance-stabilizing_transformation "Variance-stabilizing transformation") [Anscombe transform](https://en.wikipedia.org/wiki/Anscombe_transform "Anscombe transform") [Fisher transformation](https://en.wikipedia.org/wiki/Fisher_transformation "Fisher transformation") | | [Scaling and normalization](https://en.wikipedia.org/wiki/Feature_scaling "Feature scaling") | [Feature scaling](https://en.wikipedia.org/wiki/Feature_scaling "Feature scaling") [Normalization](https://en.wikipedia.org/wiki/Normalization_\(statistics\) "Normalization (statistics)") [Standardization (z-score)](https://en.wikipedia.org/wiki/Standard_score "Standard score") [Min–max normalization](https://en.wikipedia.org/w/index.php?title=Min%E2%80%93max_normalization&action=edit&redlink=1 "Min–max normalization (page does not exist)") [Unit vector normalization](https://en.wikipedia.org/w/index.php?title=Unit_vector_normalization&action=edit&redlink=1 "Unit vector normalization (page does not exist)") | | Data cleaning | [Data cleaning](https://en.wikipedia.org/wiki/Data_cleaning "Data cleaning") [Outlier](https://en.wikipedia.org/wiki/Outlier "Outlier") [Winsorizing](https://en.wikipedia.org/wiki/Winsorizing "Winsorizing") [Truncation](https://en.wikipedia.org/wiki/Truncation_\(statistics\) "Truncation (statistics)") [Missing data](https://en.wikipedia.org/wiki/Missing_data "Missing data") | | Data reduction | [Dimensionality reduction](https://en.wikipedia.org/wiki/Dimensionality_reduction "Dimensionality reduction") [Principal component analysis](https://en.wikipedia.org/wiki/Principal_component_analysis "Principal component analysis") [Factor analysis](https://en.wikipedia.org/wiki/Factor_analysis "Factor analysis") | | Time-series preprocessing | [Differencing](https://en.wikipedia.org/wiki/Differencing "Differencing") [Detrending](https://en.wikipedia.org/wiki/Detrending "Detrending") [Seasonal adjustment](https://en.wikipedia.org/wiki/Seasonal_adjustment "Seasonal adjustment") [Stationarity transformation](https://en.wikipedia.org/wiki/Stationary_process "Stationary process") | | [Data collection](https://en.wikipedia.org/wiki/Data_collection "Data collection") | | | | | | [Study design](https://en.wikipedia.org/wiki/Design_of_experiments "Design of experiments") | [Effect size](https://en.wikipedia.org/wiki/Effect_size "Effect size") [Missing data](https://en.wikipedia.org/wiki/Missing_data "Missing data") [Optimal design](https://en.wikipedia.org/wiki/Optimal_design "Optimal design") [Population](https://en.wikipedia.org/wiki/Statistical_population "Statistical population") [Replication](https://en.wikipedia.org/wiki/Replication_\(statistics\) "Replication (statistics)") [Sample size determination](https://en.wikipedia.org/wiki/Sample_size_determination "Sample size determination") [Statistic](https://en.wikipedia.org/wiki/Statistic "Statistic") [Statistical power](https://en.wikipedia.org/wiki/Statistical_power "Statistical power") | | [Survey methodology](https://en.wikipedia.org/wiki/Survey_methodology "Survey methodology") | [Sampling](https://en.wikipedia.org/wiki/Sampling_\(statistics\) "Sampling (statistics)") [Cluster](https://en.wikipedia.org/wiki/Cluster_sampling "Cluster sampling") [Stratified](https://en.wikipedia.org/wiki/Stratified_sampling "Stratified sampling") [Opinion poll](https://en.wikipedia.org/wiki/Opinion_poll "Opinion poll") [Questionnaire](https://en.wikipedia.org/wiki/Questionnaire "Questionnaire") [Standard error](https://en.wikipedia.org/wiki/Standard_error "Standard error") | | [Controlled experiments](https://en.wikipedia.org/wiki/Experiment "Experiment") | [Blocking](https://en.wikipedia.org/wiki/Blocking_\(statistics\) "Blocking (statistics)") [Factorial experiment](https://en.wikipedia.org/wiki/Factorial_experiment "Factorial experiment") [Interaction](https://en.wikipedia.org/wiki/Interaction_\(statistics\) "Interaction (statistics)") [Random assignment](https://en.wikipedia.org/wiki/Random_assignment "Random assignment") [Randomized controlled trial](https://en.wikipedia.org/wiki/Randomized_controlled_trial "Randomized controlled trial") [Randomized experiment](https://en.wikipedia.org/wiki/Randomized_experiment "Randomized experiment") [Scientific control](https://en.wikipedia.org/wiki/Scientific_control "Scientific control") | | Adaptive designs | [Adaptive clinical trial](https://en.wikipedia.org/wiki/Adaptive_clinical_trial "Adaptive clinical trial") [Stochastic approximation](https://en.wikipedia.org/wiki/Stochastic_approximation "Stochastic approximation") [Up-and-down designs](https://en.wikipedia.org/wiki/Up-and-Down_Designs "Up-and-Down Designs") | | [Observational studies](https://en.wikipedia.org/wiki/Observational_study "Observational study") | [Cohort study](https://en.wikipedia.org/wiki/Cohort_study "Cohort study") [Cross-sectional study](https://en.wikipedia.org/wiki/Cross-sectional_study "Cross-sectional study") [Natural experiment](https://en.wikipedia.org/wiki/Natural_experiment "Natural experiment") [Quasi-experiment](https://en.wikipedia.org/wiki/Quasi-experiment "Quasi-experiment") | | [Statistical inference](https://en.wikipedia.org/wiki/Statistical_inference "Statistical inference") | | | | | | [Statistical theory](https://en.wikipedia.org/wiki/Statistical_theory "Statistical theory") | [Population](https://en.wikipedia.org/wiki/Population_\(statistics\) "Population (statistics)") [Statistic](https://en.wikipedia.org/wiki/Statistic "Statistic") [Probability distribution](https://en.wikipedia.org/wiki/Probability_distribution "Probability distribution") [Sampling distribution](https://en.wikipedia.org/wiki/Sampling_distribution "Sampling distribution") [Order statistic](https://en.wikipedia.org/wiki/Order_statistic "Order statistic") [Empirical distribution](https://en.wikipedia.org/wiki/Empirical_distribution_function "Empirical distribution function") [Density estimation](https://en.wikipedia.org/wiki/Density_estimation "Density estimation") [Statistical model](https://en.wikipedia.org/wiki/Statistical_model "Statistical model") [Model specification](https://en.wikipedia.org/wiki/Model_specification "Model specification") [L*p* space](https://en.wikipedia.org/wiki/Lp_space "Lp space") [Parameter](https://en.wikipedia.org/wiki/Statistical_parameter "Statistical parameter") [location](https://en.wikipedia.org/wiki/Location_parameter "Location parameter") [scale](https://en.wikipedia.org/wiki/Scale_parameter "Scale parameter") [shape](https://en.wikipedia.org/wiki/Shape_parameter "Shape parameter") [Parametric family](https://en.wikipedia.org/wiki/Parametric_statistics "Parametric statistics") [Likelihood](https://en.wikipedia.org/wiki/Likelihood_function "Likelihood function") [(monotone)](https://en.wikipedia.org/wiki/Monotone_likelihood_ratio "Monotone likelihood ratio") [Location–scale family](https://en.wikipedia.org/wiki/Location%E2%80%93scale_family "Location–scale family") [Exponential family](https://en.wikipedia.org/wiki/Exponential_family "Exponential family") [Completeness](https://en.wikipedia.org/wiki/Completeness_\(statistics\) "Completeness (statistics)") [Sufficiency](https://en.wikipedia.org/wiki/Sufficient_statistic "Sufficient statistic") [Statistical functional](https://en.wikipedia.org/wiki/Plug-in_principle "Plug-in principle") [Bootstrap](https://en.wikipedia.org/wiki/Bootstrapping_\(statistics\) "Bootstrapping (statistics)") [U](https://en.wikipedia.org/wiki/U-statistic "U-statistic") [V](https://en.wikipedia.org/wiki/V-statistic "V-statistic") [Optimal decision](https://en.wikipedia.org/wiki/Optimal_decision "Optimal decision") [loss function](https://en.wikipedia.org/wiki/Loss_function "Loss function") [Efficiency](https://en.wikipedia.org/wiki/Efficiency_\(statistics\) "Efficiency (statistics)") [Statistical distance](https://en.wikipedia.org/wiki/Statistical_distance "Statistical distance") [divergence](https://en.wikipedia.org/wiki/Divergence_\(statistics\) "Divergence (statistics)") [Asymptotics](https://en.wikipedia.org/wiki/Asymptotic_theory_\(statistics\) "Asymptotic theory (statistics)") [Robustness](https://en.wikipedia.org/wiki/Robust_statistics "Robust statistics") | | [Frequentist inference](https://en.wikipedia.org/wiki/Frequentist_inference "Frequentist inference") | | | | | | [Point estimation](https://en.wikipedia.org/wiki/Point_estimation "Point estimation") | [Estimating equations](https://en.wikipedia.org/wiki/Estimating_equations "Estimating equations") [Maximum likelihood](https://en.wikipedia.org/wiki/Maximum_likelihood "Maximum likelihood") [Method of moments](https://en.wikipedia.org/wiki/Method_of_moments_\(statistics\) "Method of moments (statistics)") [M-estimator](https://en.wikipedia.org/wiki/M-estimator "M-estimator") [Minimum distance](https://en.wikipedia.org/wiki/Minimum_distance_estimation "Minimum distance estimation") [Unbiased estimators](https://en.wikipedia.org/wiki/Bias_of_an_estimator "Bias of an estimator") [Mean-unbiased minimum-variance](https://en.wikipedia.org/wiki/Minimum-variance_unbiased_estimator "Minimum-variance unbiased estimator") [Rao–Blackwellization](https://en.wikipedia.org/wiki/Rao%E2%80%93Blackwell_theorem "Rao–Blackwell theorem") [Lehmann–Scheffé theorem](https://en.wikipedia.org/wiki/Lehmann%E2%80%93Scheff%C3%A9_theorem "Lehmann–Scheffé theorem") [Median unbiased](https://en.wikipedia.org/wiki/Median-unbiased_estimator "Median-unbiased estimator") [Plug-in](https://en.wikipedia.org/wiki/Plug-in_principle "Plug-in principle") | | [Interval estimation](https://en.wikipedia.org/wiki/Interval_estimation "Interval estimation") | [Confidence interval](https://en.wikipedia.org/wiki/Confidence_interval "Confidence interval") [Pivot](https://en.wikipedia.org/wiki/Pivotal_quantity "Pivotal quantity") [Likelihood interval](https://en.wikipedia.org/wiki/Likelihood_interval "Likelihood interval") [Prediction interval](https://en.wikipedia.org/wiki/Prediction_interval "Prediction interval") [Tolerance interval](https://en.wikipedia.org/wiki/Tolerance_interval "Tolerance interval") [Resampling](https://en.wikipedia.org/wiki/Resampling_\(statistics\) "Resampling (statistics)") [Bootstrap](https://en.wikipedia.org/wiki/Bootstrapping_\(statistics\) "Bootstrapping (statistics)") [Jackknife](https://en.wikipedia.org/wiki/Jackknife_resampling "Jackknife resampling") | | [Testing hypotheses](https://en.wikipedia.org/wiki/Statistical_hypothesis_testing "Statistical hypothesis testing") | [1- & 2-tails](https://en.wikipedia.org/wiki/One-_and_two-tailed_tests "One- and two-tailed tests") [Power](https://en.wikipedia.org/wiki/Power_\(statistics\) "Power (statistics)") [Uniformly most powerful test](https://en.wikipedia.org/wiki/Uniformly_most_powerful_test "Uniformly most powerful test") [Permutation test](https://en.wikipedia.org/wiki/Permutation_test "Permutation test") [Randomization test](https://en.wikipedia.org/wiki/Randomization_test "Randomization test") [Multiple comparisons](https://en.wikipedia.org/wiki/Multiple_comparisons "Multiple comparisons") | | [Parametric tests](https://en.wikipedia.org/wiki/Parametric_statistics "Parametric statistics") | [Likelihood-ratio](https://en.wikipedia.org/wiki/Likelihood-ratio_test "Likelihood-ratio test") [Score/Lagrange multiplier](https://en.wikipedia.org/wiki/Score_test "Score test") [Wald](https://en.wikipedia.org/wiki/Wald_test "Wald test") | | [Specific tests](https://en.wikipedia.org/wiki/List_of_statistical_tests "List of statistical tests") | | | | | | [*Z*\-test (normal)](https://en.wikipedia.org/wiki/Z-test "Z-test") [Student's *t*\-test](https://en.wikipedia.org/wiki/Student%27s_t-test "Student's t-test") [*F*\-test](https://en.wikipedia.org/wiki/F-test "F-test") | | | [Goodness of fit](https://en.wikipedia.org/wiki/Goodness_of_fit "Goodness of fit") | [Chi-squared](https://en.wikipedia.org/wiki/Chi-squared_test "Chi-squared test") [*G*\-test](https://en.wikipedia.org/wiki/G-test "G-test") [Kolmogorov–Smirnov](https://en.wikipedia.org/wiki/Kolmogorov%E2%80%93Smirnov_test "Kolmogorov–Smirnov test") [Anderson–Darling](https://en.wikipedia.org/wiki/Anderson%E2%80%93Darling_test "Anderson–Darling test") [Lilliefors](https://en.wikipedia.org/wiki/Lilliefors_test "Lilliefors test") [Jarque–Bera](https://en.wikipedia.org/wiki/Jarque%E2%80%93Bera_test "Jarque–Bera test") [Normality (Shapiro–Wilk)](https://en.wikipedia.org/wiki/Shapiro%E2%80%93Wilk_test "Shapiro–Wilk test") [Likelihood-ratio test](https://en.wikipedia.org/wiki/Likelihood-ratio_test "Likelihood-ratio test") [Model selection](https://en.wikipedia.org/wiki/Model_selection "Model selection") [Cross validation](https://en.wikipedia.org/wiki/Cross-validation_\(statistics\) "Cross-validation (statistics)") [AIC](https://en.wikipedia.org/wiki/Akaike_information_criterion "Akaike information criterion") [BIC](https://en.wikipedia.org/wiki/Bayesian_information_criterion "Bayesian information criterion") | | [Rank statistics](https://en.wikipedia.org/wiki/Rank_statistics "Rank statistics") | [Sign](https://en.wikipedia.org/wiki/Sign_test "Sign test") [Sample median](https://en.wikipedia.org/wiki/Sample_median "Sample median") [Signed rank (Wilcoxon)](https://en.wikipedia.org/wiki/Wilcoxon_signed-rank_test "Wilcoxon signed-rank test") [Hodges–Lehmann estimator](https://en.wikipedia.org/wiki/Hodges%E2%80%93Lehmann_estimator "Hodges–Lehmann estimator") [Rank sum (Mann–Whitney)](https://en.wikipedia.org/wiki/Mann%E2%80%93Whitney_U_test "Mann–Whitney U test") [Nonparametric](https://en.wikipedia.org/wiki/Nonparametric_statistics "Nonparametric statistics") [anova](https://en.wikipedia.org/wiki/Analysis_of_variance "Analysis of variance") [1-way (Kruskal–Wallis)](https://en.wikipedia.org/wiki/Kruskal%E2%80%93Wallis_test "Kruskal–Wallis test") [2-way (Friedman)](https://en.wikipedia.org/wiki/Friedman_test "Friedman test") [Ordered alternative (Jonckheere–Terpstra)](https://en.wikipedia.org/wiki/Jonckheere%27s_trend_test "Jonckheere's trend test") [Van der Waerden test](https://en.wikipedia.org/wiki/Van_der_Waerden_test "Van der Waerden test") | | [Bayesian inference](https://en.wikipedia.org/wiki/Bayesian_inference "Bayesian inference") | [Bayesian probability](https://en.wikipedia.org/wiki/Bayesian_probability "Bayesian probability") [prior](https://en.wikipedia.org/wiki/Prior_probability "Prior probability") [posterior](https://en.wikipedia.org/wiki/Posterior_probability "Posterior probability") [Credible interval](https://en.wikipedia.org/wiki/Credible_interval "Credible interval") [Bayes factor](https://en.wikipedia.org/wiki/Bayes_factor "Bayes factor") [Bayesian estimator](https://en.wikipedia.org/wiki/Bayes_estimator "Bayes estimator") [Maximum posterior estimator](https://en.wikipedia.org/wiki/Maximum_a_posteriori_estimation "Maximum a posteriori estimation") | | [Correlation](https://en.wikipedia.org/wiki/Correlation_and_dependence "Correlation and dependence") [Regression analysis](https://en.wikipedia.org/wiki/Regression_analysis "Regression analysis") | | | | | | [Correlation](https://en.wikipedia.org/wiki/Correlation_and_dependence "Correlation and dependence") | [Pearson product-moment](https://en.wikipedia.org/wiki/Pearson_product-moment_correlation_coefficient "Pearson product-moment correlation coefficient") [Partial correlation](https://en.wikipedia.org/wiki/Partial_correlation "Partial correlation") [Confounding variable](https://en.wikipedia.org/wiki/Confounding "Confounding") [Coefficient of determination](https://en.wikipedia.org/wiki/Coefficient_of_determination "Coefficient of determination") | | [Regression analysis](https://en.wikipedia.org/wiki/Regression_analysis "Regression analysis") | [Errors and residuals](https://en.wikipedia.org/wiki/Errors_and_residuals "Errors and residuals") [Regression validation](https://en.wikipedia.org/wiki/Regression_validation "Regression validation") [Mixed effects models](https://en.wikipedia.org/wiki/Mixed_model "Mixed model") [Simultaneous equations models](https://en.wikipedia.org/wiki/Simultaneous_equations_model "Simultaneous equations model") [Multivariate adaptive regression splines (MARS)](https://en.wikipedia.org/wiki/Multivariate_adaptive_regression_splines "Multivariate adaptive regression splines") ![](https://upload.wikimedia.org/wikipedia/commons/thumb/8/83/Symbol_template_class_pink.svg/20px-Symbol_template_class_pink.svg.png) [Template:Least squares and regression analysis](https://en.wikipedia.org/wiki/Template:Least_squares_and_regression_analysis "Template:Least squares and regression analysis") | | [Linear regression](https://en.wikipedia.org/wiki/Linear_regression "Linear regression") | [Simple linear regression](https://en.wikipedia.org/wiki/Simple_linear_regression "Simple linear regression") [Ordinary least squares](https://en.wikipedia.org/wiki/Ordinary_least_squares "Ordinary least squares") [General linear model](https://en.wikipedia.org/wiki/General_linear_model "General linear model") [Bayesian regression](https://en.wikipedia.org/wiki/Bayesian_linear_regression "Bayesian linear regression") | | Non-standard predictors | [Nonlinear regression](https://en.wikipedia.org/wiki/Nonlinear_regression "Nonlinear regression") [Nonparametric](https://en.wikipedia.org/wiki/Nonparametric_regression "Nonparametric regression") [Semiparametric](https://en.wikipedia.org/wiki/Semiparametric_regression "Semiparametric regression") [Isotonic](https://en.wikipedia.org/wiki/Isotonic_regression "Isotonic regression") [Robust](https://en.wikipedia.org/wiki/Robust_regression "Robust regression") [Homoscedasticity and Heteroscedasticity](https://en.wikipedia.org/wiki/Homoscedasticity_and_heteroscedasticity "Homoscedasticity and heteroscedasticity") | | [Generalized linear model](https://en.wikipedia.org/wiki/Generalized_linear_model "Generalized linear model") | [Exponential families](https://en.wikipedia.org/wiki/Exponential_family "Exponential family") [Logistic (Bernoulli)](https://en.wikipedia.org/wiki/Logistic_regression "Logistic regression") / [Binomial](https://en.wikipedia.org/wiki/Binomial_regression "Binomial regression") / [Poisson regressions](https://en.wikipedia.org/wiki/Poisson_regression "Poisson regression") | | [Partition of variance](https://en.wikipedia.org/wiki/Partition_of_sums_of_squares "Partition of sums of squares") | [Analysis of variance (ANOVA, anova)](https://en.wikipedia.org/wiki/Analysis_of_variance "Analysis of variance") [Analysis of covariance](https://en.wikipedia.org/wiki/Analysis_of_covariance "Analysis of covariance") [Multivariate ANOVA](https://en.wikipedia.org/wiki/Multivariate_analysis_of_variance "Multivariate analysis of variance") [Degrees of freedom](https://en.wikipedia.org/wiki/Degrees_of_freedom_\(statistics\) "Degrees of freedom (statistics)") | | [Categorical](https://en.wikipedia.org/wiki/Categorical_variable "Categorical variable") / [multivariate](https://en.wikipedia.org/wiki/Multivariate_statistics "Multivariate statistics") / [time-series](https://en.wikipedia.org/wiki/Time_series "Time series") / [survival analysis](https://en.wikipedia.org/wiki/Survival_analysis "Survival analysis") | | | | | | [Categorical](https://en.wikipedia.org/wiki/Categorical_variable "Categorical variable") | [Cohen's kappa](https://en.wikipedia.org/wiki/Cohen%27s_kappa "Cohen's kappa") [Contingency table](https://en.wikipedia.org/wiki/Contingency_table "Contingency table") [Graphical model](https://en.wikipedia.org/wiki/Graphical_model "Graphical model") [Log-linear model](https://en.wikipedia.org/wiki/Poisson_regression "Poisson regression") [McNemar's test](https://en.wikipedia.org/wiki/McNemar%27s_test "McNemar's test") [Cochran–Mantel–Haenszel statistics](https://en.wikipedia.org/wiki/Cochran%E2%80%93Mantel%E2%80%93Haenszel_statistics "Cochran–Mantel–Haenszel statistics") | | [Multivariate](https://en.wikipedia.org/wiki/Multivariate_statistics "Multivariate statistics") | [Regression](https://en.wikipedia.org/wiki/General_linear_model "General linear model") [Manova](https://en.wikipedia.org/wiki/Multivariate_analysis_of_variance "Multivariate analysis of variance") [Principal components](https://en.wikipedia.org/wiki/Principal_component_analysis "Principal component analysis") [Canonical correlation](https://en.wikipedia.org/wiki/Canonical_correlation "Canonical correlation") [Discriminant analysis](https://en.wikipedia.org/wiki/Linear_discriminant_analysis "Linear discriminant analysis") [Cluster analysis](https://en.wikipedia.org/wiki/Cluster_analysis "Cluster analysis") [Classification](https://en.wikipedia.org/wiki/Statistical_classification "Statistical classification") [Structural equation model](https://en.wikipedia.org/wiki/Structural_equation_modeling "Structural equation modeling") [Factor analysis](https://en.wikipedia.org/wiki/Factor_analysis "Factor analysis") [Multivariate distributions](https://en.wikipedia.org/wiki/Multivariate_distribution "Multivariate distribution") [Elliptical distributions](https://en.wikipedia.org/wiki/Elliptical_distribution "Elliptical distribution") [Normal](https://en.wikipedia.org/wiki/Multivariate_normal_distribution "Multivariate normal distribution") | | [Time-series](https://en.wikipedia.org/wiki/Time_series "Time series") | | | | | | General | [Decomposition](https://en.wikipedia.org/wiki/Decomposition_of_time_series "Decomposition of time series") [Trend](https://en.wikipedia.org/wiki/Trend_estimation "Trend estimation") [Stationarity](https://en.wikipedia.org/wiki/Stationary_process "Stationary process") [Seasonal adjustment](https://en.wikipedia.org/wiki/Seasonal_adjustment "Seasonal adjustment") [Exponential smoothing](https://en.wikipedia.org/wiki/Exponential_smoothing "Exponential smoothing") [Cointegration](https://en.wikipedia.org/wiki/Cointegration "Cointegration") [Structural break](https://en.wikipedia.org/wiki/Structural_break "Structural break") [Granger causality](https://en.wikipedia.org/wiki/Granger_causality "Granger causality") | | Specific tests | [Dickey–Fuller](https://en.wikipedia.org/wiki/Dickey%E2%80%93Fuller_test "Dickey–Fuller test") [Johansen](https://en.wikipedia.org/wiki/Johansen_test "Johansen test") [Q-statistic (Ljung–Box)](https://en.wikipedia.org/wiki/Ljung%E2%80%93Box_test "Ljung–Box test") [Durbin–Watson](https://en.wikipedia.org/wiki/Durbin%E2%80%93Watson_statistic "Durbin–Watson statistic") [Breusch–Godfrey](https://en.wikipedia.org/wiki/Breusch%E2%80%93Godfrey_test "Breusch–Godfrey test") | | [Time domain](https://en.wikipedia.org/wiki/Time_domain "Time domain") | [Autocorrelation (ACF)](https://en.wikipedia.org/wiki/Autocorrelation "Autocorrelation") [partial (PACF)](https://en.wikipedia.org/wiki/Partial_autocorrelation_function "Partial autocorrelation function") [Cross-correlation (XCF)](https://en.wikipedia.org/wiki/Cross-correlation "Cross-correlation") [ARMA model](https://en.wikipedia.org/wiki/Autoregressive%E2%80%93moving-average_model "Autoregressive–moving-average model") [ARIMA model (Box–Jenkins)](https://en.wikipedia.org/wiki/Box%E2%80%93Jenkins_method "Box–Jenkins method") [Autoregressive conditional heteroskedasticity (ARCH)](https://en.wikipedia.org/wiki/Autoregressive_conditional_heteroskedasticity "Autoregressive conditional heteroskedasticity") [Vector autoregression (VAR)](https://en.wikipedia.org/wiki/Vector_autoregression "Vector autoregression") ([Autoregressive model (AR)](https://en.wikipedia.org/wiki/Autoregressive_model "Autoregressive model")) | | [Frequency domain](https://en.wikipedia.org/wiki/Frequency_domain "Frequency domain") | [Spectral density estimation](https://en.wikipedia.org/wiki/Spectral_density_estimation "Spectral density estimation") [Fourier analysis](https://en.wikipedia.org/wiki/Fourier_analysis "Fourier analysis") [Least-squares spectral analysis](https://en.wikipedia.org/wiki/Least-squares_spectral_analysis "Least-squares spectral analysis") [Wavelet](https://en.wikipedia.org/wiki/Wavelet "Wavelet") [Whittle likelihood](https://en.wikipedia.org/wiki/Whittle_likelihood "Whittle likelihood") | | [Survival](https://en.wikipedia.org/wiki/Survival_analysis "Survival analysis") | | | | | | [Survival function](https://en.wikipedia.org/wiki/Survival_function "Survival function") | [Kaplan–Meier estimator (product limit)](https://en.wikipedia.org/wiki/Kaplan%E2%80%93Meier_estimator "Kaplan–Meier estimator") [Proportional hazards models](https://en.wikipedia.org/wiki/Proportional_hazards_model "Proportional hazards model") [Accelerated failure time (AFT) model](https://en.wikipedia.org/wiki/Accelerated_failure_time_model "Accelerated failure time model") [First hitting time](https://en.wikipedia.org/wiki/First-hitting-time_model "First-hitting-time model") | | [Hazard function](https://en.wikipedia.org/wiki/Failure_rate "Failure rate") | [Nelson–Aalen estimator](https://en.wikipedia.org/wiki/Nelson%E2%80%93Aalen_estimator "Nelson–Aalen estimator") | | Test | [Log-rank test](https://en.wikipedia.org/wiki/Log-rank_test "Log-rank test") | | [Applications](https://en.wikipedia.org/wiki/List_of_fields_of_application_of_statistics "List of fields of application of statistics") | | | | | | [Biostatistics](https://en.wikipedia.org/wiki/Biostatistics "Biostatistics") | [Bioinformatics](https://en.wikipedia.org/wiki/Bioinformatics "Bioinformatics") [Clinical trials](https://en.wikipedia.org/wiki/Clinical_trial "Clinical trial") / [studies](https://en.wikipedia.org/wiki/Clinical_study_design "Clinical study design") [Epidemiology](https://en.wikipedia.org/wiki/Epidemiology "Epidemiology") [Medical statistics](https://en.wikipedia.org/wiki/Medical_statistics "Medical statistics") | | [Engineering statistics](https://en.wikipedia.org/wiki/Engineering_statistics "Engineering statistics") | [Chemometrics](https://en.wikipedia.org/wiki/Chemometrics "Chemometrics") [Methods engineering](https://en.wikipedia.org/wiki/Methods_engineering "Methods engineering") [Probabilistic design](https://en.wikipedia.org/wiki/Probabilistic_design "Probabilistic design") [Process](https://en.wikipedia.org/wiki/Statistical_process_control "Statistical process control") / [quality control](https://en.wikipedia.org/wiki/Quality_control "Quality control") [Reliability](https://en.wikipedia.org/wiki/Reliability_engineering "Reliability engineering") [System identification](https://en.wikipedia.org/wiki/System_identification "System identification") | | [Social statistics](https://en.wikipedia.org/wiki/Social_statistics "Social statistics") | [Actuarial science](https://en.wikipedia.org/wiki/Actuarial_science "Actuarial science") [Census](https://en.wikipedia.org/wiki/Census "Census") [Crime statistics](https://en.wikipedia.org/wiki/Crime_statistics "Crime statistics") [Demography](https://en.wikipedia.org/wiki/Demographic_statistics "Demographic statistics") [Econometrics](https://en.wikipedia.org/wiki/Econometrics "Econometrics") [Jurimetrics](https://en.wikipedia.org/wiki/Jurimetrics "Jurimetrics") [National accounts](https://en.wikipedia.org/wiki/National_accounts "National accounts") [Official statistics](https://en.wikipedia.org/wiki/Official_statistics "Official statistics") [Population statistics](https://en.wikipedia.org/wiki/Population_statistics "Population statistics") [Psychometrics](https://en.wikipedia.org/wiki/Psychometrics "Psychometrics") | | [Spatial statistics](https://en.wikipedia.org/wiki/Spatial_analysis "Spatial analysis") | [Cartography](https://en.wikipedia.org/wiki/Cartography "Cartography") [Environmental statistics](https://en.wikipedia.org/wiki/Environmental_statistics "Environmental statistics") [Geographic information system](https://en.wikipedia.org/wiki/Geographic_information_system "Geographic information system") [Geostatistics](https://en.wikipedia.org/wiki/Geostatistics "Geostatistics") [Kriging](https://en.wikipedia.org/wiki/Kriging "Kriging") | | ![](https://upload.wikimedia.org/wikipedia/en/thumb/9/96/Symbol_category_class.svg/20px-Symbol_category_class.svg.png)**[Category](https://en.wikipedia.org/wiki/Category:Statistics "Category:Statistics")** **[![icon](https://upload.wikimedia.org/wikipedia/commons/thumb/3/3e/Nuvola_apps_edu_mathematics_blue-p.svg/40px-Nuvola_apps_edu_mathematics_blue-p.svg.png)](https://en.wikipedia.org/wiki/File:Nuvola_apps_edu_mathematics_blue-p.svg) [Mathematics portal](https://en.wikipedia.org/wiki/Portal:Mathematics "Portal:Mathematics")** [![](https://upload.wikimedia.org/wikipedia/en/thumb/4/4a/Commons-logo.svg/20px-Commons-logo.svg.png)](https://en.wikipedia.org/wiki/File:Commons-logo.svg "Commons page")**[Commons](https://commons.wikimedia.org/wiki/Category:Statistics "commons:Category:Statistics")** ![](https://upload.wikimedia.org/wikipedia/commons/thumb/3/37/People_icon.svg/20px-People_icon.svg.png) **[WikiProject](https://en.wikipedia.org/wiki/Wikipedia:WikiProject_Statistics "Wikipedia:WikiProject Statistics")** | | | [v](https://en.wikipedia.org/wiki/Template:Technical_analysis "Template:Technical analysis") [t](https://en.wikipedia.org/wiki/Template_talk:Technical_analysis "Template talk:Technical analysis") [e](https://en.wikipedia.org/wiki/Special:EditPage/Template:Technical_analysis "Special:EditPage/Template:Technical analysis")[Technical analysis](https://en.wikipedia.org/wiki/Technical_analysis "Technical analysis") | | |---|---| | Concepts | [Breakout](https://en.wikipedia.org/wiki/Breakout_\(technical_analysis\) "Breakout (technical analysis)") [Dead cat bounce](https://en.wikipedia.org/wiki/Dead_cat_bounce "Dead cat bounce") [Dow theory](https://en.wikipedia.org/wiki/Dow_theory "Dow theory") [Elliott wave principle](https://en.wikipedia.org/wiki/Elliott_wave_principle "Elliott wave principle") [Market trend](https://en.wikipedia.org/wiki/Market_trend "Market trend") | | Charts | [Candlestick](https://en.wikipedia.org/wiki/Candlestick_chart "Candlestick chart") [Renko](https://en.wikipedia.org/wiki/Renko_chart "Renko chart") [Kagi](https://en.wikipedia.org/wiki/Kagi_chart "Kagi chart") [Line](https://en.wikipedia.org/wiki/Line_chart "Line chart") [Open-high-low-close](https://en.wikipedia.org/wiki/Open-high-low-close_chart "Open-high-low-close chart") [Point and figure](https://en.wikipedia.org/wiki/Point_and_figure_chart "Point and figure chart") [Line break](https://en.wikipedia.org/wiki/Line_break_chart "Line break chart") | | Patterns | | | | | | [Chart](https://en.wikipedia.org/wiki/Chart_pattern "Chart pattern") | [Broadening top](https://en.wikipedia.org/wiki/Broadening_top "Broadening top") [Cup and handle](https://en.wikipedia.org/wiki/Cup_and_handle "Cup and handle") [Double top and double bottom](https://en.wikipedia.org/wiki/Double_top_and_double_bottom "Double top and double bottom") [Flag and pennant](https://en.wikipedia.org/wiki/Flag_and_pennant_patterns "Flag and pennant patterns") [Gap](https://en.wikipedia.org/wiki/Gap_\(chart_pattern\) "Gap (chart pattern)") [Head and shoulders](https://en.wikipedia.org/wiki/Head_and_shoulders_\(chart_pattern\) "Head and shoulders (chart pattern)") [Island reversal](https://en.wikipedia.org/wiki/Island_reversal "Island reversal") [Price channels](https://en.wikipedia.org/wiki/Price_channels "Price channels") [Triangle](https://en.wikipedia.org/wiki/Triangle_\(chart_pattern\) "Triangle (chart pattern)") [Triple top and triple bottom](https://en.wikipedia.org/wiki/Triple_top_and_triple_bottom "Triple top and triple bottom") [Wedge pattern](https://en.wikipedia.org/wiki/Wedge_pattern "Wedge pattern") | | [Candlestick](https://en.wikipedia.org/wiki/Candlestick_pattern "Candlestick pattern") | | | | | | [Simple](https://en.wikipedia.org/wiki/Candlestick_pattern#Simple_patterns "Candlestick pattern") | [Doji](https://en.wikipedia.org/wiki/Doji "Doji") | | [Complex](https://en.wikipedia.org/wiki/Candlestick_pattern#Complex_patterns "Candlestick pattern") | [Hikkake pattern](https://en.wikipedia.org/wiki/Hikkake_pattern "Hikkake pattern") [Morning star](https://en.wikipedia.org/wiki/Morning_star_\(candlestick_pattern\) "Morning star (candlestick pattern)") [Three black crows](https://en.wikipedia.org/wiki/Three_black_crows "Three black crows") [Three white soldiers](https://en.wikipedia.org/wiki/Three_white_soldiers "Three white soldiers") | | [Point and figure](https://en.wikipedia.org/wiki/Point_and_figure_chart "Point and figure chart") | [Bull trap](https://en.wikipedia.org/wiki/Bull_trap "Bull trap") [Bear trap](https://en.wikipedia.org/wiki/Bear_market "Bear market") | | [Indicators](https://en.wikipedia.org/wiki/Technical_indicator "Technical indicator") | | | | | | [Support & resistance](https://en.wikipedia.org/wiki/Support_and_resistance "Support and resistance") | [Fibonacci retracement](https://en.wikipedia.org/wiki/Fibonacci_retracement "Fibonacci retracement") [Pivot point](https://en.wikipedia.org/wiki/Pivot_point_\(technical_analysis\) "Pivot point (technical analysis)") (PP) | | [Trend](https://en.wikipedia.org/wiki/Market_trend "Market trend") | [Average directional index](https://en.wikipedia.org/wiki/Average_directional_movement_index "Average directional movement index") (A.D.X.) [Commodity channel index](https://en.wikipedia.org/wiki/Commodity_channel_index "Commodity channel index") (CCI) [Detrended price oscillator](https://en.wikipedia.org/wiki/Detrended_price_oscillator "Detrended price oscillator") (DPO) [Know sure thing oscillator](https://en.wikipedia.org/wiki/KST_oscillator "KST oscillator") (KST) [Ichimoku Kinkō Hyō](https://en.wikipedia.org/wiki/Ichimoku_Kink%C5%8D_Hy%C5%8D "Ichimoku Kinkō Hyō") [Moving average convergence/divergence](https://en.wikipedia.org/wiki/MACD "MACD") (MACD) [Mass index](https://en.wikipedia.org/wiki/Mass_index "Mass index") [Moving average]() (MA) [Parabolic SAR](https://en.wikipedia.org/wiki/Parabolic_SAR "Parabolic SAR") (SAR) [Smart money index](https://en.wikipedia.org/wiki/Smart_money_index "Smart money index") (SMI) [Trend line](https://en.wikipedia.org/wiki/Trend_line_\(technical_analysis\) "Trend line (technical analysis)") [Trix](https://en.wikipedia.org/wiki/Trix_\(technical_analysis\) "Trix (technical analysis)") [Vortex indicator](https://en.wikipedia.org/wiki/Vortex_indicator "Vortex indicator") (VI) | | [Momentum](https://en.wikipedia.org/wiki/Momentum_\(finance\) "Momentum (finance)") | [Money flow index](https://en.wikipedia.org/wiki/Money_flow_index "Money flow index") (MFI) [Relative strength index](https://en.wikipedia.org/wiki/Relative_strength_index "Relative strength index") (RSI) [Stochastic oscillator](https://en.wikipedia.org/wiki/Stochastic_oscillator "Stochastic oscillator") [True strength index](https://en.wikipedia.org/wiki/True_strength_index "True strength index") (TSI) [Ultimate oscillator](https://en.wikipedia.org/wiki/Ultimate_oscillator "Ultimate oscillator") [Williams %R](https://en.wikipedia.org/wiki/Williams_%25R "Williams %R") (%R) | | [Volume](https://en.wikipedia.org/wiki/Volume_\(finance\) "Volume (finance)") | [Accumulation/distribution line](https://en.wikipedia.org/wiki/Accumulation/distribution_index "Accumulation/distribution index") [Ease of movement](https://en.wikipedia.org/wiki/Ease_of_movement "Ease of movement") (EMV) [Force index](https://en.wikipedia.org/wiki/Force_index "Force index") (FI) [Negative volume index](https://en.wikipedia.org/wiki/Negative_volume_index "Negative volume index") (NVI) [On-balance volume](https://en.wikipedia.org/wiki/On-balance_volume "On-balance volume") (OBV) [Put/call ratio](https://en.wikipedia.org/wiki/Put/call_ratio "Put/call ratio") (PCR) [Volume–price trend](https://en.wikipedia.org/wiki/Volume%E2%80%93price_trend "Volume–price trend") (VPT) | | [Volatility](https://en.wikipedia.org/wiki/Volatility_\(finance\) "Volatility (finance)") | [Average true range](https://en.wikipedia.org/wiki/Average_true_range "Average true range") (ATR) [Bollinger Bands](https://en.wikipedia.org/wiki/Bollinger_Bands "Bollinger Bands") (BB) [Donchian channel](https://en.wikipedia.org/wiki/Donchian_channel "Donchian channel") [Keltner channel](https://en.wikipedia.org/wiki/Keltner_channel "Keltner channel") [CBOE Market Volatility Index](https://en.wikipedia.org/wiki/VIX "VIX") (VIX) [Standard deviation](https://en.wikipedia.org/wiki/Standard_deviation "Standard deviation") (σ) | | [Breadth](https://en.wikipedia.org/wiki/Breadth_of_market "Breadth of market") | [Advance–decline line](https://en.wikipedia.org/wiki/Advance%E2%80%93decline_line "Advance–decline line") (ADL) [Arms index](https://en.wikipedia.org/wiki/TRIN_\(finance\) "TRIN (finance)") (TRIN) [McClellan oscillator](https://en.wikipedia.org/wiki/McClellan_oscillator "McClellan oscillator") | | Other | [Coppock curve](https://en.wikipedia.org/wiki/Coppock_curve "Coppock curve") [Ulcer index](https://en.wikipedia.org/wiki/Ulcer_index "Ulcer index") | | Analysts | [John Bollinger](https://en.wikipedia.org/wiki/John_Bollinger "John Bollinger") [Ned Davis](https://en.wikipedia.org/wiki/Ned_Davis_\(analyst\) "Ned Davis (analyst)") [Charles Dow](https://en.wikipedia.org/wiki/Charles_Dow "Charles Dow") [Ralph Nelson Elliott](https://en.wikipedia.org/wiki/Ralph_Nelson_Elliott "Ralph Nelson Elliott") [Bob Farrell](https://en.wikipedia.org/wiki/Robert_Farrell_\(technical_analyst\) "Robert Farrell (technical analyst)") [John Murphy](https://en.wikipedia.org/wiki/John_Murphy_\(technical_analyst\) "John Murphy (technical analyst)") [Mark Hulbert](https://en.wikipedia.org/wiki/Mark_Hulbert "Mark Hulbert") | | [v](https://en.wikipedia.org/wiki/Template:Quantitative_forecasting_methods "Template:Quantitative forecasting methods") [t](https://en.wikipedia.org/wiki/Template_talk:Quantitative_forecasting_methods "Template talk:Quantitative forecasting methods") [e](https://en.wikipedia.org/wiki/Special:EditPage/Template:Quantitative_forecasting_methods "Special:EditPage/Template:Quantitative forecasting methods")Quantitative [forecasting](https://en.wikipedia.org/wiki/Forecasting "Forecasting") methods | |---| | Historical data forecasts [Moving average]() [Exponential smoothing](https://en.wikipedia.org/wiki/Exponential_smoothing "Exponential smoothing") [Trend analysis](https://en.wikipedia.org/wiki/Trend_analysis "Trend analysis") [Decomposition of time series](https://en.wikipedia.org/wiki/Decomposition_of_time_series "Decomposition of time series") [Naïve approach](https://en.wikipedia.org/wiki/Forecasting#Na.C3.AFve_approach "Forecasting") | | Associative (causal) forecasts [Moving average]() [Simple linear regression](https://en.wikipedia.org/wiki/Simple_linear_regression "Simple linear regression") [Regression analysis](https://en.wikipedia.org/wiki/Regression_analysis "Regression analysis") [Econometric model](https://en.wikipedia.org/wiki/Econometric_model "Econometric model") | ![](https://en.wikipedia.org/wiki/Special:CentralAutoLogin/start?useformat=desktop&type=1x1&usesul3=1) Retrieved from "<https://en.wikipedia.org/w/index.php?title=Moving_average&oldid=1332517228>" [Categories](https://en.wikipedia.org/wiki/Help:Category "Help:Category"): - [Statistical charts and diagrams](https://en.wikipedia.org/wiki/Category:Statistical_charts_and_diagrams "Category:Statistical charts and diagrams") - [Time series](https://en.wikipedia.org/wiki/Category:Time_series "Category:Time series") - [Chart overlays](https://en.wikipedia.org/wiki/Category:Chart_overlays "Category:Chart overlays") - [Technical analysis](https://en.wikipedia.org/wiki/Category:Technical_analysis "Category:Technical analysis") Hidden categories: - [Articles with short description](https://en.wikipedia.org/wiki/Category:Articles_with_short_description "Category:Articles with short description") - [Short description matches Wikidata](https://en.wikipedia.org/wiki/Category:Short_description_matches_Wikidata "Category:Short description matches Wikidata") - [All articles with unsourced statements](https://en.wikipedia.org/wiki/Category:All_articles_with_unsourced_statements "Category:All articles with unsourced statements") - [Articles with unsourced statements from February 2018](https://en.wikipedia.org/wiki/Category:Articles_with_unsourced_statements_from_February_2018 "Category:Articles with unsourced statements from February 2018") - [Articles with unsourced statements from August 2025](https://en.wikipedia.org/wiki/Category:Articles_with_unsourced_statements_from_August_2025 "Category:Articles with unsourced statements from August 2025") - [Commons category link is on Wikidata](https://en.wikipedia.org/wiki/Category:Commons_category_link_is_on_Wikidata "Category:Commons category link is on Wikidata") - This page was last edited on 12 January 2026, at 06:58 (UTC). - Text is available under the [Creative Commons Attribution-ShareAlike 4.0 License](https://en.wikipedia.org/wiki/Wikipedia:Text_of_the_Creative_Commons_Attribution-ShareAlike_4.0_International_License "Wikipedia:Text of the Creative Commons Attribution-ShareAlike 4.0 International License"); additional terms may apply. By using this site, you agree to the [Terms of Use](https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Terms_of_Use "foundation:Special:MyLanguage/Policy:Terms of Use") and [Privacy Policy](https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy "foundation:Special:MyLanguage/Policy:Privacy policy"). Wikipedia® is a registered trademark of the [Wikimedia Foundation, Inc.](https://wikimediafoundation.org/), a non-profit organization. - [Privacy policy](https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Privacy_policy) - [About Wikipedia](https://en.wikipedia.org/wiki/Wikipedia:About) - [Disclaimers](https://en.wikipedia.org/wiki/Wikipedia:General_disclaimer) - [Contact Wikipedia](https://en.wikipedia.org/wiki/Wikipedia:Contact_us) - [Legal & safety contacts](https://foundation.wikimedia.org/wiki/Special:MyLanguage/Legal:Wikimedia_Foundation_Legal_and_Safety_Contact_Information) - [Code of Conduct](https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Universal_Code_of_Conduct) - [Developers](https://developer.wikimedia.org/) - [Statistics](https://stats.wikimedia.org/#/en.wikipedia.org) - [Cookie statement](https://foundation.wikimedia.org/wiki/Special:MyLanguage/Policy:Cookie_statement) - [Mobile view](https://en.wikipedia.org/w/index.php?title=Moving_average&mobileaction=toggle_view_mobile) - [![Wikimedia Foundation](https://en.wikipedia.org/static/images/footer/wikimedia.svg)](https://www.wikimedia.org/) - [![Powered by MediaWiki](https://en.wikipedia.org/w/resources/assets/mediawiki_compact.svg)](https://www.mediawiki.org/) Search Toggle the table of contents Moving average 27 languages [Add topic](https://en.wikipedia.org/wiki/Moving_average)
Readable Markdown
From Wikipedia, the free encyclopedia [![](https://upload.wikimedia.org/wikipedia/commons/thumb/6/6d/Lissage_sinus_bruite_moyenne_glissante.svg/250px-Lissage_sinus_bruite_moyenne_glissante.svg.png)](https://en.wikipedia.org/wiki/File:Lissage_sinus_bruite_moyenne_glissante.svg) Smoothing of a noisy sine (blue curve) with a moving average (red curve). In [statistics](https://en.wikipedia.org/wiki/Statistics "Statistics"), a **moving average** (**rolling average** or **running average** or **moving mean**[\[1\]](https://en.wikipedia.org/wiki/Moving_average#cite_note-1) or **rolling mean**) is a calculation to analyze data points by creating a series of [averages](https://en.wikipedia.org/wiki/Average "Average") of different selections of the full data set. Variations include: [simple](https://en.wikipedia.org/wiki/Moving_average#Simple_moving_average), [cumulative](https://en.wikipedia.org/wiki/Moving_average#Cumulative_average), or [weighted](https://en.wikipedia.org/wiki/Moving_average#Weighted_moving_average) forms. Mathematically, a moving average is a type of [convolution](https://en.wikipedia.org/wiki/Convolution "Convolution"). Thus in [signal processing](https://en.wikipedia.org/wiki/Signal_processing "Signal processing") it is viewed as a [low-pass](https://en.wikipedia.org/wiki/Low-pass_filter "Low-pass filter") [finite impulse response](https://en.wikipedia.org/wiki/Finite_impulse_response "Finite impulse response") filter. Because the [boxcar function](https://en.wikipedia.org/wiki/Boxcar_function "Boxcar function") outlines its filter coefficients, it is called a **boxcar filter**. It is sometimes followed by [downsampling](https://en.wikipedia.org/wiki/Downsampling_\(signal_processing\) "Downsampling (signal processing)"). Given a series of numbers and a fixed subset size, the first element of the moving average is obtained by taking the average of the initial fixed subset of the number series. Then the subset is modified by "shifting forward"; that is, excluding the first number of the series and including the next value in the series. A moving average is commonly used with [time series](https://en.wikipedia.org/wiki/Time_series "Time series") data to smooth out short-term fluctuations and highlight longer-term trends or cycles - in this case the calculation is sometimes called a **time average**. The threshold between short-term and long-term depends on the application, and the parameters of the moving average will be set accordingly. It is also used in [economics](https://en.wikipedia.org/wiki/Economics "Economics") to examine gross domestic product, employment or other macroeconomic time series. When used with non-time series data, a moving average filters higher frequency components without any specific connection to time, although typically some kind of ordering is implied. Viewed simplistically it can be regarded as smoothing the data. The technique of moving averages was invented by the [Bank of England](https://en.wikipedia.org/wiki/Bank_of_England "Bank of England") in 1833 to conceal the state of its bullion reserves.[\[2\]](https://en.wikipedia.org/wiki/Moving_average#cite_note-2) ## Simple moving average \[[edit](https://en.wikipedia.org/w/index.php?title=Moving_average&action=edit&section=2 "Edit section: Simple moving average")\] [![](https://upload.wikimedia.org/wikipedia/commons/thumb/9/93/Moving_Average_Types_comparison_-_Simple_and_Exponential.png/250px-Moving_Average_Types_comparison_-_Simple_and_Exponential.png)](https://en.wikipedia.org/wiki/File:Moving_Average_Types_comparison_-_Simple_and_Exponential.png) In financial applications a **simple moving average** (**SMA**) is the unweighted [mean](https://en.wikipedia.org/wiki/Arithmetic_mean "Arithmetic mean") of the previous ![{\\displaystyle k}](https://wikimedia.org/api/rest_v1/media/math/render/svg/c3c9a2c7b599b37105512c5d570edc034056dd40) data-points. However, in science and engineering, the mean is normally taken from an equal number of data on either side of a central value. This ensures that variations in the mean are aligned with the variations in the data rather than being shifted in time. An example of a simple equally weighted running mean is the mean over the last ![{\\displaystyle k}](https://wikimedia.org/api/rest_v1/media/math/render/svg/c3c9a2c7b599b37105512c5d570edc034056dd40) entries of a data-set containing ![{\\displaystyle n}](https://wikimedia.org/api/rest_v1/media/math/render/svg/a601995d55609f2d9f5e233e36fbe9ea26011b3b) entries. Let those data-points be ![{\\displaystyle p\_{1},p\_{2},\\dots ,p\_{n}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/69d4afc30479593f8b2dd046bf3cb3038181e32a). This could be closing prices of a stock. The mean over the last ![{\\displaystyle k}](https://wikimedia.org/api/rest_v1/media/math/render/svg/c3c9a2c7b599b37105512c5d570edc034056dd40) data-points (days in this example) is denoted as ![{\\displaystyle {\\textit {SMA}}\_{k}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/55c5a6c3df171f0fe3d369ac1fa437ab2e93268f) and calculated as: ![{\\displaystyle {\\begin{aligned}{\\textit {SMA}}\_{k}&={\\frac {p\_{n-k+1}+p\_{n-k+2}+\\cdots +p\_{n}}{k}}\\\\&={\\frac {1}{k}}\\sum \_{i=n-k+1}^{n}p\_{i}\\end{aligned}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/98e0c2d28bd25794ca4cac22bbd381fc84f2210d) When calculating the next mean ![{\\displaystyle {\\textit {SMA}}\_{k,{\\text{next}}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/c4e2ab5ed407abf2ded17f9ad461163bc3cccc3b) with the same sampling width ![{\\displaystyle k}](https://wikimedia.org/api/rest_v1/media/math/render/svg/c3c9a2c7b599b37105512c5d570edc034056dd40) the range from ![{\\displaystyle n-k+2}](https://wikimedia.org/api/rest_v1/media/math/render/svg/148fed984f3685c93d652b2d38983af41fc66e2e) to ![{\\displaystyle n+1}](https://wikimedia.org/api/rest_v1/media/math/render/svg/2a135e65a42f2d73cccbfc4569523996ca0036f1) is considered. A new value ![{\\displaystyle p\_{n+1}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/50eddadedad57fa1d2648327f2bb9b67c50975b0) comes into the sum and the oldest value ![{\\displaystyle p\_{n-k+1}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/16bebff1f65e503ea4546c80a79defc9f593ec97) drops out. This simplifies the calculations by reusing the previous mean ![{\\displaystyle {\\textit {SMA}}\_{k,{\\text{prev}}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/242f5ca68177bb35beaa354d790802d4492eccbd). ![{\\displaystyle {\\begin{aligned}{\\textit {SMA}}\_{k,{\\text{next}}}&={\\frac {1}{k}}\\sum \_{i=n-k+2}^{n+1}p\_{i}\\\\&={\\frac {1}{k}}{\\Big (}\\underbrace {p\_{n-k+2}+p\_{n-k+3}+\\dots +p\_{n}+p\_{n+1}} \_{\\sum \_{i=n-k+2}^{n+1}p\_{i}}+\\underbrace {p\_{n-k+1}-p\_{n-k+1}} \_{=0}{\\Big )}\\\\&=\\underbrace {{\\frac {1}{k}}{\\Big (}p\_{n-k+1}+p\_{n-k+2}+\\dots +p\_{n}{\\Big )}} \_{={\\textit {SMA}}\_{k,{\\text{prev}}}}-{\\frac {p\_{n-k+1}}{k}}+{\\frac {p\_{n+1}}{k}}\\\\&={\\textit {SMA}}\_{k,{\\text{prev}}}+{\\frac {1}{k}}{\\Big (}p\_{n+1}-p\_{n-k+1}{\\Big )}\\end{aligned}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/32c76c2a9899a7a1c9ca5055eee5dc57aca71003) This means that the moving average filter can be computed quite cheaply on real time data with a FIFO / [circular buffer](https://en.wikipedia.org/wiki/Circular_buffer "Circular buffer") and only 3 arithmetic steps. During the initial filling of the FIFO / circular buffer the sampling window is equal to the data-set size thus ![{\\displaystyle k=n}](https://wikimedia.org/api/rest_v1/media/math/render/svg/c4b8cc6fcba0c0b24656b0fb33414d2e6cffb83c) and the average calculation is performed as a [cumulative moving average](https://en.wikipedia.org/wiki/Moving_average#Cumulative_average). The period selected (![{\\displaystyle k}](https://wikimedia.org/api/rest_v1/media/math/render/svg/c3c9a2c7b599b37105512c5d570edc034056dd40)) depends on the type of movement of interest, such as short, intermediate, or long-term. If the data used are not centered around the mean, a simple moving average lags behind the latest datum by half the sample width. An SMA can also be disproportionately influenced by old data dropping out or new data coming in. One characteristic of the SMA is that if the data has a periodic fluctuation, then applying an SMA of that period will eliminate that variation (the average always containing one complete cycle). But a perfectly regular cycle is rarely encountered.[\[3\]](https://en.wikipedia.org/wiki/Moving_average#cite_note-3) For a number of applications, it is advantageous to avoid the shifting induced by using only "past" data. Hence a **central moving average** can be computed, using data equally spaced on either side of the point in the series where the mean is calculated.[\[4\]](https://en.wikipedia.org/wiki/Moving_average#cite_note-4) This requires using an odd number of points in the sample window. A major drawback of the SMA is that it lets through a significant amount of the signal shorter than the window length. This can lead to unexpected artifacts, such as peaks in the smoothed result appearing where there were troughs in the data. It also leads to the result being less smooth than expected since some of the higher frequencies are not properly removed. Its frequency response is a type of low-pass filter called [sinc-in-frequency](https://en.wikipedia.org/wiki/Sinc_filter#Frequency-domain_sinc "Sinc filter"). ## Continuous moving average \[[edit](https://en.wikipedia.org/w/index.php?title=Moving_average&action=edit&section=3 "Edit section: Continuous moving average")\] The continuous moving average of an integrable function ![{\\displaystyle f:\\mathbb {R} \\rightarrow \\mathbb {R} }](https://wikimedia.org/api/rest_v1/media/math/render/svg/85e6e186aabef9e51814bbce62e625dc67e825f2) is defined via integration as: ![{\\displaystyle {\\begin{array}{rl}M\_{f,\\varepsilon }:\\mathbb {R} &\\rightarrow \\mathbb {R} \\\\x&\\mapsto \\displaystyle {\\frac {1}{2\\,\\varepsilon }}\\int \_{x-\\varepsilon }^{x+\\varepsilon }f(t)\\,dt\\end{array}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/ed0d8f2198ff820ff82c5c88487319e3761fcf0f) where the ![{\\displaystyle \\varepsilon }](https://wikimedia.org/api/rest_v1/media/math/render/svg/a30c89172e5b88edbd45d3e2772c7f5e562e5173) environment ![{\\displaystyle \[x-\\varepsilon ,x+\\varepsilon \]}](https://wikimedia.org/api/rest_v1/media/math/render/svg/707696f3f51603bfa830b1f6d8512cb50f6899e5) around ![{\\displaystyle x}](https://wikimedia.org/api/rest_v1/media/math/render/svg/87f9e315fd7e2ba406057a97300593c4802b53e4) defines the intensity of smoothing of the graph of the integrable function. A larger ![{\\displaystyle \\varepsilon \>0}](https://wikimedia.org/api/rest_v1/media/math/render/svg/e04ec3670b50384a3ce48aca42e7cc5131a06b12) smooths the source graph of the function (blue) ![{\\displaystyle f}](https://wikimedia.org/api/rest_v1/media/math/render/svg/132e57acb643253e7810ee9702d9581f159a1c61) more. The animations below show the moving average as animation in dependency of different values for ![{\\displaystyle \\varepsilon \>0}](https://wikimedia.org/api/rest_v1/media/math/render/svg/e04ec3670b50384a3ce48aca42e7cc5131a06b12). The fraction ![{\\displaystyle {\\frac {1}{2\\,\\varepsilon }}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/246b668de4fb8d5ea9d429e9890b52e0fbda2f61) is used, because ![{\\displaystyle 2\\,\\varepsilon }](https://wikimedia.org/api/rest_v1/media/math/render/svg/12b0ea1c487dc6a234abf6cc1ca036a2bd270f98) is the interval width for the integral. Naturally, ![{\\displaystyle \\lim \_{\\varepsilon \\to 0}M\_{f,\\ \\varepsilon }=f}](https://wikimedia.org/api/rest_v1/media/math/render/svg/1765767fb36a5ac894c82037c756e1080ad35d06) by [fundamental theorem of calculus](https://en.wikipedia.org/wiki/Fundamental_theorem_of_calculus "Fundamental theorem of calculus") and [L'Hôpital's rule](https://en.wikipedia.org/wiki/L%27H%C3%B4pital%27s_rule "L'Hôpital's rule"). - [![Continuous moving average sine and polynom - visualization of the smoothing with a small interval for integration](https://upload.wikimedia.org/wikipedia/commons/thumb/3/37/Moving_average_sin_polynom_mov_av.gif/250px-Moving_average_sin_polynom_mov_av.gif)](https://en.wikipedia.org/wiki/File:Moving_average_sin_polynom_mov_av.gif "Continuous moving average sine and polynom - visualization of the smoothing with a small interval for integration") Continuous moving average sine and polynom - visualization of the smoothing with a small interval for integration - [![Continuous moving average sine and polynom - visualization of the smoothing with a larger interval for integration](https://upload.wikimedia.org/wikipedia/commons/thumb/4/4d/Moving_average_sine_and_polynom_with_a_larger_interval.gif/250px-Moving_average_sine_and_polynom_with_a_larger_interval.gif)](https://en.wikipedia.org/wiki/File:Moving_average_sine_and_polynom_with_a_larger_interval.gif "Continuous moving average sine and polynom - visualization of the smoothing with a larger interval for integration") Continuous moving average sine and polynom - visualization of the smoothing with a larger interval for integration - [![Animation showing the impact of interval width and smoothing by moving average.](https://upload.wikimedia.org/wikipedia/commons/thumb/5/5c/Moving_average_sine_and_polynom_-_visualization_of_interval_width.gif/250px-Moving_average_sine_and_polynom_-_visualization_of_interval_width.gif)](https://en.wikipedia.org/wiki/File:Moving_average_sine_and_polynom_-_visualization_of_interval_width.gif "Animation showing the impact of interval width and smoothing by moving average.") Animation showing the impact of interval width and smoothing by moving average. In a **cumulative average** (**CA**), the data arrive in an ordered datum stream, and the user would like to get the average of all of the data up until the current datum. For example, an investor may want the average price of all of the stock transactions for a particular stock up until the current time. As each new transaction occurs, the average price at the time of the transaction can be calculated for all of the transactions up to that point using the cumulative average, typically an equally weighted [average](https://en.wikipedia.org/wiki/Average "Average") of the sequence of *n* values ![{\\displaystyle x\_{1}.\\ldots ,x\_{n}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/d0f5d7d42eb3825e0c04f90d638c4f26acd2dd67) up to the current time: ![{\\displaystyle {\\textit {CA}}\_{n}={{x\_{1}+\\cdots +x\_{n}} \\over n}\\,.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/91507f689b79243c79028d86b4af0dc0f8776b66) The brute-force method to calculate this would be to store all of the data and calculate the sum and divide by the number of points every time a new datum arrived. However, it is possible to simply update cumulative average as a new value, ![{\\displaystyle x\_{n+1}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/6e76103271a353337f6b3c697209cb19359807df) becomes available, using the formula ![{\\displaystyle {\\textit {CA}}\_{n+1}={{x\_{n+1}+n\\cdot {\\textit {CA}}\_{n}} \\over {n+1}}.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/0c9c0947a999bec96f1d85f05ea66359ea7f9863) Thus the current cumulative average for a new datum is equal to the previous cumulative average, times *n*, plus the latest datum, all divided by the number of points received so far, *n*\+1. When all of the data arrive (*n* = *N*), then the cumulative average will equal the final average. It is also possible to store a running total of the data as well as the number of points and dividing the total by the number of points to get the CA each time a new datum arrives. The derivation of the cumulative average formula is straightforward. Using ![{\\displaystyle x\_{1}+\\cdots +x\_{n}=n\\cdot {\\textit {CA}}\_{n}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/7ae385bc53e8b8499e6f021daab25b4cb8ad4174) and similarly for *n* + 1, it is seen that ![{\\displaystyle x\_{n+1}=(x\_{1}+\\cdots +x\_{n+1})-(x\_{1}+\\cdots +x\_{n})}](https://wikimedia.org/api/rest_v1/media/math/render/svg/d21a0f785513e0187aa61a9fcce3ff20f332161d) ![{\\displaystyle x\_{n+1}=(n+1)\\cdot {\\textit {CA}}\_{n+1}-n\\cdot {\\textit {CA}}\_{n}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/67b074af685a59a1153bc44d83a78e25e45be94a) Solving this equation for ![{\\displaystyle {\\textit {CA}}\_{n+1}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/b98c0092f626fc5e18049c1bbcf795059723b1d2) results in ![{\\displaystyle {\\begin{aligned}{\\textit {CA}}\_{n+1}&={x\_{n+1}+n\\cdot {\\textit {CA}}\_{n} \\over {n+1}}\\\\\[6pt\]&={x\_{n+1}+(n+1-1)\\cdot {\\textit {CA}}\_{n} \\over {n+1}}\\\\\[6pt\]&={(n+1)\\cdot {\\textit {CA}}\_{n}+x\_{n+1}-{\\textit {CA}}\_{n} \\over {n+1}}\\\\\[6pt\]&={{\\textit {CA}}\_{n}}+{{x\_{n+1}-{\\textit {CA}}\_{n}} \\over {n+1}}\\end{aligned}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/eab3ed436a35de9f7238d74520b1c16f0ad3c224) ## Weighted moving average \[[edit](https://en.wikipedia.org/w/index.php?title=Moving_average&action=edit&section=5 "Edit section: Weighted moving average")\] A weighted average is an average that has multiplying factors to give different weights to data at different positions in the sample window. Mathematically, the weighted moving average is the [convolution](https://en.wikipedia.org/wiki/Convolution "Convolution") of the data with a fixed weighting function. One application is removing [pixelization](https://en.wikipedia.org/wiki/Pixelization "Pixelization") from a digital graphical image. This is also known as [Anti-aliasing](https://en.wikipedia.org/wiki/Anti-aliasing "Anti-aliasing") \[*[citation needed](https://en.wikipedia.org/wiki/Wikipedia:Citation_needed "Wikipedia:Citation needed")*\] In the financial field, and more specifically in the analyses of financial data, a **weighted moving average** (WMA) has the specific meaning of weights that decrease in arithmetical progression.[\[5\]](https://en.wikipedia.org/wiki/Moving_average#cite_note-5) In an *n*\-day WMA the latest day has weight *n*, the second latest ![{\\displaystyle n-1}](https://wikimedia.org/api/rest_v1/media/math/render/svg/fbd0b0f32b28f51962943ee9ede4fb34198a2521), etc., down to one. ![{\\displaystyle {\\text{WMA}}\_{M}={np\_{M}+(n-1)p\_{M-1}+\\cdots +2p\_{((M-n)+2)}+p\_{((M-n)+1)} \\over n+(n-1)+\\cdots +2+1}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/7780333af18da7e27a1186a3d566e28da21b2840) [![](https://upload.wikimedia.org/wikipedia/commons/thumb/7/78/Weighted_moving_average_weights_N%3D15.svg/250px-Weighted_moving_average_weights_N%3D15.svg.png)](https://en.wikipedia.org/wiki/File:Weighted_moving_average_weights_N%3D15.svg) WMA weights *n* = 15 The denominator is a [triangle number](https://en.wikipedia.org/wiki/Triangle_number "Triangle number") equal to ![{\\textstyle {\\frac {n(n+1)}{2}}.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/b1af8c9d0cf9c1347c5149810b72a4b3aa807cd5) In the more general case the denominator will always be the sum of the individual weights. When calculating the WMA across successive values, the difference between the numerators of ![{\\displaystyle {\\text{WMA}}\_{M+1}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/0e3e4c31526380ec9d380f6f3fc0ce6b0da80601) and ![{\\displaystyle {\\text{WMA}}\_{M}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/3b5be3609fe0ceb37a60d6a129aa29ebef7ae772) is ![{\\displaystyle np\_{M+1}-p\_{M}-\\dots -p\_{M-n+1}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/8585100ebaaa360e885f752388f6d370243b5a6e). If we denote the sum ![{\\displaystyle p\_{M}+\\dots +p\_{M-n+1}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/58c49be7e51bbba3b6429c4d6404ac7c48c03759) by ![{\\displaystyle {\\text{Total}}\_{M}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/4cc0e5078472a69e40521d8e65fd4ebbea1fc846), then ![{\\displaystyle {\\begin{aligned}{\\text{Total}}\_{M+1}&={\\text{Total}}\_{M}+p\_{M+1}-p\_{M-n+1}\\\\\[3pt\]{\\text{Numerator}}\_{M+1}&={\\text{Numerator}}\_{M}+np\_{M+1}-{\\text{Total}}\_{M}\\\\\[3pt\]{\\text{WMA}}\_{M+1}&={{\\text{Numerator}}\_{M+1} \\over n+(n-1)+\\cdots +2+1}\\end{aligned}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/8ff41461f4d60351300c4ef7cee5f75821fed5ab) The graph at the right shows how the weights decrease, from highest weight for the most recent data, down to zero. It can be compared to the weights in the exponential moving average which follows. ## Exponential moving average \[[edit](https://en.wikipedia.org/w/index.php?title=Moving_average&action=edit&section=6 "Edit section: Exponential moving average")\] An **exponential moving average (EMA)**, also known as an **exponentially weighted moving average (EWMA)**,[\[6\]](https://en.wikipedia.org/wiki/Moving_average#cite_note-6) is a first-order [infinite impulse response](https://en.wikipedia.org/wiki/Infinite_impulse_response "Infinite impulse response") filter that applies weighting factors which decrease [exponentially](https://en.wikipedia.org/wiki/Exponential_decay "Exponential decay"). The weighting for each older [datum](https://en.wikipedia.org/wiki/Data "Data") decreases exponentially, never reaching zero. This formulation is according to Hunter (1986).[\[7\]](https://en.wikipedia.org/wiki/Moving_average#cite_note-7) There is also a multivariate implementation of EWMA, known as MEWMA.[\[8\]](https://en.wikipedia.org/wiki/Moving_average#cite_note-8) Other weighting systems are used occasionally – for example, in share trading a **volume weighting** will weight each time period in proportion to its trading volume. A further weighting, used by actuaries, is Spencer's 15-Point Moving Average[\[9\]](https://en.wikipedia.org/wiki/Moving_average#cite_note-9) (a central moving average). Its symmetric weight coefficients are \[−3, −6, −5, 3, 21, 46, 67, 74, 67, 46, 21, 3, −5, −6, −3\], which factors as ⁠\[1, 1, 1, 1\]×\[1, 1, 1, 1\]×\[1, 1, 1, 1, 1\]×\[−3, 3, 4, 3, −3\]/320⁠ and leaves samples of any quadratic or cubic polynomial unchanged.[\[10\]](https://en.wikipedia.org/wiki/Moving_average#cite_note-10)[\[11\]](https://en.wikipedia.org/wiki/Moving_average#cite_note-11) Outside the world of finance, weighted running means have many forms and applications. Each weighting function or "kernel" has its own characteristics. In engineering and science the frequency and phase response of the filter is often of primary importance in understanding the desired and undesired distortions that a particular filter will apply to the data. A mean does not just "smooth" the data. A mean is a form of low-pass filter. The effects of the particular filter used should be understood in order to make an appropriate choice.\[*[citation needed](https://en.wikipedia.org/wiki/Wikipedia:Citation_needed "Wikipedia:Citation needed")*\] From a statistical point of view, the moving average, when used to estimate the underlying trend in a time series, is susceptible to rare events such as rapid shocks or other anomalies. A more robust estimate of the trend is the **simple moving median** over *n* time points: ![{\\displaystyle {\\widetilde {p}}\_{\\text{SM}}={\\text{Median}}(p\_{M},p\_{M-1},\\ldots ,p\_{M-n+1})}](https://wikimedia.org/api/rest_v1/media/math/render/svg/929afc05575be455d3571b94a39d824330d8d8db) where the [median](https://en.wikipedia.org/wiki/Median "Median") is found by, for example, sorting the values inside the brackets and finding the value in the middle. For larger values of *n*, the median can be efficiently computed by updating an [indexable skiplist](https://en.wikipedia.org/wiki/Skip_list#Indexable_skiplist "Skip list").[\[12\]](https://en.wikipedia.org/wiki/Moving_average#cite_note-12) Statistically, the moving average is optimal for recovering the underlying trend of the time series when the fluctuations about the trend are [normally distributed](https://en.wikipedia.org/wiki/Normal_distribution "Normal distribution"). However, the normal distribution does not place high probability on very large deviations from the trend which explains why such deviations will have a disproportionately large effect on the trend estimate. It can be shown that if the fluctuations are instead assumed to be [Laplace distributed](https://en.wikipedia.org/wiki/Laplace_distribution "Laplace distribution"), then the moving median is statistically optimal.[\[13\]](https://en.wikipedia.org/wiki/Moving_average#cite_note-13) For a given variance, the Laplace distribution places higher probability on rare events than does the normal, which explains why the moving median tolerates shocks better than the moving mean. When the simple moving median above is central, the smoothing is identical to the [median filter](https://en.wikipedia.org/wiki/Median_filter "Median filter") which has applications in, for example, image signal processing. The Moving Median is a more robust alternative to the Moving Average when it comes to estimating the underlying trend in a time series. While the Moving Average is optimal for recovering the trend if the fluctuations around the trend are normally distributed, it is susceptible to the impact of rare events such as rapid shocks or anomalies. In contrast, the Moving Median, which is found by sorting the values inside the time window and finding the value in the middle, is more resistant to the impact of such rare events. This is because, for a given variance, the Laplace distribution, which the Moving Median assumes, places higher probability on rare events than the normal distribution that the Moving Average assumes. As a result, the Moving Median provides a more reliable and stable estimate of the underlying trend even when the time series is affected by large deviations from the trend. Additionally, the Moving Median smoothing is identical to the Median Filter, which has various applications in image signal processing. ## Moving average regression model \[[edit](https://en.wikipedia.org/w/index.php?title=Moving_average&action=edit&section=9 "Edit section: Moving average regression model")\] In a [moving average regression model](https://en.wikipedia.org/wiki/Moving_average_model "Moving average model"), a variable of interest is assumed to be a weighted moving average of unobserved independent error terms; the weights in the moving average are parameters to be estimated. Those two concepts are often confused due to their name, but while they share many similarities, they represent distinct methods and are used in very different contexts. - [Exponential smoothing](https://en.wikipedia.org/wiki/Exponential_smoothing "Exponential smoothing") - [Local regression](https://en.wikipedia.org/wiki/Local_regression "Local regression") (LOESS and LOWESS) - [Kernel smoothing](https://en.wikipedia.org/wiki/Kernel_smoothing "Kernel smoothing") - [Moving average convergence/divergence indicator](https://en.wikipedia.org/wiki/MACD "MACD") - [Martingale (probability theory)](https://en.wikipedia.org/wiki/Martingale_\(probability_theory\) "Martingale (probability theory)") - [Moving average crossover](https://en.wikipedia.org/wiki/Moving_average_crossover "Moving average crossover") - [Moving least squares](https://en.wikipedia.org/wiki/Moving_least_squares "Moving least squares") - [Rising moving average](https://en.wikipedia.org/wiki/Rising_moving_average "Rising moving average") - [Rolling hash](https://en.wikipedia.org/wiki/Rolling_hash "Rolling hash") - [Running total](https://en.wikipedia.org/wiki/Running_total "Running total") - [Savitzky–Golay filter](https://en.wikipedia.org/wiki/Savitzky%E2%80%93Golay_filter "Savitzky–Golay filter") - [Window function](https://en.wikipedia.org/wiki/Window_function "Window function") - [Zero lag exponential moving average](https://en.wikipedia.org/wiki/Zero_lag_exponential_moving_average "Zero lag exponential moving average") 1. **[^](https://en.wikipedia.org/wiki/Moving_average#cite_ref-1)** [Hydrologic Variability of the Cosumnes River Floodplain](http://www.waterboards.ca.gov/waterrights/water_issues/programs/bay_delta/docs/cmnt091412/sldmwa/booth_et_al_2006.pdf) (Booth et al., San Francisco Estuary and Watershed Science, Volume 4, Issue 2, 2006) 2. **[^](https://en.wikipedia.org/wiki/Moving_average#cite_ref-2)** Klein, Judy L. (1997-10-28). *Statistical Visions in Time*. [Cambridge University Press](https://en.wikipedia.org/wiki/Cambridge_University_Press "Cambridge University Press"). p. 88. [ISBN](https://en.wikipedia.org/wiki/ISBN_\(identifier\) "ISBN (identifier)") [9780521420464](https://en.wikipedia.org/wiki/Special:BookSources/9780521420464 "Special:BookSources/9780521420464") . 3. **[^](https://en.wikipedia.org/wiki/Moving_average#cite_ref-3)** *Statistical Analysis*, Ya-lun Chou, Holt International, 1975, [ISBN](https://en.wikipedia.org/wiki/ISBN_\(identifier\) "ISBN (identifier)") [0-03-089422-0](https://en.wikipedia.org/wiki/Special:BookSources/0-03-089422-0 "Special:BookSources/0-03-089422-0") , section 17.9. 4. **[^](https://en.wikipedia.org/wiki/Moving_average#cite_ref-4)** The derivation and properties of the simple central moving average are given in full at [Savitzky–Golay filter](https://en.wikipedia.org/wiki/Savitzky%E2%80%93Golay_filter "Savitzky–Golay filter"). 5. **[^](https://en.wikipedia.org/wiki/Moving_average#cite_ref-5)** ["Weighted Moving Averages: The Basics"](http://www.investopedia.com/articles/technical/060401.asp). Investopedia. 6. **[^](https://en.wikipedia.org/wiki/Moving_average#cite_ref-6)** ["DEALING WITH MEASUREMENT NOISE - Averaging Filter"](https://web.archive.org/web/20100329135531/http://lorien.ncl.ac.uk/ming/filter/filewma.htm). Archived from [the original](http://lorien.ncl.ac.uk/ming/filter/filewma.htm) on 2010-03-29. Retrieved 2010-10-26. 7. **[^](https://en.wikipedia.org/wiki/Moving_average#cite_ref-7)** [NIST/SEMATECH e-Handbook of Statistical Methods: Single Exponential Smoothing](http://www.itl.nist.gov/div898/handbook/pmc/section4/pmc431.htm) at the [National Institute of Standards and Technology](https://en.wikipedia.org/wiki/National_Institute_of_Standards_and_Technology "National Institute of Standards and Technology") 8. **[^](https://en.wikipedia.org/wiki/Moving_average#cite_ref-8)** Yeh, A.; Lin, D.; Zhou, H.; Venkataramani, C. (2003). ["A multivariate exponentially weighted moving average control chart for monitoring process variability"](https://www.stat.purdue.edu/~dkjlin/documents/publications/2003/2003_AppStat1.pdf) (PDF). *[Journal of Applied Statistics](https://en.wikipedia.org/wiki/Journal_of_Applied_Statistics "Journal of Applied Statistics")*. **30** (5): 507–536\. [Bibcode](https://en.wikipedia.org/wiki/Bibcode_\(identifier\) "Bibcode (identifier)"):[2003JApSt..30..507Y](https://ui.adsabs.harvard.edu/abs/2003JApSt..30..507Y). [doi](https://en.wikipedia.org/wiki/Doi_\(identifier\) "Doi (identifier)"):[10\.1080/0266476032000053655](https://doi.org/10.1080%2F0266476032000053655). [ISSN](https://en.wikipedia.org/wiki/ISSN_\(identifier\) "ISSN (identifier)") [0266-4763](https://search.worldcat.org/issn/0266-4763). Retrieved 16 January 2025. 9. **[^](https://en.wikipedia.org/wiki/Moving_average#cite_ref-9)** [Spencer's 15-Point Moving Average — from Wolfram MathWorld](http://mathworld.wolfram.com/Spencers15-PointMovingAverage.html) 10. **[^](https://en.wikipedia.org/wiki/Moving_average#cite_ref-10)** Rob J Hyndman. "[Moving averages](https://robjhyndman.com/papers/movingaverage.pdf)". 2009-11-08. Accessed 2020-08-20. 11. **[^](https://en.wikipedia.org/wiki/Moving_average#cite_ref-11)** Aditya Guntuboyina. "[Statistics 153 (Time Series) : Lecture Three](https://www.stat.berkeley.edu/~aditya/Site/Statistics_153;_Spring_2012_files/Spring2012Statistics153LectureThree.pdf)". 2012-01-24. Accessed 2024-01-07. 12. **[^](https://en.wikipedia.org/wiki/Moving_average#cite_ref-12)** ["Efficient Running Median using an Indexable Skiplist « Python recipes « ActiveState Code"](http://code.activestate.com/recipes/576930/). 13. **[^](https://en.wikipedia.org/wiki/Moving_average#cite_ref-13)** G.R. Arce, "Nonlinear Signal Processing: A Statistical Approach", Wiley:New Jersey, US, 2005.
Shard152 (laksa)
Root Hash17790707453426894952
Unparsed URLorg,wikipedia!en,/wiki/Moving_average s443