Salta al contenuto
Note per Studenti Basic Discrete-Time Processes Report

Basic Discrete-Time Processes

In questa pagina 5

Examples of second order processes (see Stochastic Processesa stochastic process is a family of random variables indexed by time; it is described by its finite dimensional distributions or, for second order processes, by the mean function and the autocorrelation function; Gaussian processes are fully determined by these two.Stochastic Processes → and Weakly Stationary Processesa second order process is weakly stationary when its mean is constant and its autocorrelation depends only on the time difference; this note gives the equivalent conditions, consequences, symmetry of the autocorrelation, an example and the Toeplitz structure of covariance matrices.Weakly Stationary Processes →). Notation: δ(k)=1\delta(k)=1 for k=0k=0 and 00 otherwise.

1. White Gaussian noise, WGN(σ2)(\sigma^2)

This is the SP (Wn)n∈Z(W_n)_{n\in\mathbb Z} where the random variables WnW_n are iid Gaussians Wn∼N(0,σ2)W_n\sim N(0,\sigma^2). The variance σ2\sigma^2 is called the intensity of the WGN. The parameters are:

mW(n)=E(Wn)=0  for all n,m_W(n)=E(W_n)=0\ \text{ for all } n, MW(n)=E(Wn2)=var⁡(Wn)=σ2(since E(Wn)=0),σW2(n)=var⁡(Wn)=σ2,M_W(n)=E(W_n^2)=\operatorname{var}(W_n)=\sigma^2\quad(\text{since }E(W_n)=0),\qquad\sigma_W^2(n)=\operatorname{var}(W_n)=\sigma^2, rW(n+k,n)=E(Wn+kWn)={E(Wn+k)E(Wn)=0k≠0E(Wn2)=σ2k=0r_W(n+k,n)=E(W_{n+k}W_n)=\begin{cases}E(W_{n+k})E(W_n)=0&k\ne0\\E(W_n^2)=\sigma^2&k=0\end{cases} KW(n+k,n)=rW(n+k,n)since E(Wn)=0.K_W(n+k,n)=r_W(n+k,n)\quad\text{since }E(W_n)=0.

Note that (1) mW(n)=mW=0m_W(n)=m_W=0 for all nn and (2) rW(n+k,n)=σ2δ(k)r_W(n+k,n)=\sigma^2\delta(k) does not depend on nn. Therefore WGN(σ2)(\sigma^2) is weakly stationary with mW=0,rW(k)=σ2δ(k).m_W=0,\qquad r_W(k)=\sigma^2\delta(k).

2. Gaussian random walk

(Xn)n∈N(X_n)_{n\in\mathbb N} is defined as Xn+1=Xn+Wn,X0≡0,(Wn)∼WGN(σ2).X_{n+1}=X_n+W_n,\qquad X_0\equiv0,\qquad(W_n)\sim\mathrm{WGN}(\sigma^2). XnX_n can be interpreted as the output of an LTI system with impulse response the unit step u(n−1)u(n-1) and input WnW_n: Xn=u(n−1)∗WnX_n=u(n-1)*W_n.

Note that X1=X0+W0X_1=X_0+W_0, X2=X1+W1=X0+W0+W1=W0+W1X_2=X_1+W_1=X_0+W_0+W_1=W_0+W_1, and in general Xn=∑k=0n−1Wk.X_n=\sum_{k=0}^{n-1}W_k .

Parameters. mX(n)=E(Xn)=E(∑k=0n−1Wk)=0  for all n,MX(n)=E(Xn2)=var⁡(Xn)=nσ2.m_X(n)=E(X_n)=E\Big(\sum_{k=0}^{n-1}W_k\Big)=0\ \text{ for all } n,\qquad M_X(n)=E(X_n^2)=\operatorname{var}(X_n)=n\sigma^2 . Since MX(n)M_X(n) is not constant, the random walk cannot be weakly stationary.

For the autocorrelation (taking k≥0k\ge0, so that n+k−1≥n−1n+k-1\ge n-1): rX(n+k,n)=E(Xn+kXn)=E(∑i=0n+k−1Wi∑j=0n−1Wj)=E(∑j=0n−1Wj2)=nσ2.r_X(n+k,n)=E(X_{n+k}X_n)=E\left(\sum_{i=0}^{n+k-1}W_i\sum_{j=0}^{n-1}W_j\right)=E\Big(\sum_{j=0}^{n-1}W_j^2\Big)=n\sigma^2 . Only the products E(Wj2)=σ2E(W_j^2)=\sigma^2 survive (the page shows the grid of index pairs (i,j)(i,j) with the diagonal terms i=ji=j for 0≤j≤n−10\le j\le n-1); all others E(WiWj)=0E(W_iW_j)=0. The result depends on nn: not weakly stationary.

3. Moving average MA(1)

(Xn)(X_n) is defined as Xn=Wn+b Wn−1,Wn∼WGN(σ2).X_n=W_n+b\,W_{n-1},\qquad W_n\sim\mathrm{WGN}(\sigma^2). It can be interpreted as the output of an LTI system with input WnW_n and impulse response h(n)=δ(n)+b δ(n−1)h(n)=\delta(n)+b\,\delta(n-1): Xn=h(n)∗WnX_n=h(n)*W_n.

Parameters. mX(n)=E(Wn+bWn−1)=0m_X(n)=E(W_n+bW_{n-1})=0 for all nn (constant). Then rX(n+k,n)=E((Wn+k+bWn+k−1)(Wn+bWn−1))r_X(n+k,n)=E\big((W_{n+k}+bW_{n+k-1})(W_n+bW_{n-1})\big) =E(Wn+kWn)+b E(Wn+k−1Wn)+b E(Wn+kWn−1)+b2E(Wn+k−1Wn−1)=E(W_{n+k}W_n)+b\,E(W_{n+k-1}W_n)+b\,E(W_{n+k}W_{n-1})+b^2E(W_{n+k-1}W_{n-1}) =rW(k)+b rW(k−1)+b rW(k+1)+b2rW(k)=(1+b2)rW(k)+b rW(k−1)+b rW(k+1)=r_W(k)+b\,r_W(k-1)+b\,r_W(k+1)+b^2r_W(k)=(1+b^2)r_W(k)+b\,r_W(k-1)+b\,r_W(k+1) =σ2((1+b2)δ(k)+b δ(k−1)+b δ(k+1))=rX(k),=\sigma^2\Big((1+b^2)\delta(k)+b\,\delta(k-1)+b\,\delta(k+1)\Big)=r_X(k), which does not depend on nn. Hence MA(1) is weakly stationary with mX=0m_X=0 and rX(0)=σ2(1+b2),rX(±1)=σ2b,rX(k)=0 for ∣k∣≥2.r_X(0)=\sigma^2(1+b^2),\quad r_X(\pm1)=\sigma^2b,\quad r_X(k)=0\ \text{for }|k|\ge2 . (The sketch of rX(k)r_X(k) on the page has a central stem of height 1+b21+b^2 and stems of height bb at k=±1k=\pm1, i.e. drawn in units of σ2\sigma^2. On the page the σ2\sigma^2 factor is missing from the δ(k∓1)\delta(k\mp1) terms of the written formula; the formula above is the one consistent with rW(k)=σ2δ(k)r_W(k)=\sigma^2\delta(k) and with the Power Spectral Density and LTI Filteringthe power spectral density of a weakly stationary process is the Fourier transform of its autocorrelation; it is non-negative, measures how the average power is distributed over frequency, and is multiplied by the squared modulus of the frequency response when the process goes through an LTI system.Power Spectral Density and LTI Filtering → note, which gives rX(k)=σ2(1+b2)δ(k)+σ2b δ(k−1)+σ2b δ(k+1)r_X(k)=\sigma^2(1+b^2)\delta(k)+\sigma^2b\,\delta(k-1)+\sigma^2b\,\delta(k+1).)

4. Autoregressive AR(1)

The process (Xn)(X_n) satisfying Xn+1=aXn+Wn,X0⊥ ⁣ ⁣ ⁣⊥(Wn), E(X0)=0, var⁡(X0)=σ02,X_{n+1}=aX_n+W_n,\qquad X_0\perp\!\!\!\perp(W_n),\ E(X_0)=0,\ \operatorname{var}(X_0)=\sigma_0^2, with (Wn)∼WGN(σ2)(W_n)\sim\mathrm{WGN}(\sigma^2) independent of the initial value X0X_0.

A general expression for XnX_n is easy to find, either using the theory of difference equations or directly by iteration: X1=aX0+W0,X2=aX1+W1=a2X0+aW0+W1,X3=aX2+W2=a3X0+a2W0+aW1+W2, …X_1=aX_0+W_0,\quad X_2=aX_1+W_1=a^2X_0+aW_0+W_1,\quad X_3=aX_2+W_2=a^3X_0+a^2W_0+aW_1+W_2,\ \dots Xn=anX0+∑ℓ=0n−1a n−1−ℓWℓ.X_n=a^nX_0+\sum_{\ell=0}^{n-1}a^{\,n-1-\ell}W_\ell .

Parameters. mX(n)=0m_X(n)=0 for all nn (trivially). The autocorrelation rX(n+k,n)r_X(n+k,n) is more complicated and is computed iteratively.

Step 1: rX(n+1,n)r_X(n+1,n). rX(n+1,n)=E(Xn+1Xn)=E((aXn+Wn)Xn)=E(aXn2+XnWn)=a σX2(n),r_X(n+1,n)=E(X_{n+1}X_n)=E\big((aX_n+W_n)X_n\big)=E(aX_n^2+X_nW_n)=a\,\sigma_X^2(n), where E(XnWn)=0E(X_nW_n)=0 since XnX_n only depends on {X0,W0,W1,…,Wn−1}\{X_0,W_0,W_1,\dots,W_{n-1}\}, all random variables independent of WnW_n, so E(XnWn)=E(Xn)E(Wn)=0E(X_nW_n)=E(X_n)E(W_n)=0.

Step 2: the variance. It remains to compute σX2(n)=MX(n)\sigma_X^2(n)=M_X(n): σX2(n+1)=E(Xn+12)=E((aXn+Wn)2)=a2E(Xn2)+2aE(XnWn)⏟=0+E(Wn2)=a2σX2(n)+σ2,\sigma_X^2(n+1)=E(X_{n+1}^2)=E\big((aX_n+W_n)^2\big)=a^2E(X_n^2)+2a\underbrace{E(X_nW_n)}_{=0}+E(W_n^2)=a^2\sigma_X^2(n)+\sigma^2, where σ2\sigma^2 is the intensity of the WGN WnW_n. The following difference equation with initial condition has to be solved: {σX2(n+1)=a2σX2(n)+σ2σX2(0)=σ02.\begin{cases}\sigma_X^2(n+1)=a^2\sigma_X^2(n)+\sigma^2\\\sigma_X^2(0)=\sigma_0^2.\end{cases} Note that in general σX2(n)\sigma_X^2(n) depends on nn, therefore (Xn)(X_n) is not weakly stationary, but there are special cases.

Imposing σX2(n)=constant\sigma_X^2(n)=\text{constant}. We get from the difference equation the condition σX2(n+1)=σX2(n)\sigma_X^2(n+1)=\sigma_X^2(n), therefore σX2(n)=a2σX2(n)+σ2must hold for all n.\sigma_X^2(n)=a^2\sigma_X^2(n)+\sigma^2\quad\text{must hold for all }n. This gives σX2(n)=σ21−a2=σ02(the last equality is for n=0).\sigma_X^2(n)=\frac{\sigma^2}{1-a^2}=\sigma_0^2\qquad(\text{the last equality is for }n=0). If the parameters a,σ2,σ02a,\sigma^2,\sigma_0^2 satisfy the constraint σ21−a2=σ02(∗)\frac{\sigma^2}{1-a^2}=\sigma_0^2\qquad(*) then σX2(n)\sigma_X^2(n) is constant (and equals σ02\sigma_0^2). (Since a variance is positive, (∗)(*) requires 1−a2>01-a^2>0, i.e. ∣a∣<1|a|<1; this is the observation that follows from the formula, not an extra assumption stated on the page.)

Lemma. Under condition (∗)(*), rX(n+k,n)=σ21−a2 a∣k∣=σ02 a∣k∣,r_X(n+k,n)=\frac{\sigma^2}{1-a^2}\,a^{|k|}=\sigma_0^2\,a^{|k|}, which does not depend on nn, therefore the AR(1) process is weakly stationary with mX=0,rX(k)=σ02 a∣k∣.m_X=0,\qquad r_X(k)=\sigma_0^2\,a^{|k|}. (The sketch shows a two-sided stem plot, symmetric in kk, with maximum σ02\sigma_0^2 at k=0k=0 and geometrically decaying stems.)

Proof. rX(n+1,n)=E(Xn+1Xn)=E((aXn+Wn)Xn)=aE(Xn2)+E(WnXn)=σ02a,r_X(n+1,n)=E(X_{n+1}X_n)=E\big((aX_n+W_n)X_n\big)=aE(X_n^2)+E(W_nX_n)=\sigma_0^2a, rX(n+2,n)=E(Xn+2Xn)=E((aXn+1+Wn+1)Xn)=aE(Xn+1Xn)+E(Wn+1Xn)=σ02a2,r_X(n+2,n)=E(X_{n+2}X_n)=E\big((aX_{n+1}+W_{n+1})X_n\big)=aE(X_{n+1}X_n)+E(W_{n+1}X_n)=\sigma_0^2a^2, (the last term vanishes since Wn+1W_{n+1} is independent of XnX_n) and proceeding iteratively rX(n+k,n)=σ02ak.r_X(n+k,n)=\sigma_0^2a^k . Similarly it can be proved that rX(n−k,n)=σ02akr_X(n-k,n)=\sigma_0^2a^k. The result rX(n+k,n)=σ02a∣k∣r_X(n+k,n)=\sigma_0^2a^{|k|} follows. □\square

Remark: all these are filtered noise

The processes (Xn)(X_n) of the previous examples are all transformations of WGN(σ2)(\sigma^2) through an LTI system (random walk: h(n)=u(n−1)h(n)=u(n-1); MA(1): h(n)=δ(n)+bδ(n−1)h(n)=\delta(n)+b\delta(n-1)). In general, if a process (Xn)(X_n) is "filtered" through an LTI system with impulse response h(n)h(n), with output process (Yn)(Y_n), the output random variables are Yn=∑k=−∞+∞h(n−k)XkY_n=\sum_{k=-\infty}^{+\infty}h(n-k)X_k under stability conditions on hh. If (Xn)(X_n) is a second order process, also (Yn)(Y_n) is second order. Moreover, if (Xn)(X_n) is Gaussian, also (Yn)(Y_n) is Gaussian. (The page labels the noise "GWN" in this sentence; it is the same white Gaussian noise.) The frequency-domain description of filtering is in Power Spectral Density and LTI Filteringthe power spectral density of a weakly stationary process is the Fourier transform of its autocorrelation; it is non-negative, measures how the average power is distributed over frequency, and is multiplied by the squared modulus of the frequency response when the process goes through an LTI system.Power Spectral Density and LTI Filtering →.

Versione ripasso

WGN(σ2)(\sigma^2). WnW_n iid N(0,σ2)N(0,\sigma^2) (σ2\sigma^2 = intensity). mW=0m_W=0, rW(k)=σ2δ(k)r_W(k)=\sigma^2\delta(k). Weakly stationary.

Gaussian random walk. Xn+1=Xn+WnX_{n+1}=X_n+W_n, X0=0X_0=0, i.e. Xn=∑k=0n−1Wk=u(n−1)∗WnX_n=\sum_{k=0}^{n-1}W_k=u(n-1)*W_n. mX(n)=0m_X(n)=0, MX(n)=nσ2M_X(n)=n\sigma^2, rX(n+k,n)=nσ2r_X(n+k,n)=n\sigma^2 (k≥0k\ge0). Not weakly stationary (power grows with nn).

MA(1). Xn=Wn+bWn−1X_n=W_n+bW_{n-1}, h(n)=δ(n)+bδ(n−1)h(n)=\delta(n)+b\delta(n-1). mX=0m_X=0, rX(k)=σ2(1+b2)δ(k)+σ2b δ(k−1)+σ2b δ(k+1).r_X(k)=\sigma^2(1+b^2)\delta(k)+\sigma^2b\,\delta(k-1)+\sigma^2b\,\delta(k+1). Weakly stationary (derivation: (1+b2)rW(k)+b rW(k−1)+b rW(k+1)(1+b^2)r_W(k)+b\,r_W(k-1)+b\,r_W(k+1)).

AR(1). Xn+1=aXn+WnX_{n+1}=aX_n+W_n, X0⊥(Wn)X_0\perp(W_n), E(X0)=0E(X_0)=0, var⁡(X0)=σ02\operatorname{var}(X_0)=\sigma_0^2.

  • Xn=anX0+∑ℓ=0n−1an−1−ℓWℓX_n=a^nX_0+\sum_{\ell=0}^{n-1}a^{n-1-\ell}W_\ell; mX(n)=0m_X(n)=0.
  • rX(n+1,n)=aσX2(n)r_X(n+1,n)=a\sigma_X^2(n) (since E(XnWn)=0E(X_nW_n)=0); σX2(n+1)=a2σX2(n)+σ2\sigma_X^2(n+1)=a^2\sigma_X^2(n)+\sigma^2, σX2(0)=σ02\sigma_X^2(0)=\sigma_0^2.
  • Constant variance iff (∗)(*): σ21−a2=σ02\frac{\sigma^2}{1-a^2}=\sigma_0^2. Then weakly stationary with mX=0m_X=0, rX(k)=σ02a∣k∣r_X(k)=\sigma_0^2a^{|k|}.

Filtering. Yn=∑kh(n−k)XkY_n=\sum_kh(n-k)X_k keeps second order and Gaussian properties (under stability).

Typical mistakes. Calling the random walk stationary; forgetting E(XnWn)=0E(X_nW_n)=0 needs independence of WnW_n from the past; dropping the σ2\sigma^2 in the MA(1) side terms; applying rX(k)=σ02a∣k∣r_X(k)=\sigma_0^2a^{|k|} without condition (∗)(*); using aka^k instead of a∣k∣a^{|k|} for negative lags.

Teoria collegata