Me gustaría estimar un ángulo de θ∈(−π2,π2) dado el ruido de las observaciones de su seno y coseno (esto está relacionado con mi pregunta anterior). Mi estimador es la tangente inversa de la relación de los medios de las observaciones de seno y coseno. Vamos a suponer que el ruido es aditivo y Gaussiano. Estoy teniendo problemas para mostrar que el error cuadrático medio (MSE) de este estimador es la disminución en n, a pesar de experimentos numéricos (e intuición) sugieren que sí.
Formalmente, supongamos secuencias independientes de yo.yo.d. cero significa aleatoria Gaussiana variables (Xn) (Yn) tienen varianza que es inversamente proporcional a n. Que es Xn∼N(0,σ2n), Yn∼N(0,σ2n), y el conjunto p.d.f. es:
fXn,Yn(xn,yn)=n2πσ2exp[−(x2n+y2n)n2σ2].
I am interested in the mean squared error of the estimator ˆθ(Xn,Yn)=tan−1(sin(θ)+Xncos(θ)+Yn) as n→∞. Specifically, I would like to show that:
lim
Furthermore, I would like to show that \mathbb{E}_{X_n,Y_n}[(\hat{\theta}(X_n,Y_n)-\theta)^2]=\mathcal{O}\left(\frac{1}{n}\right).
I performed a numerical experiment in MATLAB (see code below), which suggests the inverse linear scaling of the MSE:
I then tried to confirm it analytically using the Taylor series expansion of the function \tan^{-1}\left(\frac{\sin(\theta)+X_n}{\cos(\theta)+Y_n}\right) at the origin (x,y)=(0,0). However, utmost care in the control of the remainder must be exercised when taking the expectation of Taylor expansion--see this discussion (in particular, Mike McCoy's answer). With that in mind, I use Wolfram Mathematica (see code below) I obtain:
\begin{align}&\tan^{-1}\left(\frac{\sin(\theta)+x}{\cos(\theta)+y}\right) =\theta+x \cos (\theta )-y \sin (\theta )\\ &\qquad+\frac{1}{2} \left[\sin (2 \theta ) \left(y^2-x^2\right)-2 x y \cos (2 \theta )\right] \\ &\qquad+\frac{1}{3} \left[-y \sin (3 \theta ) \left(y^2-3 x^2\right)-x \cos (3 \theta ) \left(x^2-3 y^2\right)\right] \\ &\qquad+\frac{1}{4} \left[\sin (4 \theta ) \left(x^4-6 x^2 y^2+y^4\right)+4 x y \cos (4 \theta ) \left(x^2-y^2\right)\right]\\ &\qquad+\frac{1}{5} \left[-y \sin (5 \theta ) \left(5 x^4-10 x^2 y^2+y^4\right)+x \cos (5 \theta ) \left(x^4-10 x^2 y^2+5 y^4\right)\right]\\ &\qquad+\frac{1}{6} \left[-\sin (6 \theta ) \left(x^6-15 x^4 y^2+15 x^2 y^4-y^6\right)\right. \\ &\qquad\qquad\qquad\left.+\cos (6 \theta ) \left(-\left(6 x^5 y-20 x^3 y^3+6 x y^5\right)\right)\right] \\ &\qquad+\frac{1}{7}\left[-y \sin (7 \theta ) \left(-7 x^6+35 x^4 y^2-21 x^2 y^4+y^6\right)\right. \\ &\qquad\qquad\qquad\left.-x \cos(7 \theta ) \left(x^6-21 x^4 y^2+35 x^2 y^4-7 y^6\right)\right]\\ &\qquad+\ldots\end{align}
The zeroth-order term is of course \theta. If we just plug X_n and Y_n into the first order term x \cos (\theta )-y \sin (\theta ) and compute the variance, we get the desired inverse dependence on n. However, per Mike McCoy's answer to the aforementioned post, I need to ensure that the error from the remainder R_2(X_n,Y_n;\theta) after the first order term goes to zero as well, where the remainder is defined as follows:
R_2(x,y)=\tan^{-1}\left(\frac{\sin(\theta)+x}{\cos(\theta)+y}\right)-\theta-x \cos (\theta )+y \sin (\theta ).
Remainder is an arithmetic mess, however, subtracting \theta from the Taylor series expansion above, squaring, plugging in X_n and Y_n, and finding expected value by integrating in Mathematica (see code below) yields:
\mathbb{E}_{X_n,Y_n}[(\hat{\theta}(X_n,Y_n)-\theta)^2]=\left(\frac{\sigma^2}{n}\right)+\left(\frac{\sigma^2}{n}\right)^2+\frac{8}{3} \left(\frac{\sigma^2}{n}\right)^3+12 \left(\frac{\sigma^2}{n}\right)^4+\frac{384}{5}\left(\frac{\sigma^2}{n}\right)^5+640 \left(\frac{\sigma^2}{n}\right)^6+\frac{46080}{7} \left(\frac{\sigma^2}{n}\right)^7+80640 \left(\frac{\sigma^2}{n}\right)^8+\ldots
From these first few terms one recognizes the following series:
\mathbb{E}_{X_n,Y_n}[(\hat{\theta}(X_n,Y_n)-\theta)^2]=\sum_{p=1}^\infty\frac{2^pp!\sigma^{2p}}{pn^p},
which diverges for any fixed n (and \sigma^2), lo que implica que el MSE es infinito.
¿Qué estoy haciendo mal? ¿Hay alguna otra manera de mostrar que el MSE converge a cero?
CÓDIGO
Este es el código de MATLAB utilizados en la generación de la figura:
for n=1:100
x=randn(1,1000)/sqrt(n*10);
y=randn(1,1000)/sqrt(n*10);
v(n)=var(atan((sin(theta)+x)./(cos(theta)+y)));
end
Este es el código de Mathematica para obtener los siete primeros términos de la expansión en series de Taylor:
Sum[FullSimplify[
D[ArcTan[(Sin[\[Theta]] + t*x)/(Cos[\[Theta]] + t*y)], {t, i}] /.
t -> 0, Assumptions -> \[Theta] > -Pi/2 && \[Theta] <
Pi/2]/(i!), {i, 0, 7}]
y aquí está el código que se usa primero el MSE para el primer par de términos:
Integrate[(Out[2] - \[Theta])^2/(2*Pi*s2)*
Exp[-(x^2 + y^2)/(2*s2)], {x, -Infinity, Infinity}, {y, -Infinity,
Infinity},
Assumptions -> \[Theta] > -Pi/2 && \[Theta] < Pi/2 && s2 > 0]