Young Writers Society

Home » Forums » Community » Lounge, The » Homework Help

Conditional Probablity

Post a reply
User avatar
11 Reviews


Gender: Female
Points: 257
Reviews: 11
Fri Jan 27, 2012 10:13 pm
shloka19 says...



So this is a conditional probability question that is giving me a really hard time:
This is a sequence, and its contingency table:

C C C C C B C C C C C C B A A A A A C C C C C A A C A A B A A A B C A A A A A A
C C A A C A A A A A A A A B B C C A C A A A B B C C B A A C C C C B A A A B B A
A B C B B B C B B C B B B C C B A C A A A A B A A B A A A A C B B B B B B B B B
B B B B C A B B C C B B B B A B B B B C C B B B B B C B C A A A C C C A B B A A
B B C C C A B B B B B A B B A A C A A A B B B C B B B B B C C B B C B B B A A A
A A A A A B B B C C C C C C B B B C A A A C C A C B B B B B B B C A A B B B C C
C C C C B A B B B C C C C C C A A C C C C C C C C C C B B B B B B B B C B A C B
B A A A C B A A C C A C C C C C B B B A


A2 B2 C2
A1 54 18 17 89
B1 18 71 23 112
C1 18 23 57 98
90 112 97 299
Explanation for table: Each sequence has 300 letters total, but because the contingency table is counting the number of times that a first observed letter is followed by a second observed letter, that means are counting pairs, so there are 299 pairs. To look up the number of times that we had a pair of letters where the first was an A (i.e., A1) and the second was B (i.e., B2), we look up the corresponding cell in the contingency table; for sequence 1, ‘AB’ occurred 32 times. The yellow margin to the right sums up the total times that we saw a letter appear as the first letter in a pair (irrespective of the second), and likewise the bottom yellow margin sums up the number of times the second letter appeared irrespective of the first

Question: 3a (.5 point): Using the table for the sequence, find the marginal probabilities P(X2 = A), P(X2 = B) and P(X2 = C).

P(X2 = A) = 90/299
P(X2 = B) = 112/299
P (X2 = C) = 97/299



3b (.5 point): Suppose you followed strategy 1 and always predicted X2 = B without ever looking at X1. Of the 299 opportunities to predict X2, how often would you be right if you predict X2 = B?

P(X2 = B) = 112/299



3c (.5 point): Using the table for sequence 2, find the conditional probabilities P(X2 = A | X1 = A), P(X2 = B | X1 = B) and P(X2 = C | X1 = C).

P(X2 = A | X1 = A) = P(X2 = A and X1 = A)/ P(X1= A) = 54/89
P(X2 = B | X1 = B) = P(X2 = B and X1 = B)/ P(X1= B) = 71/112
P(X2 = C | X1 = C) = P(X2 = C and X1 = C)/ P(X1= C) = 57/98


3d (.5 point): Suppose you followed strategy 2 and predicted that X2 will be the same as X1. Use the marginal frequencies of A, B and C for sequence 2, and the conditional probabilities you just calculated (in 3c) to compute how often you would be right.

This is where I'm stuck. I have no idea what marginal probabilities they are referring to, since I already used the marginal probabilities in computing the conditional ones. Even if I manage to find that out, I have no idea whether to multiply, add or divide it with the conditional ones.

Any help would really, really be appreciated!
Thank you!
“Our greatest fear is not that we are inadequate. It is our light, not our darkness, that frightens us. We ask ourselves, ‘who am I to be brilliant, gorgeous, handsome, talented and fabulous?’ Actually, who am I not to be?”--Marianne Williamson




User avatar
714 Reviews


Gender: Female
Points: 9879
Reviews: 714
Sun Jan 29, 2012 2:01 pm
Lava says...



Hey shloka!

If I remember correctly, you'll have to convert this to a Joint probability distribution function. The exact method I don't remember sorry.
And to get the marginal probabilities you'll use the sum of each row/column to imply MP of that variable. (Sum of all MP from all rows/columns=1)

I think this is how you do it. Forgive me if I'm wrong.
I BLOG!
~
Pretending in words was too tentative, too vulnerable, too embarrassing to let anyone know.
- Ian McEwan in Atonement

sachi: influencing others since GOD KNOWS WHEN.