Definition (discrete random vector V). It is a map
V:Ω→Rn,ω↦V(ω)=X1(ω)⋮Xn(ω)∈Rn,
where the set of values V=V(Ω) is discrete.
Remarks.
The components of V are discrete random variables.
The case n=2 is treated to keep the notation simple; in this case V=(X,Y)T is often written.
For the time being it is not specified whether V is a row or a column vector (later: column).
The alphabet of V is V={(xy)∈R2:(xy)=(X(ω)Y(ω)) for some ω∈Ω}. In general V⊂X×Y, with strict inclusion occurring often (see the example).
Example (two 4-face dice).Ω={1,2,3,4}2, ω=(i,j) with i the face of die 1 and j the face of die 2. Let
V(ω)=(X(ω),Y(ω))=(min(i,j),j).
The alphabet of V in the (X,Y) plane (figure: dots) consists of the points with X≤Y: for Y=1 only X=1; for Y=2, X=1,2; for Y=3, X=1,2,3; for Y=4, X=1,2,3,4. It is strictly contained in X×Y={1,2,3,4}2.
Probabilistic characterization
As for random variables, giving the complete probabilistic description of the vector is equivalent to giving the probabilities of all elements of its alphabet. For notational convenience one always considers V=X×Y and assigns probability zero to the elements of X×Y that do not belong to V. The measure on X×Y induced by V is
where the comma is shorthand for ∩. These probabilities connect the measure on X×Y to the measure on Ω, but only in special cases one has access to the space Ω. In applications all the available probabilistic information will be the joint discrete density.
Definition (joint discrete density). The random vector V=(X,Y) has joint discrete density
(pXY is the alternative, preferred, notation). To completely specify (X,Y) from the probabilistic point of view it is enough to assign the numbers {pV(xi,yj):xi∈X,yj∈Y}.
xi∈X∑pV(xi,yj)=pY(yj) (marginal probability); the proof is similar to that of 3.
Joint density and marginals
To a given joint density pXY(xi,yj) there correspond two marginals pX(xi) and pY(yj) obtained by
(∗)⎩⎨⎧j=1∑∣Y∣pXY(xi,yj)=pX(xi)i=1∑∣X∣pXY(xi,yj)=pY(yj)(∣X∣ equations, one for each xi∈X)(∣Y∣ equations, one for each yj∈Y)
On the other hand, given the marginal densities pX(xi) and pY(yj) there exist infinitely many joint distributions pXY(xi,yj) compatible with the given marginals. Indeed the linear system (∗) consists of ∣Y∣+∣X∣−2 equations in the ∣X∣⋅∣Y∣−1 unknowns pXY(xi,yj) (the notes leave both counts as "why?" questions), and since ∣X∣∣Y∣−1>∣X∣+∣Y∣−2 there are in general infinitely many solutions.
Expected value of scalar functions of a random vector
Let g:R2→R and consider the random variable Z=g(X,Y) of the vector V=(X,Y).
Special case 1: g(x,y)=x+y.E(X+Y)=∑(xi+yj)pXY(xi,yj)=∑xipXY(xi,yj)+∑yjpXY(xi,yj)=xi∑xipX(xi)+yj∑yjpY(yj)=E(X)+E(Y),
using the marginals.
Special case 2: g(x,y)=xy.E(XY)=xi,yj∑xiyjpXY(xi,yj).
Example 1: two Bernoulli variables
(X,Y) has the joint density in the table (rows X, columns Y, marginals at the edge):
X\Y
0
1
pX
0
21
101
106
1
101
103
104
pY
106
104
Both X,Y∼b(0.4) and E(X)=E(Y)=0.4 (=0×0.6+1×0.4). Then
Marginals:x1∈X1∑pX1…Xn(x1,x2,…,xn)=pX2…Xn(x2,…,xn), etc., but be careful: there are now many more possible marginals. For example, with n=3, from pXYZ(xi,yj,zℓ) one can find the marginals pX,pY,pZ,pXY,pXZ,pYZ.
Example 2: expectation, covariance and density of Z=X+Y
The discrete random vector (X,Y) has density
X\Y
0
1
2
0
103
0
101
1
0
104
0
2
101
0
101
a) Compute E(X), E(Y), E(XY), cov(X,Y). b) Compute the density of Z=X+Y.
a) The marginals are
pX(0)=103+101=104, pX(1)=104, pX(2)=102, and the same for Y: pY(0)=104, pY(1)=104, pY(2)=102.
Warning: the fact that pX and pY are identical is a coincidence.
E(X)=0⋅104+1⋅104+2⋅102=108,E(Y)=108.
Flag (arithmetic slip in the source page). The handwritten page writes the result of this sum as 106 and then uses it, obtaining cov(X,Y)=10044. The sum 0+104+104 is 108; the value used here is the corrected one. A check: E(Z)=2⋅106+4⋅101=1016=E(X)+E(Y) with 108 each.
E(XY)=∑xiyjpXY(xi,yj)=1⋅1⋅104+2⋅2⋅101=108
(all other terms vanish because either xiyj=0 or pXY=0), and
cov(X,Y)=E(XY)−E(X)E(Y)=108−108⋅108=10016
(with the page's value E(X)=E(Y)=106 one would get 10044).
b) In general, if Z=g(X,Y) and Z is the alphabet of Z, the discrete density of Z is
pZ(zℓ)=xi,yjg(xi,yj)=zℓ∑pXY(xi,yj).
The computation can be organized by writing, in each cell of the table, the value of Z=X+Y in the upper left corner:
Definition.V:Ω→Rn, V=(X1,…,Xn), discrete set of values V. Its alphabet is in general strictly inside X×Y (e.g. (min(i,j),j) for two 4-face dice has X≤Y).
Joint discrete density.pXY(xi,yj)=P(X=xi,Y=yj), with ≥0 and ∑∑pXY=1; zero outside the alphabet.
Marginals.∑yjpXY(xi,yj)=pX(xi), ∑xipXY(xi,yj)=pY(yj) (proof: ⋃yj[Y=yj]=Ω). Marginals do not determine the joint: infinitely many joints share the same marginals (∣X∣+∣Y∣−2 equations, ∣X∣∣Y∣−1 unknowns). For n variables there are many marginals (for n=3: pX,pY,pZ,pXY,pXZ,pYZ).
Expectation of g(X,Y).E(g(X,Y))=∑g(xi,yj)pXY(xi,yj).
g=x+y: E(X+Y)=E(X)+E(Y) (use marginals).
g=xy: E(XY)=∑xiyjpXY(xi,yj).
Density of Z=g(X,Y).pZ(zℓ)=∑g(xi,yj)=zℓpXY(xi,yj); write z in each cell of the table and add the probabilities with the same z.
Worked results.X,Y∼b(0.4) with pXY(1,1)=103: E(XY)=103, cov=10014, var(X+Y)=10076. The 3×3 example: E(X)=E(Y)=108, E(XY)=108, cov=10016 (source page has 106 and 10044 by a slip); pZ=(103,0,106,0,101) on z=0,…,4.
Typical mistakes. Computing E(XY) from the marginals only; equal marginals do not mean equal joint structure (identical pX,pY is a coincidence); forgetting that cells with pXY=0 still belong to the grid; assuming the alphabet is the full product X×Y.