12.1: Varianza
- Page ID
- 151005
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)En el tratamiento de la expectativa matemática de una variable aleatoria real\(X\), observamos que el valor medio localiza el centro de la distribución de la masa de probabilidad inducida por\(X\) en la línea real. En esta unidad, examinamos cómo se puede utilizar la expectativa para una mayor caracterización de la distribución para\(X\). En particular, tratamos el concepto de varianza y su raíz cuadrada la desviación estándar. En unidades posteriores, mostramos cómo puede ser utilizada para caracterizar la distribución para un par\(\{X, Y\}\) considerado conjuntamente con los conceptos covarianza, y regresión lineal
Varianza
La ubicación del centro de masa para una distribución es importante, pero proporciona información limitada. Dos variables aleatorias marcadamente diferentes pueden tener el mismo valor medio. Sería útil tener una medida de la dispersión de la masa probabilística sobre la media. Entre las posibilidades, la varianza y su raíz cuadrada, la desviación estándar, se han encontrado particularmente útiles.
Definición: Varianza y Desviación Estándar
La varianza de una variable aleatoria\(X\) es el cuadrado medio de su variación sobre el valor medio:
\(\text{Var } [X] = \sigma_X^2 = E[(X - \mu_X)^2]\)donde\(\mu_X = E[X]\)
La desviación estándar para X es la raíz cuadrada positiva\(\sigma_X\) de la varianza.
Observaciones
- Si\(X(\omega)\) es el valor observado de\(X\), su variación de la media es\(X(\omega) - \mu_X\). La varianza es el promedio ponderado de probabilidad del cuadrado de estas varianzas.
- El cuadrado del error trata las variaciones positivas y negativas por igual, y pondera las variaciones grandes más fuertemente que las más pequeñas.
- Al igual que en el caso del valor medio, la varianza es una propiedad de la distribución, más que de la variable aleatoria.
- A continuación mostramos que la desviación estándar es una medida “natural” de la variación de la media.
- En el tratamiento de la expectativa matemática, demostramos que
\(E[(X - c)^2]\)es un mínimo de descuento\(c = E[X]\), en cuyo caso\(E[(X - E[X])^2] = E[X^2] - E^2[X]\)
Esto demuestra que el valor medio es la constante que mejor se aproxima a la variable aleatoria, en el sentido cuadrático medio.
Patrones básicos para varianza
Dado que la varianza es la expectativa de una función de la variable aleatoria X, utilizamos propiedades de expectativa en los cálculos. Además, encontramos conveniente identificar varios patrones de varianza que frecuentemente son útiles en la realización de cálculos. Por un lado, si bien la varianza se define como\(E[(X - \mu_X)^2]\), ésta no suele ser la forma más conveniente para el cálculo. El resultado citado anteriormente da una expresión alternativa.
(V1): Fórmula de cálculo. \(\text{Var } [X] = E[X^2] - E^2[X]\)
(V2): Propiedad de turno. \(\text{Var } [X + b] = \text{Var } [X]\). Agregar una constante\(b\) para\(X\) desplazar la distribución (de ahí su centro de masa) en esa cantidad. La variación de la distribución desplazada alrededor del centro de masa desplazado es la misma que la variación de la distribución original sin desplazamiento alrededor del centro de masa original.
(V3): Cambio de escala. \(\text{Var } [aX] = a^2\text{Var }[X]\). La multiplicación de\(X\) por constante a cambia la escala por un factor\([a]\). Los cuadrados de las variaciones se multiplican por\(a^2\). Así también lo es la media de los cuadrados de las variaciones.
(V4): Combinaciones lineales.
a.\(\text{Var }[aX \pm bY] = a^2\text{Var }[X] + b^2 \text{Var } [Y] \pm 2ab(E[XY] - E[X]E[Y])\)
b. De manera más general,
\(\text{Var } [\sum_{k = 1}^{n} a_k X_k] = \sum_{k = 1}^{n} a_k^2 \text{Var }[X_k] + 2\sum_{i < j} a_i a_j (E[X_i X_j] - E[X_i] E[X_j])\)
El término\(c_{ij} = E[X_i X_j] - E[X_i] E[X_j]\) es la covarianza del par\(\{X_i, X_j\}\), cuyo papel estudiamos en la unidad sobre ese tema. Si los\(c_{ij}\) son todos cero, decimos que la clase no está correlacionada.
Observaciones
- Si el par\(\{X, Y\}\) es independiente, no está correlacionado. Lo contrario no es cierto, como muestran ejemplos en la siguiente sección.
- Si el\(a_i = \pm 1\) y todos los pares no están correlacionados, entonces
\(\text{Var }[\sum_{k = 1}^{n} a_i X_i] = \sum_{k = 1}^{n} \text{Var } [X_i]\)
La varianza se suma aunque los coeficientes sean negativos.
Calculamos varianzas para algunas distribuciones comunes. Algunos detalles se omiten, generalmente detalles de manipulación algebraica o la evaluación directa de integrales. En algunos casos utilizamos sumas bien conocidas de series infinitas o valores de integrales definidas. En el Apéndice B se resumen una serie de hechos pertinentes. Algunas ayudas matemáticas. Los resultados a continuación se incluyen en la tabla del Apéndice C.
Varianzas de algunas distribuciones discretas
Función de indicador\(X = I_E P(E) = p, q = 1 - p\)\(E[X] = p\)
\(E[X^2] - E^2[X] = E[I_E^2] - p^2 = E[I_E] - p^2 = p - p^2 = p(1 - p) - pq\)
Variable aleatoria simple\(X = \sum_{i = 1}^{n} t_i I_{A_i}\) (forma primitiva)\(P(A_i) = p_i\).
\(\text{Var }[X] = \sum_{i = 1}^{n} t_i^2 p_i q_i - 2 \sum_{i < j} t_i t_j p_i p_j\), ya que\(E[I_{A_i} I_{A_j}] = 0\)\(i \ne j\)
Binomial (\(n, p\)). \(X = \sum_{i = 1}^{n} I_{E_i}\)con\(\{I_{E_i}: 1 \le i \le n\}\) iid\(P(E_i) = p\)
\(\text{Var }[X] = \sum_{i = 1}^{n} \text{Var }[I_{E_i}] = \sum_{i = 1}^{n} pq = npq\)
Geométrico (\(p\)). \(P(X = k) = pq^k\)\(\forall k \ge 0\)\(E[X] = q/p\)
Usamos un truco:\(E[X^2] = E[X(X - 1)] + E[X]\)
\(E[X^2] = p\sum_{k = 0}^{\infty} k(k - 1)q^k + q/p = pq^2 \sum_{k = 2}^{\infty} k(k - 1)q^{k - 2} + q/p = pq^2 \dfrac{2}{(1 - q)^3} + q/p = 2\dfrac{q^2}{p^2} + q/p\)
\(\text{Var }[X] = 2\dfrac{q^2}{p^2} + q/p - (q/p)^2 = q/p^2\)
Poisson (\ mu)\(P(X = k) = e^{-\mu} \dfrac{\mu^k}{k!}\)\(\forall k \ge 0\)
Usando\(E[X^2] = E[X(X - 1)] + E[X]\), tenemos
\(E[X^2] = e^{-\mu} \sum_{k = 2}^{\infty} k(k - 1) \dfrac{\mu^k}{k!} + \mu = e^{-\mu} \mu^2 \sum_{k = 2}^{\infty} \dfrac{\mu^{k - 2}}{(k - 2)!} + \mu = \mu^2 + \mu\)
Por lo tanto,\(\text{Var }[X] = \mu^2 + \mu - \mu^2 = \mu\). Tenga en cuenta que tanto la media como la varianza tienen un valor común\(\mu\)
Algunas distribuciones absolutamente continuas
Uniforme en\((a, b)f_X(t) = \dfrac{1}{b - a}\)\(a < t < b\)\(E[X] = \dfrac{a + b}{2}\)
\(E[X^2] = \dfrac{1}{b - a} \int_a^b t^2\ dt = \dfrac{b^3 - a^3}{3(b - a)}\)por lo\(\text{Var }[X] = \dfrac{b^3 - a^3}{3(b - a)} - \dfrac{(a + b)^2}{4} = \dfrac{(b - a)^2}{12}\)
Triangular simétrico\((a, b)\) Debido a la propiedad shift (V2), podemos centrar la distribución en el origen. Entonces la distribución es simétrica triangular\((-c, c)\), donde\(c = (b- a)/2\). Debido a la simetría
\(\text{Var }[X] = E[X^2] = \int_{-c}^{c} t^2f_X(t)\ dt = 2\int_{0}^{c} t^2 f_X (t)\ dt\)
Ahora bien, en este caso,
\(f_X (t) = \dfrac{c - t}{c^2}\)\(0 \le t \le c\)para que\(E[X^2] = \dfrac{2}{c^2} \int_{0}^{c} (ct^2 - t^3)\ dt = \dfrac{c^3}{6} = \dfrac{(b - a)^2}{24}\)
Exponencial (\ lambda)\(f_X (t) = \lambda e^{-\lambda t}\),\(t \ge 0\)\(E[X] = 1/\lambda\)
\(E[X^2] = \int_{0}^{\infty} \lambda t^2 e^{-\lambda t} \ dt = \dfrac{2}{\lambda^2}\)para que\(\text{Var }[X] = 1/lambda^2\)
Gamma (\(\alpha, \lambda\))\(f_{X} (t) = \dfrac{1}{\Gamma(\alpha)} \lambda^{\alpha} t^{\alpha = 1} e^{-\lambda t}\)\(t \ge 0\)\(E[X] = \dfrac{\alpha}{\lambda}\)
\(E[X^2] = \dfrac{1}{\Gamma (\alpha)} \int_{0}^{\infty} \lambda^{\alpha} t^{\alpha + 1} e^{-\lambda t}\ dt = \dfrac{\Gamma (\alpha + 2)}{\lambda^2 \Gamma(\alpha)} = \dfrac{\alpha (\alpha + 1)}{lambda^2}\)
De ahí\(\text{Var } [X] = \alpha/\lambda^2\).
Normal (\(\mu, \sigma^2\))\(E[X] = \mu\)
Considere\(Y\) ~\(N(0, 1)\),\(E[Y] = 0\),\(\text{Var }[Y] = \dfrac{2}{\sqrt{2\pi}} \int_{0}^{\infty} t^2 e^{-t^2/2} \ dt = 1\).
\(X = \sigma Y + \mu\)implica\(\text{Var }[Y] = \sigma^2\)
Extensiones de algunos ejemplos anteriores
En la unidad sobre expectativas, calculamos la media para una variedad de casos. Revisamos algunos de esos ejemplos y calculamos las varianzas.
Ejemplo\(\PageIndex{1}\) Expected winnings (Example 8 from "Mathematical Expectation: Simple Random Variables")
Un apostador hace tres apuestas a $2.00 cada una. El primero paga $10.00 con probabilidad 0.15, el segundo $8.00 con probabilidad 0.20, y el tercero $20.00 con probabilidad 0.10.
Solución
La ganancia neta puede ser expresada
\(X = 10 I_A + 8I_B + 20I_C - 6\), con\(P(A) = 0.15, P(B) = 0.20, P(C) = 0.10\)
Podemos suponer razonablemente que la clase\(\{A, B, C\}\) es independiente (esta suposición no es necesaria para calcular la media). Entonces
\(\text{Var }[X] = 10^2 P(A) [1 - P(A)] + 8^2 P(B)[1 - P(B)] + 20^2 P(C) [1 - P(C)]\)
El cálculo es sencillo. Podemos usar MATLAB para realizar la aritmética.
c = [10 8 20]; p = 0.01*[15 20 10]; q = 1 - p; VX = sum(c.^2.*p.*q) VX = 58.9900
Ejemplo\(\PageIndex{2}\) A function of \(X\) (Example 9 from "Mathematical Expectation: Simple Random Variables")
Supongamos que\(X\) en una forma primitiva es
\(X = -3I_{C_1} - I_{C_2} + 2I_{C_3} - 3I_{C_4} + 4I_{C_5} - I_{C_6} + I_{C_7} + 2I_{C_8} + 3I_{C_9} + 2I_{C_{10}}\)
con probabilidades\(P(C_i) = 0.08, 0.11, 0.06, 0.13, 0.05, 0.08, 0.12, 0.07, 0.14, 0.16\).
Vamos\(g(t) = t^2 + 2t\). Determinar\(E[g(X)]\) y\(\text{Var}[g(X)]\)
c = [-3 -1 2 -3 4 -1 1 2 3 2]; % Original coefficients pc = 0.01*[8 11 6 13 5 8 12 7 14 16]; % Probabilities for c_j G = c.^2 + 2*c % g(c_j) EG = G*pc' % Direct calculation E[g(X)] EG = 6.4200 VG = (G.^2)*pc' - EG^2; % Direct calculation Var[g(X)] VG = 40.8036 [Z,PZ] = csort(G,pc); % Distribution for Z = g(X) EZ = Z*PZ' % E[Z] EZ = 6.4200 VZ = (Z.^2)*PZ' - EZ^2 % Var[Z] VZ = 40.8036
Ejemplo\(\PageIndex{3}\) \(Z = g(X, Y)\) (Example 10 from "Mathematical Expectation: Simple Random Variables")
Usamos la misma distribución conjunta que para el Ejemplo 10 de "Expectativa Matemática: Variables Aleatorias Simples" y let\(g(t, u) = t^2 + 2tu - 3u\). Para configurar los cálculos, utilizamos jcalc.
jdemo1 % Call for data jcalc % Set up Enter JOINT PROBABILITIES (as on the plane) P Enter row matrix of VALUES of X X Enter row matrix of VALUES of Y Y Use array operations on matrices X, Y, PX, PY, t, u, and P G = t.^2 + 2*t.*u - 3*u; % calcculation of matrix of [g(t_i, u_j)] EG = total(G.*P) % Direct calculation of E[g(X,Y)] EG = 3.2529 VG = total(G.^.*P) - EG^2 % Direct calculation of Var[g(X,Y)] VG = 80.2133 [Z,PZ] = csort(G,P); % Determination of distribution for Z EZ = Z*PZ' % E[Z] from distribution EZ = 3.2529 VZ = (Z.^2)*PZ' - EZ^2 % Var[Z] from distribution VZ = 80.2133
Ejemplo\(\PageIndex{4}\) A function with compound definition (Example 12 from "Mathematical Expectation: Simple Random Variables")
Supongamos\ (X) ~ exponencial (0.3). Let
\(Z = \begin{cases} X^2 & \text{for } X \le 4 \\ 16 & \text{for } X > 4 \end{cases} = I_{[0,4]} (X) X^2 + I_{(4, \infty]} (X) 16\)
Determinar\(E[Z]\) y\(Var[Z]\).
Solución Analítica
\(E[g(X)] = \int g(t) f_X(t)\ dt = \int_{0}^{\infty} I_{[0, 4]} (t) t^2 0.3 e^{-0.3t}\ dt + 16 E[I_{(4, \infty]} (X)]\)
\(= \int_{0}^{4} t^2 0.3 e^{-0.3t} \ dt + 16 P(X > 4) \approx 7.4972\)(por Maple)
\(Z^2 - I_{[0, 4]} (X) X^4 + I_{(4, \infty]} (X) 256\)
\(E[Z^2] = \int_{0}^{\infty} I_{[0,4]} (t) t^4 0.3 e^{-0.3t}\ dt + 256 E[I_{(4, \infty]} (X)] = \int_{0}^{4} t^4 0.3 e^{-0.3t}\ dt + 256 e^{-1.2} \approx 100.0562\)
\(\text{Var } [Z] = E[Z^2] - E^2[Z] \approx 43.8486\)(por Maple)
APROXIMACIÓN
Para obtener una aproximación simple, debemos aproximar por una variable aleatoria acotada. Ya que\(P(X > 50) = e^{-15} \approx 3 \cdot 10^{-7}\) podemos truncar con seguridad\(X\) a los 50.
tuappr Enter matrix [a b] of x-range endpoints [0 50] Enter number of x approximation points 1000 Enter density as a function of t 0.3*exp(-0.3*t) Use row matrices X and PX as in the simple case M = X <= 4; G = M.*X.^2 + 16*(1 - M); % g(X) EG = G*PX' % E[g(X)] EG = 7.4972 VG = (G.^2)*PX' - EG^2 % Var[g(X)] VG = 43.8472 % Theoretical = 43.8486 [Z,PZ] = csort(G,PX); % Distribution for Z = g(X) EZ = Z*PZ' % E[Z] from distribution EZ = 7.4972 VZ = (Z.^2)*PZ' - EZ^2 % Var[Z] VZ = 43.8472
Ejemplo\(\PageIndex{5}\) Stocking for random demand (Example 13 from "Mathematical Expectation: Simple Random Variables")
El gerente de una tienda departamental está planeando para la temporada navideña. Un determinado artículo cuesta\(c\) dólares por unidad y se vende por\(p\) dólares por unidad. Si la demanda excede el monto\(m\) solicitado, las unidades adicionales pueden pedirse especiales por\(s\) dólares por unidad (\(s >c\)). Si la demanda es inferior a la cantidad pedida, las existencias restantes pueden ser devueltas (o de otro modo enajenadas) a\(r\) dólares por unidad (\(r < c\)). Se supone que la demanda\(D\) para la temporada es una variable aleatoria con distribución de Poisson (\(\mu\)). Supongamos\(\mu = 50\)\(c = 30\),\(p = 50\),,\(s = 40\),\(r = 20\). ¿Qué cantidad\(m\) debe ordenar el gerente para maximizar el beneficio esperado?
Formulación de problemas
Supongamos que\(D\) es la demanda y\(X\) es la ganancia. Entonces
Para\(D \le m\),\(X = D(p - c) - (m - D)(c - r) = D(p - r) + m(r - c)\)
Para\(D > m\),\(X = m(p - c) - (D - m)(p - s) = D(p - s) + m(s - c)\)
Es conveniente escribir la expresión para\(X\) en términos de\(I_M\), dónde\(M = (-\infty, M]\). Por lo tanto
\(X = I_M (D) [D(p - r) + m(r - c)] + [1 - I_M(D)][D(p - s) + m(s - c)]\)
\(= D(p - s) + m(s - c) + I_M (D) [D(p - r) + m(r - c) - D(p - s) - m(s - c)]\)
\(D(p - s) + m(s - c) + I_M(D) (s- r)[D - m]\)
Entonces
\(E[X] = (p - s) E[D] + m(s - c) + (s - r) E[I_M(D) D] - (s - r) mE[I_M(D)]\)
Utilizamos la aproximación discreta.
APROXIMACIÓN
>> mu = 50; >> n = 100; >> t = 0:n; >> pD = ipoisson(mu,t); % Approximate distribution for D >> c = 30; >> p = 50; >> s = 40; >> r = 20; >> m = 45:55; >> for i = 1:length(m) % Step by step calculation for various m M = t<=m(i); G(i,:) = (p-s)*t + m(i)*(s-c) + (s-r)*M.*(t - m(i)); end >> EG = G*pD'; >> VG = (G.^2)*pD' - EG.^2; >> SG = sqrt(VG); >> disp([EG';VG';SG']') 1.0e+04 * 0.0931 1.1561 0.0108 0.0936 1.3117 0.0115 0.0939 1.4869 0.0122 0.0942 1.6799 0.0130 0.0943 1.8880 0.0137 0.0944 2.1075 0.0145 0.0943 2.3343 0.0153 0.0941 2.5637 0.0160 0.0938 2.7908 0.0167 0.0934 3.0112 0.0174 0.0929 3.2206 0.0179
Ejemplo\(\PageIndex{6}\) A jointly distributed pair (Example 14 from "Mathematical Expectation: Simple Random Variables")
Supongamos que el par\(\{X, Y\}\) tiene densidad de juntas\(f_{XY} (t, u) = 3u\) en la región triangular delimitada por\(u = 0\),\(u = 1 + t\),\(u = 1 - t\). Vamos\(Z = g(X, Y) = X^2 + 2XY\).
Determinar\(E[Z]\) y\(\text{Var }[Z]\).
Solución Analítica
\(E[Z] = \int \int (t^2 + 2tu) f_{XY} (t, u) \ dudt = 3\int_{-1}^{0} \int_{0}^{1 + t} u(t^2 + 2tu)\ dudt + 3 \int_{0}^{1} \int_{0}^{1 - t} u(t^2 + 2tu)\ dudt = 1/10\)
\(E[Z^2] = 3\int_{-1}^{0} \int_{0}^{1 + t} u(t^2 + 2tu)^2 \ dudt + 3\int_{0}^{1} \int_{0}^{1 - t} u(t^2 + 2tu)^2 \ dudt = 3/35\)
\(\text{Var } [Z] = E[Z^2] -E^2[Z] = 53/700 \approx 0.0757\)
APROXIMACIÓN
tuappr Enter matrix [a b] of x-range endpoints [-1 1] Enter matrix [c d] of Y-range endpoints [0 1] Enter number of X approximation points 400 Enter number of Y approximation points 200 Enter expression for joint density 3*u.*(u<=min(1+t,1-t)) Use array operations on X, Y, PX, PY, t, u, and P G = t.^2 + 2*t.*u; % g(X,Y) = X^2 + 2XY EG = total(G.*P) % E[g(X,Y)] EG = 0.1006 % Theoretical value = 1/10 VG = total(G.^2.*P) - EG^2 VG = 0.0765 % Theoretical value 53/700 = 0.757 [Z,PZ] = csort(G,P); % Distribution for Z EZ = Z*PZ' % E[Z] from distribution EZ = 0.1006 VZ = (Z.^2)*PZ' - EZ^2 VZ = 0.0765
Ejemplo\(\PageIndex{7}\) A function with compound definition (Example 15 from "Mathematical Expectation: Simple Random Variables")
El par\(\{X, Y\}\) tiene densidad de juntas\(f_{XY} (t, u) = 1/2\) en la región cuadrada delimitada por\(u = 1 + t\),\(u = 1 - t\),\(u = 3 - t\), y\(u = t - 1\).
\(W = \begin{cases} X & \text{for max }\{X, Y\} \le 1 \\ 2Y & \text{for max } \{X, Y\} > 1 \end{cases} = I_Q(X, Y) X + I_{Q^c} (X, Y) 2Y\)
donde\(Q = \{(t, u): \text{max } \{t, u\} \le 1 \} = \{(t, u): t \le 1, u \le 1\}\).
Determinar\(E[W]\) y\(\text{Var } [W]\).
Solución
La intersección de la región\(Q\) y el cuadrado es el conjunto para el cual\(0 \le t \le 1\) y\(1 - t \le u \le 1\). La referencia a la Figura 11.3.2 muestra tres regiones de integración.
\(E[W] = \dfrac{1}{2} \int_{0}^{1} \int_{1 - t}^{1} t \ dudt + \dfrac{1}{2} \int_{0}^{1} \int_{1}^{1 + t} 2u \ dudt + \dfrac{1}{2} \int_{1}^{2} \int_{t - 1}^{3 - t} 2u\ dudt = 11/6 \approx 1.8333\)
\(E[W^2] = \dfrac{1}{2} \int_{0}^{1} \int_{1 - t}^{1} t^2\ dudt + \dfrac{1}{2} \int_{0}^{1} \int_{1}^{1 + t} 4u^2 \ dudt + \dfrac{1}{2} \int_{1}^{2} \int_{t - 1}^{3 - t} 4u^2 \ dudt = 103/24\)
\(\text{Var } [W] = 103/24 - (11/6)^2 = 67/72 \approx 0.9306\)
tuappr Enter matrix [a b] of x-range endpoints [0 2] Enter matrix [c d] of Y-range endpoints [0 2] Enter number of X approximation points 200 Enter number of Y approximation points 200 Enter expression for joint density ((u<=min(t+1,3-t))& ... (u$gt;=max(1-t,t-1))/2 Use array operations on X, Y, PX, PY, t, u, and P M = max(t,u)<=1; G = t.^M + 2*u.*(1 - M); %Z = g(X,Y) EG = total(G.*P) % E[g(X,Y)] EG = 1.8349=0 % Theoretical 11/6 = 1.8333 VG = total(G.^2.*P) - EG^2 VG = 0.9368 % Theoretical 67/72 = 0.9306 [Z,PZ] = csort(G,P); % Distribution for Z EZ = Z*PZ' % E[Z] from distribution EZ = 1.8340 VZ = (Z.^2)*PZ' - EZ^2 VZ = 0.9368
Ejemplo\(\PageIndex{8}\) A function with compound definition
\(f_{XY} (t, u) = 3\)en\(0 \le u \le t^2 \le 1\)
\(Z = I_Q (X, Y)X + I_{Q^c} (X, Y)\)para\(Q = \{(t, u): u + t \le 1\}\)
El valor\(t_0\) donde se encuentran la línea\(u = 1 - t\) y la curva\(u = t^2\) satisface\(t_0^2 = 1 - t_0\).
\(E[Z] = 3 \int_{0}^{t_0} t \int_{0}^{t^2} \ dudt + 3 \int_{t_0}^{1} t \int_{0}^{1 - t} \ dudt + 3 \int_{t_0}^{1} \int_{1 - t}^{t^2} \ dudt = \dfrac{3}{4} (5t_0 - 2)\)
Para\(E[Z^2]\) reemplazar\(t\) por\(t^2\) en los integrands para obtener\(E[Z^2] = (25t_0 - 1)/20\).
Usando\(t_0 = (\sqrt{5} - 1)/2 \approx 0.6180\), obtenemos\(\text{Var }[Z] = (2125t_0 - 1309)/80 \approx 0.0540\).
APROXIMACIÓN
% Theoretical values t0 = (sqrt(5) - 1)/2 t0 = 0.6180 EZ = (3/4)*(5*t0 - 2) EZ = 0.8176 EZ2 = (25*t0 - 1)/20 EZ2 = 0.7225 VZ = (2125*T0 - 1309)/80 VZ = 0.0540 tuappr Enter matrix [a b] of x-range endpoints [0 1] Enter matrix [c d] of Y-range endpoints [0 1] Enter number of X approximation points 200 Enter number of Y approximation points 200 Enter expression for joint density 3*(u <= t.^2) Use array operations on X, Y, t, u, and P G = (t+u <= 1).*t + (t+u > 1); EG = total(G.*P) EG = 0.8169 % Theoretical = 0.8176 VG = total(G.^2.*P) - EG^2 VG = 0.0540 % Theoretical = 0.0540 [Z,PZ] = csort(G,P); EZ = Z*PZ' EZ = 0.8169 VZ = (Z.^2)*PZ' - EZ^2 VZ = 0.0540
Desviación estándar y desigualdad de Chebyshev
En el Ejemplo 5 de "Funciones de una Variable Aleatoria”, mostramos que si\(X\) ~\(N(\mu, \sigma^2)\), entonces\(Z = \dfrac{X - \mu}{\sigma}\) ~\(N(0, 1)\). También,\(E[X] = \mu\) y\(\text{Var } [X] = \sigma^2\). Por lo tanto
\(P(\dfrac{|X - \mu|}{\sigma} \le t) = P(|X - \mu| \le t \sigma) = 2 \phi (t) - 1\)
Para la distribución normal, la desviación estándar\(\sigma\) parece ser una medida natural de la variación alejada de la media.
Para una distribución general con media\(\mu\) y varianza\(\sigma^2\), tenemos el
Desigualdad de Chebyshev
\(P(\dfrac{|X - \mu|}{\sigma} \ge a) \le \dfrac{1}{a^2}\)o\(P(|X - \mu| \ge a \sigma) \le \dfrac{1}{a^2}\)
En este caso general, la desviación estándar aparece como medida de la variación del valor medio. Esta desigualdad es útil en muchas aplicaciones teóricas así como en algunas prácticas. Sin embargo, dado que debe mantenerse para cualquier distribución que tenga varianza, el límite no es particularmente apretado. Puede ser instructivo comparar el límite sobre la probabilidad dada por la desigualdad de Chebyshev con la probabilidad real para la distribución normal.
t = 1:0.5:3; p = 2*(1 - gaussion(0.1,t)); c = ones(1,length(t))./(t.^2); r = c./p; h = [' t Chebyshev Prob Ratio']; m = [t;c;p;r]'; disp(h) t Chebyshev Prob Ratio disp(m) 1.0000 1.0000 0.3173 3.1515 1.5000 0.4444 0.1336 3.3263 2.0000 0.2500 0.0455 5.4945 2.5000 0.1600 0.0124 12.8831 3.0000 0.1111 0.0027 41.1554
— □
DERIVACIÓN DE LA DESIGUALDAD CHEBYSHEV
Vamos\(A = \{|X - \mu| \ge a \sigma\} = \{(X - \mu)^2 \ge a^2 \sigma^2\}\). Entonces\(a^2 \sigma^2 I_A \le (X - \mu)^2\).
Al tomar expectativas de ambas partes y usar la monotonicidad, tenemos
\(a^2 \sigma^2 P(A) \le E[(X - \mu)^2] = \sigma^2\)
de la que sigue inmediatamente la desigualdad de Chebyshev.
— □
Consideramos tres conceptos que son útiles en muchas situaciones.
Definición
Una variable aleatoria\(X\) está centrada iff\(E[X] = 0\).
\(X' = X - \mu\)siempre está centrado.
Definición
Una variable aleatoria\(X\) es estandarizada iff\(E[X] = 0\) y\(\text{Var} [X] = 1\).
\(X^* = \dfrac{X - \mu}{\sigma} = \dfrac{X'}{\sigma}\)está estandarizado
Definición
Un par\(\{X, Y\}\) de variables aleatorias no está correlacionado
\(E[XY] - E[X]E[Y] = 0\)
Siempre es posible derivar un par no correlacionado en función de un par\(\{X, Y\}\), ambos de los cuales tienen varianzas finitas. Considerar
\(U = (X^* + Y^*)\)\(V = (X^* - Y^*)\), donde\(X^* = \dfrac{X - \mu_X}{\sigma_X}\),\(Y^* = \dfrac{Y - \mu_Y}{\sigma_Y}\)
Ahora\(E[U] = E[V] = 0\) y
\(E[UV] = E(X^* + Y^*) (X^* - Y^*)] = E[(X^*)^2] - E[(Y^*)^2] = 1 - 1 = 0\)
por lo que el par no está correlacionado.
Ejemplo\(\PageIndex{9}\) Determining an unvorrelated pair
Usamos la distribución para Ejemplos Ejemplo 10 de "Expectativa Matemática: Variables Aleatorias Simples" y Ejemplo, para lo cual
\(E[XY] - E[X]E[Y] \ne 0\)
jdemo1 jcalc Enter JOINT PROBABILITIES (as on the plane) P Enter row matrix of VALUES of X X Enter row matrix of VALUES of Y Y Use array operations on matrices X, Y, PX, PY, t, u, and P EX = total(t.*P) EX = 0.6420 EY = total(u.*P) EY = 0.0783 EXY = total(t.*u.*P) EXY = -0.1130 c = EXY - EX*EY c = -0.1633 % {X, Y} not uncorrelated
VX = total(t.^2.*P) - EX^2 VX = 3.3016 VY = total(u.^2.*P) - EY^2 VY = 3.6566 SX = sqrt(VX) SX = 1.8170 SY = sqrt(VY) SY = 1.9122 x = (t - EX)/SX; % Standardized random variables y = (u - EY)/SY; uu = x + y; % Uncorrelated random variables vv = x - y; EUV = total(uu.*vv.*P) % Check for uncorrelated condition EUV = 9.9755e-06 % Differs from zero because of roundoff