Skewness / kurtosis bergerak tertimbang eksponensial


15

Ada rumus on-line yang terkenal untuk menghitung rata-rata bergerak tertimbang secara eksponensial dan standar deviasi dari suatu proses (xn)n=0,1,2,… . Untuk rata-rata,

μn=(1−α)μn−1+αxn

dan untuk varians

σn2=(1−α)σn−12+α(xn−μn−1)(xn−μn)

dari mana Anda dapat menghitung simpangan baku.

Apakah ada rumus yang sama untuk perhitungan on-line dari momen ketiga dan keempat terpusat eksponensial? Intuisi saya adalah mereka harus mengambil formulir

M3,n=(1−α)M3,n−1+αf(xn,μn,μn−1,Sn,Sn−1)

dan

M4,n=(1−α)M4,n−1+αf(xn,μn,μn−1,Sn,Sn−1,M3,n,M3,n−1)

dari mana Anda dapat menghitung kemiringan dan kurtosis k n = M 4 , n / σ 4 n tetapi saya tidak dapat menemukan ekspresi bentuk-tertutup yang sederhana untuk fungsi-fungsi tersebut f dan g .γn=M3,n/σn3kn=M4,n/σn4fg


Sunting: Beberapa informasi lebih lanjut. Rumus pembaruan untuk varian bergerak adalah kasus khusus dari rumus untuk kovarians bergerak tertimbang eksponensial, yang dapat dihitung melalui

Cn(x,y)=(1−α)Cn−1(x,y)+α(xn−x¯n)(yn−y¯n−1)

di mana dan ˉ y n adalah cara bergerak eksponensial dari x dan y . Asimetri antara x dan y adalah ilusi, dan menghilang ketika Anda memperhatikan bahwa y - ˉ y n = ( 1 - α ) ( y - ˉ y n - 1 ) .x¯ny¯nxyxyy−y¯n=(1−α)(y−y¯n−1)

Formulas like this can be computed by writing the central moment as an expectation En(⋅), where weights in the expectation are understood to be exponential, and using the fact that for any function f(x) we have

En(f(x))=αf(xn)+(1−α)En−1(f(x))

It's easy to derive the updating formulas for the mean and variance using this relation, but it's proving to be more tricky for the third and fourth central moments.

Jawaban:


6

The formulas are straightforward but they are not as simple as intimated in the question.

YX=xnYZ=αX+(1−α)Y for a constant value α. For notational convenience, set β=1−α. Let F denote the CDF of a random variable and ϕ denote its moment generating function, so that

ϕX(t)=EF[exp⁡(tX)]=∫Rexp⁡(tx)dFX(x).

With Kendall and Stuart, let μk′(Z) denote the non-central moment of order k for the random variable Z; that is, μk′(Z)=E[Zk]. The skewness and kurtosis are expressible in terms of the μk′ for k=1,2,3,4; for example, the skewness is defined as μ3/μ23/2 where

μ3=μ3′−3μ2′μ1′+2μ1′3 and μ2=μ2′−μ1′2

are the third and second central moments, respectively.

By standard elementary results,

1+μ1′(Z)t+12!μ2′(Z)t2+13!μ3′(Z)t3+14!μ4′(Z)t4+O(t5)=ϕZ(t)=ϕαX(t)ϕβY(t)=ϕX(αt)ϕY(βt)=(1+μ1′(X)αt+12!μ2′(X)α2t2+⋯)(1+μ1′(Y)βt+12!μ2′(Y)β2t2+⋯).

To obtain the desired non-central moments, multiply the latter power series through fourth order in t and equate the result term-by-term with the terms in ϕZ(t).


I am having some formula visualization problem, possibly whenever a ' is used, with both IE and Firefox, would you please care checking? Thanks!
— Quartz

1
@Quartz Thanks for the heads up. This used to display properly, so evidently there has been some change in the processing of the TEX markup. I found a workaround by enclosing all single quotes within braces. (This change has probably broken a few dozen posts on this site.)
— whuber

0

I think that the following updating formula works for the third moment, although I'd be glad to have someone check it:

M3,n=(1−α)M3,n−1+α[xn(xn−μn)(xn−2μn)−xnμn−1(μn−1−2μn)−… ⋯−μn−1(μn−μn−1)2−3(xn−μn)σn−12]

Updating formula for the kurtosis still open...


Why the ... in the above formula?
— Chris

Line continuation.
— Chris Taylor

Did your equation prove to be correct? I asked a similar question in R. stats.stackexchange.com/q/234460/70282
— Chris

Did you account for the division by N in the third moment? Skewness is the ratio of the 3rd moment and the standard deviation^3 like so: Skew = m3 / sqrt(variance)^3 The third moment is defined as: m3 = sum( (x-mean)^3 )/n
— Chris
Dengan menggunakan situs kami, Anda mengakui telah membaca dan memahami Kebijakan Cookie dan Kebijakan Privasi kami.
Licensed under cc by-sa 3.0 with attribution required.