- Home
- Documents
- Chp 13 – Probability Exercises. Please try to do this problems without looking at the answer. When you look at the answer, you will not realize what you

prev

next

of 11

Published on

04-Jan-2016View

213Download

0

Embed Size (px)

Transcript

Chp 13 ProbabilityExercises

Please try to do this problems without looking at the answer. When you look at the answer, you will not realize what you dont understand.

First formulate what is being asked p(| ) etc.

Then work out the solution by remembering the following main rules: If you have a joint distribution, you must sum over the unmentioned (hidden) variables)Conditional probabilities may be computed by normalization, if you compute and sum the conditional probabilities of all possible outcomes given the evidence.Use Bayes formula to go between causal or diagnostic directions

Problem 1Lets start simple.

Among women some 10% is known to be left handed, while that proportion is 20% for men. What is the proportion of left-handed people in the whole population? You may assume that there are 50% men and 50% women in the general population.

Problem 1 SolutionI intentionally asked this as proportion, rather than probability, because the other parts are very easy. So we are asked to compute P(lefthanded).

P(lefthanded) = P(lefthanded,man) + P(lefthanded,woman) :R1 = P(lefthanded|man)P(man) + P(lefthanded|woman)P(woman):R2 = 0.2*0.5 + 0.10*0.5 = 0.15

R1: We are summing through the unmentioned variable in P(lefthanded).R2: We are using the relationship between joint and conditional probabilitiesNote: Please circle your final answer to help graders and make your answer clear.

Problem 2Lets make it one level more difficult.

You are given the following joint probability distribution about the weather in Istanbul. Answer the following using this table.

Problem 2What is the probability of having rain in Istanbul?

What is the probability of having sunshine when there is rain? State first as a formula.

Problem 2What is the probability of having rain in Istanbul?P(rain) = 0.01+0.10+0.05+0.14= 0.30 Notice that if you wrote this in formula, many of you would have been confused so make use of the table advantage if you have it or if you can think of it when you need to.

So can we say that about one third of the days are rainy?Yes.

Problem 2What is the probability of having sunshine when there is rain? State first as a formula (dont use the table)

Since we are asked when there is rain, you should notice that this is a given. So we are asked about P(sunny|rain).

Since we have 3 random variables altogether, we must sum over the third one.

When you sum over the hidden variable, since its value is not given (otherwise it would not be hidden), it must appear on the left hand side in all its possible alternatives (cold and cold). Thus:

P(sunny|rain) = P(sunny, cold|rain) + P(sunny, cold|rain).

Since we know that we must either have sunshine or not, it is easier to calculate P(sunny|rain) and P(sunny|rain), so that we can normalize!

But this is simply P(SunCondition|rain) where we use the random variable SunCondition that can take on two values sunny, or not sunny.

We carefully use it as uppercase to indicate that this is a variable, while the rain is given as evidence, as a shorthand for RainCondition=rainy.

We also use bold P to indicate that we are computing a probability distribution.

R1: from previous pageR2: Using Bayes ruleP(sunny|rain) = P(sunny, cold|rain) + P(sunny, cold|rain). :R1= P(sunny, cold, rain)/P(rain) + P(sunny,cold,rain)/P(rain). :R2

Similarly, P( sunny|rain) = P(sunny, cold|rain) + P(sunny, cold|rain). = P(sunny, cold, rain)/P(rain) + P(sunny,cold,rain)/P(rain).

In short, we can say that P(SunCondition|rain) = aP(SunCondition,cold,rain) + aP(SunCondition, cold,rain) Here a is 1/P(rain). Notice how we also grouped two items (blue or green together) to find the correct vector notation.

Reading these (P(sun,cold,rain), P( sunny,cold,rain) etc) off from the table, we get:P(SunCondition|rain) = a + a = a

When we normalize, we get P(SunCondition|rain) = =

If you cannot deal with the vector notation, you can compute them as much as we have (leaving a as unknown):

P(sunny|rain) = aP(sunny, cold, rain) + aP(sunny,cold,rain). =a(0.01 + 0.05)=0.6a

Similarly, P(sunny|rain) = aP(sunny, cold, rain) + aP(sunny,cold,rain) =a(0.10 + 0.14)=0.24a

Now since P(sunny|rain) + P(sunny|rain) = 1, we get (0.06+0.24)a = 1. Hence a=1/0.30

Thus normalizing your probabilities (by the a factor)P( sunny|rain)=0.06/0.30=1/5P(sunny|rain)=0.24/0.30=4/5

Now we can write it in vector notation:P(SunCondition|rain) = Circle or highlight your answer.