Apéndice A — Vectores Aleatorios

A.1 Definiciones Básicas

Un vector aleatorio es una colección de variables aleatorias generadas en el mismo espacio medible \((\Omega, \mathcal{A} )\) asociado a un experimento \(\xi\).

Definición A.1 (\(\sigma\)-algebra de Borel en \(\mathbb{R}^p\)) Sea \(\Omega=\mathbb{R}^p,\) \(p \geq 1\).Considere la colección de hiperrectángulos

\[ \mathcal{I}^{p}:=-\left\{(-\infty, a_1]\times\cdots \times (-\infty, a_{p}]: a_1, \ldots, a_p\in \mathbb{R}\right\} \]

La \(\sigma\)-algebra de Borel en \(\mathbb{R}^{\mathrm{P}}\), denotado por \(\mathcal{B}^p\), se define como la más pequeña \(\sigma\)-algebra que contiene \(\mathcal{I}^{p}\).

Definición A.2 (Vector Aleatorio) Sea \((\Omega, \mathcal{A})\) un espacio medioble y \(\mathcal{B}^p\) la algebra de Borel en \(\mathbb{R}^p\). Un vector aleatorio es una mapeo \(\boldsymbol{X}: \mathbb{R} \rightarrow \mathbb{R}^p\) que es medible. Esto es, \[ \boldsymbol{X}^{-1}(B)\in \mathcal{A}, \quad \quad \forall \ B\in \mathcal{B}^p. \] Donde \(\boldsymbol{X}^{-1}(B)=\{\omega \in \Omega: \boldsymbol{X}(\omega) \in B\}.\)

Es obvio que esto generaliza el caso unidimensional \((p=1)\) pero conviene también pensar los vectores aleatorios en términos de la siguiente caracterización

