4.3 Distribuições marginais

Para encontrar uma distribuição marginal, basta somar/intergrar a distribuição conjunta \(f(x,y)\) nas demais dimensões.

4.3.1 Discreta

\[\begin{equation} p(x) = \sum_{y} f(x,y) \tag{4.34} \end{equation}\]

\[\begin{equation} q(y) = \sum_{x} f(x,y) \tag{4.35} \end{equation}\]

Exemplo 4.8 Seja \((X,Y)\) uma v.a. bidimensional conforme tabela a seguir.

X/Y 0 1 2
0 10 30 100
1 20 40 50
2 30 60 60
xy <- matrix(c(10,30,100,
               20,40,50,
               30,60,60), byrow = T, nrow = 3)
rownames(xy) <- paste0('X', 0:2)
colnames(xy) <- paste0('Y', 0:2)
(XY <- addmargins(xy))
##     Y0  Y1  Y2 Sum
## X0  10  30 100 140
## X1  20  40  50 110
## X2  30  60  60 150
## Sum 60 130 210 400

As distribuições conjunta e marginais são

(pxy <- XY/sum(xy))
##        Y0    Y1    Y2   Sum
## X0  0.025 0.075 0.250 0.350
## X1  0.050 0.100 0.125 0.275
## X2  0.075 0.150 0.150 0.375
## Sum 0.150 0.325 0.525 1.000

Algumas probabilidades são

\(P(X=0) = p(0) = 0.350\)

\(P(Y=2) = q(2) = 0.525\)

\(P(X \ge 1, Y = 2) = f(1,2)+f(2,2) = 0.125 + 0.150 = 0.275\)

Conforme Eq. (4.4) o valor esperado de \(XY\) é

\(E(XY) = 0 \times 0 \times 0.025 + 0 \times 1 \times 0.075 + \cdots + 2 \times 2 \times 0.150 = 1.25\)

As esperanças marginais são

\(E(X) = 0 \times 0.350 + 1 \times 0.275 + 2 \times 0.375 = 1.025\)

\(E(Y) = 0 \times 0.150 + 1 \times 0.325 + 2 \times 0.525 = 1.375\)

# E(XY)
eg <- expand.grid(0:2,0:2)
eg$XY <- eg[,1]*eg[,2]
eg$pxy <- as.vector(pxy[-4,-4])
colnames(eg) <- c('X','Y','XY', 'pxy')
sum(eg$XY * eg$pxy)
## [1] 1.25
# E(X)
0*0.350 + 1*0.275 + 2*0.375
## [1] 1.025
# E(Y)
0*0.150 + 1*0.325 + 2*0.525
## [1] 1.375

4.3.2 Contínua

\[\begin{equation} g(x) = \int_{y} f(x,y) dy \tag{4.36} \end{equation}\]

\[\begin{equation} h(y) = \int_{x} f(x,y) dx \tag{4.37} \end{equation}\]

Exemplo 4.9 (Adaptado de (Meyer 1970, 100)) Considere \(f(x,y)=2(x+y-2xy)\), \(0 \le x \le 1\), \(0 \le y \le 1\). Pela Eq. (4.36) \[g(x) = \int_{0}^{1} 2(x+y-2xy) dy = 1, 0 \le x \le 1\] Pela Eq. (4.37) \[h(y) = \int_{0}^{1} 2(x+y-2xy) dx = 1, 0 \le y \le 1\] Assim, \(X\) e \(Y\) possuem distribuição uniforme no intervalo [0,1].

References

Meyer, Paul L. 1970. Introductory Probability and Statistical Applications. 2nd ed. Addison-Wesley Publishing Company.