Party Affiliation Example Suppose you have undertaken a random sample of voters. The following table shows the distribution of party affiliation by male voters: Number of Male Adults Party Affiliation Democrat 200 Republican 300 Other 60 Total 560 f(D) = 200/560 = 0.357 f(R) = 300/560 = 0.536 f(O) = 60/560 = .107 f(D or R) = 200/560 + 300/560 = 0.357 + 0.536 = 0.883 The following joint distribution of gender and party affiliation was found to be the following: Party Affiliation Gender Total Male Female Democrat 200 270 470 Republican 300 100 400 Other 60 70 130 Total 560 440 1000 Joint Probability Density Function [f(g,p)] of Gender (G) and Party Affiliation Party Affiliation Gender Total Male Female Democrat 0.20 0.27 0.47 Republican 0.30 0.10 0.40 Other 0.06 0.07 0.13 Total 0.56 0.44 f(D,M) = 200/1000 = 0.20 Marginal Distributions fD = f(D,M) + f(D,F) = 0.20 + 0.27 = 0.47 fO = F(O,M) + F(O,F) = 0.06 + 0.07 = 0.13 fM = F(D,M) + F(R,M) + F(O,M) = 0.20 + 0.30 + 0.06 = 0.56 Conditional Probability Density Functions Conditional probability of party affiliation given that a person is female: f(Pi | Gi = F) = f(Pi,G = F)/fF Pi f((Pi|G=F) D f(D,F)/fF = 0.27/0.44 = 0.614 R f(R,F)/fF = 0.10/0.44 = 0.227 O f(O,F)/fF = 0.07/0.44 = 0.159 Another Example of a Joint Distribution Y X 1 fY 3 9 fX 2 0.1250 0.0417 0.0833 0.25 4 0.2500 0.2500 0.0000 0.50 6 0.1250 0.0417 0.0833 0.25 0.50 0.3333 0.1667 Calculation of Expected Value of X and Y E(X) = ∑ X f x (X) = 2(0.250) + 4(0.500) + 6(0.250) = 4.625 x E(Y) = ∑ Y f Y (Y) = 1(0.50) + 3(0.333) + 9(0.167) = 3.000 Y Calculation of Covariance Matrix E(XY) = 2*1*(0.1250) + 2*3*(0.0417) + 2*9*(0.0833) + 4*1*(0.2500) + 4*3*(0.2500) + 4*9*(0.0000) + 6*1*(0.1250) + 6*3*(0.0417) + 6*9*(0.0833) = 12.0 Cov(XY) = E(XY) - E(X)E(Y) = 12.0 - (4.625)(3.000) = -1.875
© Copyright 2026 Paperzz