Is the linear regression of two cosine with different phase $\cos(θ_2-θ_1)$?

73 Views Asked by At

I noticed the following equality that I verified numerically with Excel to be correct.

The linear regression of two cosine with same frequency but different phase yields the cosine of the phase difference.

$$\frac{\operatorname{COV}(\cos(ωt+\theta_1),\cos(ωt+\theta_2))}{\operatorname{VAR}(\cos(ωt+\theta_1))} = \cos(\theta_2-\theta_1)$$

The following equality is also expected to be correct.

$$\frac{\operatorname{COV}(\cos(ωt+\theta_1),\sin(ωt+\theta_2))}{\operatorname{VAR}(\cos(ωt+\theta_1))} = \sin(\theta_2-\theta_1)$$

How can we prove (or disprove) these equality formally ?

1

There are 1 best solutions below

4
On BEST ANSWER

It seems that using excel functions you are evaluating these values as follows

$$\small \operatorname{COV}(\cos(wt+\theta_1),\cos(wt+\theta_2))=\int_0^{\frac{2\pi}\omega} \cos(wt+\theta_1)\cos(wt+\theta_2)\;dt=\frac\pi{\omega}\cos (\theta_2-\theta_1) \tag 1$$

$$\small \operatorname{COV}(\cos(wt+\theta_1),\sin(wt+\theta_2))=\int_0^{\frac{2\pi}\omega} \cos(wt+\theta_1)\sin(wt+\theta_2)\;dt= \frac\pi{\omega}\sin (\theta_2-\theta_1)\tag 2 $$

$$\small\operatorname{VAR}(\cos(wt+\theta_1))=\int_0^{\frac{2\pi}\omega} \cos^2(wt+\theta_1)\; dt=\frac \pi \omega \tag 3$$

from which the result follows.


Calculation od integrals involved

For (1) we can use that, by "Product-to-sum identities"

$$\cos(wt+\theta_1)\cos(wt+\theta_2)=\frac12 \left(\cos(\theta_2-\theta_1)+\cos(2wt+\theta_1+\theta_2)\right)$$

therefore

$$\int_0^{\frac{2\pi}\omega} \cos(wt+\theta_1)\cos(wt+\theta_2)\;dt=$$

$$\require{cancel}=\frac12\int_0^{\frac{2\pi}\omega} \cos(\theta_2-\theta_1)\;dt+\frac12\cancel{\int_0^{\frac{2\pi}\omega} \cos(2wt+\theta_1+\theta_2)\;dt}=\frac12 \frac{2\pi}\omega\cos(\theta_2-\theta_1)$$

Similarly for (2) we can use that

$$\cos(wt+\theta_1)\sin(wt+\theta_2)=\frac12 \left(\sin(\theta_2-\theta_1)+\sin(2wt+\theta_1+\theta_2)\right)$$

For (3) we can use that

$$\cos^2(wt+\theta_1)= \frac12 \left(1+\cos\left(2wt+2\theta_1\right)\right)$$

therefore

$$\int_0^{\frac{2\pi}\omega} \cos^2(wt+\theta_1)\; dt=\frac12 \int_0^{\frac{2\pi}\omega}1\; dt+\frac12 \cancel{\int_0^{\frac{2\pi}\omega} \cos\left(2wt+2\theta_1\right)\; dt}=\frac \pi \omega$$