math notation

This commit is contained in:
Morten Hjorth-Jensen
2020-08-07 15:40:47 +02:00
parent c080018673
commit 0c3458bdb6
+7 -7
View File
@@ -1901,13 +1901,13 @@ $X_j$, ($i\neq j$):
!split
===== Covariance example =====
Suppose we have defined three vectors $\hat{x}, \hat{y}, \hat{z}$ with
Suppose we have defined three vectors $\bm{x}, \bm{y}, \bm{z}$ with
$n$ elements each. The covariance matrix is defined as
!bt
\[
\hat{\Sigma} = \begin{bmatrix} \sigma_{xx} & \sigma_{xy} & \sigma_{xz} \\
\bm{\Sigma} = \begin{bmatrix} \sigma_{xx} & \sigma_{xy} & \sigma_{xz} \\
\sigma_{yx} & \sigma_{yy} & \sigma_{yz} \\
\sigma_{zx} & \sigma_{zy} & \sigma_{zz}
\end{bmatrix},
@@ -1926,11 +1926,11 @@ the exact mean valu\ es.
The following simple function uses the _np.vstack_ function which
takes each vector of dimension $1\times n$ and produces a $3\times n$
matrix $\hat{W}$
matrix $\bm{W}$
!bt
\[
\hat{W} = \begin{bmatrix} x_0 & y_0 & z_0 \\
\bm{W} = \begin{bmatrix} x_0 & y_0 & z_0 \\
x_1 & y_1 & z_1 \\
x_2 & y_2 & z_2 \\
\dots & \dots & \dots \\
@@ -1941,8 +1941,8 @@ matrix $\hat{W}$
!et
which in turn is converted into into the $3\times 3$ covariance matrix
$\hat{\Sigma}$ via the Numpy function _np.cov()_. We note that we can
also calculate the mean value of each set of samples $\hat{x}$ etc
$\bm{\Sigma}$ via the Numpy function _np.cov()_. We note that we can
also calculate the mean value of each set of samples $\bm{x}$ etc
using the Numpy function _np.mean(x)_. We can also extract the
eigenvalues of the covariance matrix through the _np.linalg.eig()_
function.
@@ -2550,7 +2550,7 @@ where we have used that $\mathbb{E} (\mathbf{Y} \mathbf{Y}^{T}) =
\sigma^2 \, \mathbf{I}_{nn}$. From $\mbox{Var}(\bm{\beta}) = \sigma^2
\, (\mathbf{X}^{T} \mathbf{X})^{-1}$, one obtains an estimate of the
variance of the estimate of the $j$-th regression coefficient:
$\hat{\sigma}^2 (\hat{\beta}_j ) = \hat{\sigma}^2 \sqrt{
$\bm{\sigma}^2 (\bm{\beta}_j ) = \bm{\sigma}^2 \sqrt{
[(\mathbf{X}^{T} \mathbf{X})^{-1}]_{jj} }$. This may be used to
construct a confidence interval for the estimates.