# Covariance Matrix Understanding

I have seen a video explaining Kalman Filter and it was showing the covariance matrix calculation for position reading. Assuming that the displacement error of the GPS is $\pm 5$ meters on x and y axis while $0$ meters on z axis. $\Delta x=5, \Delta y=5$ and $\Delta z=0$.

$cov = \begin{bmatrix} \Delta x^2 & \Delta x \Delta y & \Delta x \Delta z \\ \Delta y \Delta x & \Delta y^2 & \Delta y \Delta z \\ \Delta z \Delta x & \Delta z \Delta y & \Delta z^2 \end{bmatrix} = \begin{bmatrix} 25 & 25 & 0 \\ 25 & 25 & 0 \\ 0 & 0 & 0 \end{bmatrix}$

I would like to know how this is relating to the calculation of the covariance matrix $cov = \sum_{i=1}^{n} \frac{(X_i -\mu_x)(Y_i - \mu_y)}{n-1}$ only that I am assuming that $X = Y = \begin{bmatrix} 5 \\ 5 \\ 0 \end{bmatrix}$ to be $cov = \begin{bmatrix} 8.33 & 8.33 \\ 8.33 & 8.33 \end{bmatrix}$.