Proposición A.1 (Vector Aleatorio) Dado un espacio medible \((\Omega, \mathcal{A})\), un mapeo \(\boldsymbol{X}: \Omega \rightarrow \mathbb{R}^p\) definido como \(\boldsymbol{X}(\omega)=\left(X_1(\omega), \ldots, X_p(\omega)\right)^{\top}\) es un vector aleatorio si y solo si \(X_1, \ldots, X_p: \Omega \rightarrow \mathbb{R}\) son variables aleatorias en \((\Omega, \mathcal{A}\)

Ejemplo: Tiros de dado

Consideramos tirar un dado 10 veces, entonces \(\# \Omega=6^{10}\). Podemos definir el vector aleatorio \(\boldsymbol{X}(\omega)=\left(X_1(\omega), X_2(\omega)\right)^{\top}\) donde \(X_1(\omega)=\) “Número de 5’s en los 10 tiros” y \(X_2(\omega)=\) “Número de 3’s en los 10 tiros”.

Se puede verificar que \(\boldsymbol{X}\) es un vector aleatorio con componentes \(X_1\) y \(X_2\), que son variables aleatorios en \((\Omega, \mathcal{P}(\Omega))\).

Al igual que en el caso univariado, un vector aleatorio \(\boldsymbol{X}\) induce una probabilidad \(\mathbb{P}_{\boldsymbol{X}}\) en \(\left(\mathbb{R}^p, \mathcal{B}^p\right)\) a partir de la probabilidad \(\mathbb{P}\) en \((\Omega, \mathcal{A})\).

Definición A.3 (\(\mathbb{P}_{\boldsymbol{X}}\)) Sea \(\mathcal{B}^p\) la \(\sigma\)-algebra de Borel en \(\mathbb{R}^p\). La probabilidad \(\mathbb{P}_{\boldsymbol{X}}\), inducida por el vector aleatorio \(\boldsymbol{X}\) es la función \(\mathbb{P}_{\boldsymbol{X}}: \mathcal{B}^p \rightarrow \mathbb{R}^p\) definida como \[ \mathbb{P}_{\boldsymbol{X}}(B):=\mathbb{P}\left(\boldsymbol{X}^{-1}(B)\right), \quad \forall \ B \in \mathcal{B}^p \]

Definición A.4 (Función de distribución conjunta) La función de distribución conjunta del vector aleatorio (FD) \(\boldsymbol{X}\), \(F_{\boldsymbol{X}}: \mathbb{R}^p \rightarrow[0,1]\), se define como \[ F_{\boldsymbol{X}}(\boldsymbol{x}):=\mathbb{P}(\boldsymbol{X} \leq \boldsymbol{x}):=\mathbb{P}_{\boldsymbol{X}}\left(\left(-\infty, x_1\right] \times \stackrel{p}{\cdots} \times\left(-\infty, x_p\right]\right), \quad \forall \ \boldsymbol{x}=\left(\boldsymbol{x}_1, \ldots, \boldsymbol{x}_p\right)^{\top} \in \mathbb{R}^p \]

Lo anterior es análogo a \[ \begin{aligned} \mathbb{P}(\boldsymbol{X} \leq \boldsymbol{x}) & =\mathbb{P}\left(X_1 \leq x_1, \ldots, X_p \leq x_p\right) \\ & =\mathbb{P}\left(\left\{X_1 \leq x_1\right\} \cap \ldots \cap\left\{X_p \leq x_p\right\}\right) \end{aligned} \]

Proposición A.2 (Propiedades de la FD)  

  1. La FD es monónota no decreciente en cada componente. Esto es, \[ x_i<y_i \quad \Longrightarrow\quad F_{\boldsymbol{X}}(\boldsymbol{x}) \leq F_{\boldsymbol{X}}(\boldsymbol{y}), \quad \text{ para cualquier } \ i=1, \ldots, p \]

  2. \(\lim _{x_i \rightarrow-\infty} F(\boldsymbol{x})=0 \quad\) para cualquier \(i=1, \ldots, p\).

  3. \(\lim _{x_1,\ldots,x_p \rightarrow+\infty} F(x)=1\).

  4. \(\boldsymbol{F}_{\boldsymbol{X}}\) es continua por la derecha.

Definición A.5 (Vector aleatorio discreto) Un vector aleatorio \(\boldsymbol{X}\) es discreto si su soporte \(R_{\boldsymbol{X}}:=\left\{\boldsymbol{x} \in \mathbb{R}^p: \boldsymbol{x}=\boldsymbol{X}(\omega) \quad\text { para } \quad \omega \in \Omega\right\}\) es finito o numerable.

Definición A.6 (Función de densidad de probabilidad (fdp) conjunta) La funciónd de masa o de densidad de probabilidad conjunta de un vector aleatorio discreto \(\boldsymbol{X}\) es la función \(p_{\boldsymbol{X}}: \mathbb{R}^p \rightarrow[0,1]\) tal que \[ p_{\boldsymbol{X}}(\boldsymbol{x}):=\mathbb{P}_{\boldsymbol{X}}(\{\boldsymbol{x}\}), \quad \forall \boldsymbol{x} \in \mathbb{R}^p \]

La notación \(\mathbb{P}(\boldsymbol{X}=\boldsymbol{x}):=p_{\boldsymbol{X}}(\boldsymbol{x})\) también se utiliza comúnmente e incluso el subíndice \(\boldsymbol{X}\) se excluye si hay peligro de ambiguedad.

Definición A.7 (Vector aleatorio continuo) Un vector aleatorio \(\boldsymbol{X}\) es continuo (también denominado absolutamente continuo) si su FD \(F_{\boldsymbol{X}}\) se puede expresar como \[ F_{\boldsymbol{X}}(\boldsymbol{x})=\int_{-\infty}^{x_1} \cdots \int_{-\infty}^{x_p} f_{\boldsymbol{X}}\left(t_1, \ldots, t_p\right) \mathrm{d} t_p \cdots \mathrm{~d} t_1, \quad \forall \boldsymbol{x} \in \mathbb{R}^p \]

donde \(f_{\boldsymbol{X}}: \mathbb{R}^p \rightarrow[0, \infty)\). La función \(f_{\boldsymbol{X}}\) es la función de densidad conjunta de \(\boldsymbol{X}\).

Proposición A.3 (Propiedades de la función de densidad (fd) conjunta)  

  1. \(\frac{\partial^p}{\partial x_1 \cdots \partial x_p} F_{\boldsymbol{X}}(\boldsymbol{x})=f_{\boldsymbol{X}}(\boldsymbol{x})\) c.s. en \(\boldsymbol{x} \in \mathbb{R}^p.\)

  2. \(f\) es no negativa y tal que \[ \int_{-\infty}^{\infty} \cdots \int_{-\infty}^{\infty} f_{\boldsymbol{X}}\left(t_1, \ldots, t_p\right) \mathrm{d} t_p \cdots \mathrm{~d} t_1=\int_{\mathbb{R}^p} f_{\boldsymbol{X}}(\boldsymbol{t}) \mathrm{d} \boldsymbol{t}=1. \]

  3. Para \(A \in \mathcal{B}^p, \mathbb{P}(\boldsymbol{X} \in A)=\int_A f_{\boldsymbol{X}}(\boldsymbol{t}) \mathrm{d} \boldsymbol{t}\).

Ejemplo: Vector uniforme

Sea \(\boldsymbol{X} \sim \mathcal{U}([0,1] \times[0,2])\). La función de densidad conjunta de \(\boldsymbol{X}\) es \[ f\left(x_1, x_2\right)= \begin{cases}1 / 2, & \left(x_1, x_2\right)^{\top} \in[0,1] \times[0,2] \\ 0, & \text { eoc }\end{cases} \]

La FD de \(\boldsymbol{X}\) es \[ F\left(x_1, x_2\right)=\int_{-\infty}^{x_1} \int_{-\infty}^{x_2} f\left(t_1, t_2\right) \mathrm{d} t_2 \mathrm{~d} t_1 \] para \(x_1,x_2 \in \mathbb{R}\). Entonces considerando \(f\), tenemos \[ F\left(x_1, x_2\right)= \begin{cases}0, & x_1<0 \text { or } x_2<0 \\ x_1, & 0 \leq x_1 \leq 1, x_2>2 \\ \left(x_1 x_2\right) / 2, & 0 \leq x_1 \leq 1,0 \leq x_2 \leq 2 \\ x_2 / 2, & x_1>1,0 \leq x_2 \leq 2 \\ 1, & x_1>1, x_2>2\end{cases} \]

Ejemplo: Vector aleatorio discreto

Sea \(\boldsymbol{X}=\left(X_1, X_2\right)^{\top}\) con \(X_1 \sim \mathcal{U}(\{1,2,3\})\) y \(X_2 \sim \operatorname{Bin}(1,2 / 3)\) y \(X_1 \perp \!\!\! \perp X_2\). Esto significa que :

  • \(\mathbb{P}\left(X_1=x\right)=1 / 3\), para \(x=1,2,3\) (y cero eoc).
  • \(\mathbb{P}\left(X_2=1\right)=2 / 3\) and
  • \(\mathbb{P}\left(X_2=0\right)=1 / 3\) (y cero eoc).
  • \(\mathbb{P}\left(X_1=x_1, X_2=x_2\right)=\mathbb{P}\left(X_1=x_1\right) \mathbb{P}\left(X_2=x_2\right)\). -El soporte de \(\boldsymbol{X}\) es \(\{(1,0),(2,0),(3,0),(1,1),(2,1),(3,1)\}\).

Por ejemplo la FD \(F\) evaluada en \((5 / 2,1 / 2)\): \[ \begin{aligned} F(5 / 2,1 / 2) & =\mathbb{P}\left(X_1 \leq 5 / 2, X_2 \leq 1 / 2\right) \\ & =\mathbb{P}\left(X_1=1, X_2=0\right)+\mathbb{P}\left(X_1=2, X_2=0\right) \\ & =(1 / 3)^2+(1 / 3)^2 \\ & =2 / 9 \end{aligned} \]

A.2 Distribución Marginal

Definición A.8 (FD marginal) La FD marginal del \(i\)-ésimo componente del vector \(\boldsymbol{X}\) se define como \[ \begin{aligned} F_{X_i}\left(x_i\right) & := \lim_{y\rightarrow \infty }F_X\left(y, \ldots, y, x_i, y, \ldots, y\right) \\ & =\mathbb{P}\left(X_1 \leq \infty, \ldots, X_i \leq x_i, \ldots, X_p \leq \infty\right) \\ & =\mathbb{P}\left(X_i \leq x_i\right) . \end{aligned} \]

Definición A.9 (fd marginal) La Función de densidad marginal del \(i\)-ésimo elemento de \(\boldsymbol{X}\) se define como \[ \begin{aligned} f_{X_i}\left(x_i\right) & :=\frac{\partial}{\partial x_i} F_{X_i}\left(x_i\right) \\ & =\int_{-\infty}^{\infty} \stackrel{p-1}{\cdots} \int_{-\infty}^{\infty} f_{\boldsymbol{X}}\left(x_1, \ldots, x_i, \ldots, x_p\right) \mathrm{d}x_1\cdots \mathrm{d}x_{i-1} \mathrm{d}x_{i+1}\cdots\mathrm{d}x_p \\ & =\int_{\mathbb{R}^{p-1}} f_{\boldsymbol{X}}(\boldsymbol{x}) \mathrm{d} \boldsymbol{x}_{-i}, \end{aligned} \] donde \(\boldsymbol{x}_{-i}=\left(x_1, \ldots, x_{i-1}, x_{i+1}, \ldots, x_p\right)^{\top}\) es el vecotr \(\boldsymbol{x}\) sin su \(i\)-ésimo término.

Definición A.10 (fdp marginal) La Función de densidad de probabilidad marginal del \(i\)-ésimo elemnto de \(\boldsymbol{X}\) se define como \[ p_{X_i}\left(x_i\right):=\sum_{\left\{x_1 \in \mathbb{R}: p_{{X_1}^{\prime}}\left(x_1\right)>0\right\}} \stackrel{p-1}{\cdots} \sum_{\left\{x_p \in \mathbb{R}: p_{X_p}\left(x_p\right)>0\right\}} p_{\boldsymbol{X}}\left(x_1, \ldots, x_i, \ldots, x_p\right) . \]

La FD, FDP y Función de distribución marginales se pueden obtener de la distribución conjunta, pero ¿se puede obtener la conjunta a partir de las marginales?

A.3 Distribución Condicional

Considramos el espacio de probabilidad \((\Omega, \mathcal{A}, \mathbb{P})\) y recordamos la definición de la probabilidad condicional de evento \(A\) dado \(B\), con \(A,B \in \mathcal{A}\) y \(\mathbb{P}(B)>0\) \[ \mathbb{P}(A \mid B):=\frac{\mathbb{P}(A \cap B )}{\mathbb{P}(B)}=\frac{\mathbb{P}(A, B)}{\mathbb{P}(B)} \]

Las distribuciones condicionales permiten responder a la siguiente pregunta: si tenemos un vector aleatorio \(\left(X_1, X_2\right)^{\top}\), lo que podemos decir sobre la aleatoriedad de \(X_2 \mid X_1=x_1\)? Las distribuciones condicionales son dependientes de tipo; lo vemos a continuación para v.a.’s continuos y discretos.

Definición A.11 (fd y FD condicionales para vectores aleatorios continuos) Dado el vector aleatorio \(\boldsymbol{X}=\left(X_1, X_2\right)^{\top}\) con función de densidad \(f_{\boldsymbol{X}}\), la función condicional de \(X_1\) dado \(X_2=x_2\), \(f_{X_2}\left(x_2\right)>0\), es la función de densidad de la variable aleatoria continua \(X_1 \mid X_2=x_2\) : \[ f_{X_1 \mid X_2=x_2}\left(x_1\right):=\frac{f_X\left(x_1, x_2\right)}{f_{X_2}\left(x_2\right)} \]

La FD condicionada de \(X_1\) dado \(X_2=x_2\) es \[ F_{X_1 \mid X_2=x_2}\left(x_1\right)=\int_{-\infty}^{x_1} f_{X_1 \mid X_2=x_2}(t) \mathrm{d}t . \]

Definición A.12 (fdp y FD condicionales para vectores aleatorios discretos) Dado el vector aleatorio \(\boldsymbol{X}=\left(X_1, X_2\right)^{\top}\) con función de densidad de probabilidad \(p_{\boldsymbol{X}}\), la FDP condicinada de \(X_1\) dado \(X_2=x_2, p_{X_2}\left(x_2\right)>0\), es también una FDP \(X_1 \mid X_2=x_2\) : \[ p_{X_1 \mid X_2=x_2}\left(x_1\right):=\frac{p_X\left(x_1, x_2\right)}{p_{X_2}\left(x_2\right)} \] La FD condicionada de \(X_1\) dado \(X_2=x_2\) es \[ F_{X_1 \mid X_2=x_2}\left(x_1\right)=\sum_{\left\{x \in \mathbb{R}: p_{X_1 \mid X_2=x_2}(x)>0, x \leq x_1\right\}} p_{X_1 \mid X_2=x_2}(x) \]

Es posible tener vectores aleatorios cuyos elementos no son todos dicretos o continuos y las definiciones anteriores se pueden extender a estos casos.

A.3.1 Independencia

Dos variables aleatorias \(X_1\) y \(X_2\) son independientes si y solo si \[ F_{\boldsymbol{X}}\left(x_1, x_2\right)=F_{X_1}\left(x_1\right) F_{X_2}\left(x_2\right), \quad \forall \ \left(x_1, x_2\right)^{\top} \in \mathbb{R}^2, \] donde \(\boldsymbol{X}=\left(X_1, X_2\right)^{\top}\). Equivalentemente:

  1. Si \(\boldsymbol{X}\) is continuo, \(X_1\) y \(X_2\) son independientes ssi \[ f_{\boldsymbol{X}}\left(x_1, x_2\right)=f_{X_1}\left(x_1\right) f_{X_2}\left(x_2\right), \quad \forall\ \left(x_1, x_2\right)^{\top} \in \mathbb{R}^2 \]
  2. Si \(\boldsymbol{X}\) es discreto, \(X_1\) y \(X_2\) son independendientes ssi \[ p_{\boldsymbol{X}}\left(x_1, x_2\right)=p_{X_1}\left(x_1\right) p_{X_2}\left(x_2\right), \quad \forall \ \left(x_1, x_2\right)^{\top} \in \mathbb{R}^2 \]

Dadas las definiciones de las funciones de densidad y de densidad de probabilidad, las propiedades siguientes son equivalente a los dos casos en la definición anterior:

  1. Si \(\boldsymbol{X}\) es continuo, \(X_1\) y \(X_2\) son independientes ssi \[ f_{X_1 \mid X_2=x_2}\left(x_1\right)=f_{X_1}\left(x_1\right), \quad \forall\ \left(x_1, x_2\right)^{\top} \in \mathbb{R}^2 \]

  2. Si \(\boldsymbol{X}\) es discreto, \(X_1\) y \(X_2\) son independientes ssi \[ p_{X_1 \mid X_2=x_2}\left(x_1\right)=p_{X_1}\left(x_1\right), \quad \forall\ \left(x_1, x_2\right)^{\top} \in \mathbb{R}^2 \]

La definición de independecia se extiende a vectores aleatorios con \(\boldsymbol{p}>2\). El vector aleatorio \(\boldsymbol{X}=\left(X_1, \ldots, X_p\right)^{\top}\) tiene elementos independientes ssi \[ F_{\boldsymbol{X}}(\boldsymbol{x})=\prod_{i=1}^p F_{X_i}\left(x_i\right), \quad \forall \boldsymbol{x} \in \mathbb{R}^p \]

Si \(\boldsymbol{X}\) es continuo/discreto las equivalencias prevalecen considerando las funciones de densidad y de densidad de probabilidad marginales.

A.4 Esperanza y varianza de vectores aleatorios

Definición A.13 (Esperanza de un vector aleatorio) Dado \(\boldsymbol{X} \sim F_{\boldsymbol{X}}\) en \(\mathbb{R}^p\), su esperanza \(\mathbb{E}[\boldsymbol{X}]\) es un vector en \(\mathbb{R}^p\), definido como \[ \begin{aligned} \mathbb{E}[\boldsymbol{X}] & :=\int \boldsymbol{x} \mathrm{d} F_{\boldsymbol{X}}(\boldsymbol{x}) \\ & 1_{n= \begin{cases}\int_{\mathbb{R}^p} \boldsymbol{x} f_{\boldsymbol{X}}(\boldsymbol{x}) \mathrm{d} \boldsymbol{X}, & \text { si } \boldsymbol{X} \text { es continuo, } \\ \sum_{\left\{\boldsymbol{x} \in \mathbb{R}^p: p_{\boldsymbol{X}}(\boldsymbol{x})>0\right\}} \boldsymbol{x} p_{\boldsymbol{X}}(\boldsymbol{x}), & \text { si } \boldsymbol{X} \text { es discreto. }\end{cases} \end{aligned} \]

Se puede verificar fácilmente que \(\mathbb{E}[\boldsymbol{X}]\) es el vector de esperanza de las marginales \(\left(\mathbb{E}\left[X_1\right], \ldots, \mathbb{E}\left[X_p\right]\right)^{\top}\). Esto es, \[ \mathbb{E}[\boldsymbol{X}] =\left(\mathbb{E}\left[X_1\right], \ldots, \mathbb{E}\left[X_p\right]\right)^{\top} \]

Ejemplo:

Sea \(\boldsymbol{X}=\left(X_1, X_2\right)^{\top}\) vector aleatorio con función de densidad conjunta \(f(x, y)=e^{-(x+y)} 1_{\{x, y>0\}}\), entonces \[ \begin{aligned} \mathbb{E}[\boldsymbol{X}] & =\int_{\mathbb{R}^2}(x, y)^{\top} f(x, y) \mathrm{d} x \mathrm{~d} y \\ & =\left(\int_{\mathbb{R}^2} x f(x, y) \mathrm{d} x \mathrm{~d} y, \int_{\mathbb{R}^2} y f(x, y) \mathrm{d} x \mathrm{~d} y\right)^{\top} \\ & =\left(\int_0^{\infty} \int_0^{\infty} x e^{-(x+y)} \mathrm{d} x \mathrm{~d} y, \int_0^{\infty} \int_0^{\infty} y e^{-(x+y)} \mathrm{d} x \mathrm{~d} y\right)^{\top} \\ & =\left(\int_0^{\infty} x e^{-x} \mathrm{~d} x, \int_0^{\infty} y e^{-y} \mathrm{~d} y\right)^{\top} \\ & =(1,1)^{\top}. \end{aligned} \]

Como la esperanza es un operador lineal, en el caso multivariado se tiene la siguiente propiedad

Proposición A.4 (Linealidad de la esperanza) Si \(\boldsymbol{X}\) es un vector aleatorio en \(\mathbb{R}^p\), entonces \[ \mathbb{E}[A \boldsymbol{X}+\boldsymbol{b}]=A \mathbb{E}[\boldsymbol{X}]+\boldsymbol{b} \] para cualquier matrix \(A\) (\(q \times p\)) y cualquier \(\boldsymbol{b} \in \mathbb{R}^q\).

Calcula la esperanza de la función \(g(\boldsymbol{X})\) se puede obtener también con la “ley del estadístico inconsciente”

Proposición A.5 (Ley de estadístico inconsciente) Si \(\boldsymbol{X} \sim F_{\boldsymbol{X}}\) en \(\mathbb{R}^p\) y \(g: \mathbb{R}^p \rightarrow \mathbb{R}^q\), ent \[ \mathbb{E}[g(\boldsymbol{X})]=\int g(\boldsymbol{x}) \mathrm{d} F_{\boldsymbol{X}}(\boldsymbol{x}). \]

Ejemplo:

¿Cuál es la esperanza de \(Y=X_1X_2\), considerando que \(\boldsymbol{X} \sim \mathcal{U}([0,1] \times[0,2])\) ? En este caso \(g\left(x_1, x_2\right)=x_1 x_2\), así que \[ \begin{aligned} \mathbb{E}\left[X_1 X_2\right] & =\int_{\mathbb{R}} \int_{\mathbb{R}} x_1 x_2 f\left(x_1, x_2\right) \mathrm{d} x_1 \mathrm{~d} x_2 \\ & =\frac{1}{2} \int_0^1 \int_0^2 x_1 x_2 \mathrm{~d} x_2 \mathrm{~d} x_1 \\ & =\frac{1}{2}. \end{aligned} \]

La esperanza de \(\boldsymbol{X}\) informa sobre el “centro de masa” de su distribución. Por otro lado la “dispersión” de \(\boldsymbol{X}\), está influenciada por dos factores:

  1. la varianza de cada uno de sus componentes (varianza);
  2. la dependencia (lineal) entre componentes (covarianza).

Definición A.14 (Matriz de varianzas-covarianzas (var-cov)) La matriz de varianzas y covarianzas (varianzas-covarianzas) del vector aleatorio \(\boldsymbol{X}\) en \(\mathbb{R}^p\) se define como \[ \begin{aligned} \operatorname{Var}[\boldsymbol{X}] & :=\mathbb{E}\left[(\boldsymbol{X}-\mathbb{E}[\boldsymbol{X}])(\boldsymbol{X}-\mathbb{E}[\boldsymbol{X}])^{\top}\right] \\ & =\mathbb{E}\left[\boldsymbol{X} \boldsymbol{X}^{\top}\right]-\mathbb{E}[\boldsymbol{X}] \mathbb{E}[\boldsymbol{X}]^{\top} \end{aligned} \]

La matrix de varianzas-covariancias \(\operatorname{Var}[\boldsymbol{X}]\) también se puede expresar como \[ \operatorname{Var}[\boldsymbol{X}]=\left(\begin{array}{cccc} \operatorname{Var}\left[X_1\right] & \operatorname{Cov}\left[X_1, X_2\right] & \cdots & \operatorname{Cov}\left[X_1, X_p\right] \\ \operatorname{Cov}\left[X_2, X_1\right] & \operatorname{Var}\left[X_2\right] & \cdots & \operatorname{Cov}\left[X_2, X_p\right] \\ \vdots & \vdots & \ddots & \vdots \\ \operatorname{Cov}\left[X_p, X_1\right] & \operatorname{Cov}\left[X_p, X_2\right] & \cdots & \operatorname{Var}\left[X_p\right] \end{array}\right), \] que claralmente indica que en la diagonal la matriz tiene como elementos las varianzas marginales y en los términos fuera de la diagonal tiene las \(p(p-1) / 2\) posibles covarianzas entre pares de elementos diferentes: \[ \begin{aligned} \operatorname{Cov}\left[X_i, X_j\right] & :=\mathbb{E}\left[\left(X_i-\mathbb{E}\left[X_i\right]\right)\left(X_j-\mathbb{E}\left[X_j\right]\right)\right] \\ & =\mathbb{E}\left[X_i X_j\right]-\mathbb{E}\left[X_i\right] \mathbb{E}\left[X_j\right] \end{aligned} \] para \(i,j \in \{1,\ldots,p\}\).

La varianza es un operador cuadrático que es invariantes a translaciones de \(\boldsymbol{X}\).

Proposición A.6 (Varianza a funciones lineales) Si \(\boldsymbol{X}\) es un vector aleatorio en \(\mathbb{R}^p\), entonces \[ \operatorname{Var}[A \boldsymbol{X}+\boldsymbol{b}]=A \operatorname{Var}[\boldsymbol{X}] A^{\top} \] para cualquier matriz \(A\) (\(q \times p\)) y cualquier \(\boldsymbol{b} \in \mathbb{R}^q\).

Considerando \(\boldsymbol{A}=\left(a_1, a_2\right)\) (matriz \(1 \times 2\)), obtenmos un útil corolario.

Corolario A.1 Si \(X_1\) y \(X_2\) son dos v.a.’s y \(a_1, a_2 \in \mathbb{R}\), entonces \[ \operatorname{Var}\left[a_1 X_1+a_2 X_2\right]=a_1^2 \operatorname{Var}\left[X_1\right]+a_2^2 \operatorname{Var}\left[X_2\right]+2 a_1 a_2 \operatorname{Cov}\left[X_1, X_2\right] \]

La correlación entre dos variables aleatorias \(X_1\) and \(X_2\) se define como \[ \operatorname{Cor}\left[X_1, X_2\right]:=\frac{\operatorname{Cov}\left[X_1, X_2\right]}{\sqrt{\operatorname{Var}\left[X_1\right] \operatorname{Var}\left[X_2\right]}}. \] Esta definición se extiende a la matriz de correlación, que se define como \[ \begin{aligned} \operatorname{Cor}[\boldsymbol{X}]&:= \operatorname{diag}\left(\frac{1}{\sqrt{\operatorname{Var}[X_1]}},\cdots, \frac{1}{\sqrt{\operatorname{Var}[X_p]}}\right)\operatorname{Var}[\boldsymbol{X}]\operatorname{diag}\left(\frac{1}{\sqrt{\operatorname{Var}[X_1]}},\cdots, \frac{1}{\sqrt{\operatorname{Var}[X_p]}}\right)\\ &\\ &=\left(\begin{array}{cccc} 1 & \operatorname{Cor}\left[X_1, X_2\right] & \cdots & \operatorname{Cor}\left[X_1, X_p\right] \\ \operatorname{Cor}\left[X_2, X_1\right] & 1 & \cdots & \operatorname{Cor}\left[X_2, X_p\right] \\ \vdots & \vdots & \ddots & \vdots \\ \operatorname{Cor}\left[X_p, X_1\right] & \operatorname{Cor}\left[X_p, X_2\right] & \cdots & 1 \end{array}\right) \end{aligned} \]