# Solution {-}
The random variable $X$ is completely described by its mean and covariance matrix:
\begin{equation*}
  \mu=
  \begin{bmatrix}
    1 \\
    2 \\
  \end{bmatrix} \quad
  C_X=
  \begin{bmatrix}
    4 &1\\
    1 &1\\
  \end{bmatrix}
\end{equation*}

Now consider another random variable $Y$ that is functionally related to $X$ by:
\begin{equation*}
  y=Ax+b
\end{equation*}

where
\begin{equation*}
  A=
  \begin{bmatrix}
    2 &1\\
    1 &-1\\
  \end{bmatrix} \quad
  b=
  \begin{bmatrix}
    1\\
    1\\
  \end{bmatrix}
\end{equation*}

Find the mean and the covariance matrix for $Y$:


```python
from sympy import Matrix

mx = Matrix([[1],
             [2]])
Cx = Matrix([[4, 1],
             [1, 1]])

A = Matrix([[2,  1],
            [1, -1]])
b = Matrix([[1],
            [1]])
        
my = A@mx + b
Cy = A@Cx@A.T

display(my)
display(Cy)
```


$\displaystyle \left[\begin{matrix}5\\0\end{matrix}\right]$



$\displaystyle \left[\begin{matrix}21 & 6\\6 & 3\end{matrix}\right]$


caea3667b52b52ecc4a440d5255db71a3b3b9c95
ipynb
Jupyter Notebook
Problem 1.28.ipynb
mfkiwl/GMPE340
3602b8ba859a2c7db2cab96862472597dc1ac793
MIT
2021-09-07T09:36:36.000Z
2021-09-07T09:36:36.000Z
Problem 1.28.ipynb
mfkiwl/GMPE340
3602b8ba859a2c7db2cab96862472597dc1ac793
MIT
Problem 1.28.ipynb
mfkiwl/GMPE340
3602b8ba859a2c7db2cab96862472597dc1ac793
MIT
2021-09-20T18:48:20.000Z
2021-09-20T18:48:20.000Z
Qwen/Qwen-72B
1. YES
2. YES