# Prior and posterior of the Q matrix in Kalman filter

I constructed two uncorrelated series by cumulative white noise, and then applied multivariate Kalman filter on these two series.

State process $x_{t+1} = x_t + w_t$, where $w_t \sim \mathcal N (0, Q_t)$, $x_t = \begin{bmatrix} x_{1,t} \\ x_{2,t}\end{bmatrix}$ and $Q_t=\begin{bmatrix} 1 & 0.5 \\ 0.5 & 1\end{bmatrix}$

Measurement process $z_t = x_t + v_t$, where $v_t \sim \mathcal N (0, R_t)$ and $R_t=\begin{bmatrix} 5 & 0 \\ 0 & 5\end{bmatrix}$

I set the covariance terms in $Q_t$ to illustrate this question. In this case, the correlation matrix of $w_t$ is equal to $Q_t$

After simulation and running the filter for 100,000 steps, I examined the posterior sample correlation of one step differences of $\hat x_t$, and got an matrix very close to $\begin{bmatrix} 1 & 0.25 \\ 0.25 & 1\end{bmatrix}$.

Can anyone shed some light on why this posterior correlation coefficient is roughly half of the input correlation? There might be something that I miss mathematically

To answer my own question, I did some experiment by tweaking around the parameters and choose between model series independently or jointly as one state space representation. The Kalman filter basically maintains the correlation structure between series if they are filtered separately and independently, e.g. if you construct two series that have 50% correlation. After Kalman filtering with the same parameters, their $\hat x_t$ have pretty much the same 50% sample correlation.
On the other hand, if they are modeled jointly and are represented as $x_t = \begin{bmatrix} x_{1,t} \\ x_{2,t}\end{bmatrix}$, any additional covariance terms in the $Q_t$ matrix would bias up the correlation. The amount of bias depends on the endogenous correlation level. The bias is larger when the endogenous correlation is small, and smaller when the endogenous correlation is large. This is why in the question, the posterior sample correlation is around 25% when the endogenous correlation is 0.