# Question about the total probability rule

Say I wanted to find the probability of someone passing an exam. Then I could condition on this by how much preparation they had done for the exam. Let $E$ be the event of someone passing an exam and $F$ the event they had done sufficient preparation. So I write $$P(E) = P(E|F)P(F) + P(E|F^c)P(F^c)$$

However, I also think you can condition on whether someone passes by numerous other reasons: if they were ill, if their dog died, bereavement, financial difficulties, other commitments... So essentially, I could write the above eqn and get an infinite amount of terms.

Is this correct and if so, how would I know in some problem what event to condition on? If not correct, why? Many thanks

-
I would use $F$ for insufficient preparation:) – Alex Dec 6 '12 at 9:33

You are absolutely correct. The whole point of the law of total probability is that you will get the same result no matter what event you decide to condition on. If you conditioned on whether the student's dog had died that day instead of whether they prepared sufficiently, your conditional probabilities would be different, but the sum would end up being exactly the same.

If you conditioned on whether they had prepared sufficiently and whether their dog had died, you would have four terms in the sum, and again each of the conditional probabilities would be different, but the sum would still end up being the same.

Suppose you could measure exactly how old someone was (so it's a continuous random variable, with an infinite number of possible values--e.g. 5,376,234.186525... seconds). Then you could condition on that. You can't write it down as a sum, because there are infinitely many (uncountably many, in fact) possible values, so you write it down as an integral instead. But the result will still end up being exactly the same.

And that's the magic of the law of total probability.

-
What do you mean by the sum is the same? Do You mean if I let E be the event that I pass, F the event my dog died and G the event that I did sufficient prep, then P(E) = P(E|F)P(F) + P(E|F^c)P(F^c) would be the same as P(E) = P(E|F)P(F) + P(E|F^c)P(F^c) + P(E|G)P(G) + P(E|G^c)P(G^c) How would the sum be the same? @Alex: Just so you know, it was not me who downvoted your answer! – CAF Dec 6 '12 at 19:49
@CAF: No, I mean that $\mathbb P(E) = \mathbb P(E|F)\mathbb P(F) + \mathbb P(E|F^c)\mathbb P(F^c)$ would be the same as $\mathbb P(E) = \mathbb P(E|G)P(G) + \mathbb P(E|G^c)\mathbb P(G^c)$. The second sum your wrote down would be equal to $2\mathbb P(E)$ – Jonathan Christensen Dec 6 '12 at 19:56
But you can condition on both simultaneously, to obtain $\mathbb P(E) = \mathbb P(E|F,G)\mathbb P(F,G) + \mathbb P(E|F^c,G)\mathbb P(F^c,G) + \mathbb P(E|F,G^c)\mathbb P(F,G^C) + \mathbb P(E|F^C,G^c)\mathbb P(F^C,G^c)$ – Jonathan Christensen Dec 6 '12 at 19:58
Basically, you can condition on whatever other event makes it easiest to calculate the probability you are interested in. – Jonathan Christensen Dec 6 '12 at 20:00
Thanks! It is now clear. – CAF Dec 6 '12 at 21:05

If your question is "what explanatory variables explain the response variable", then you should probably use some form of a regression model: GLM, linear regression, etc. Then by looking at p-values of the coefficients of response variables, you will be able to understand, whether they are different from 0 at a given level of significance, and hence the variable should be kept in the model or not.

-
I have not really come across things like GLM etc before. I would suppose that a prob for passing an exam does exist, and so I was just wondering given that there are an infinite number of reasons available, how would one get a probability for someone passing an exam? (I.e where did they stop conditioning or what did they condition on). I feel like your answer explains what is important when calculating the probability (I just haven't come across it yet). Thanks. Also, just a random question about this site: I see 2 people have voted for this question. What does that mean? – CAF Dec 6 '12 at 10:25
Second question is easier: two ppl thought that your question deserves upvoting. First question: I suggest you have a look at Generalized Linear Model (GLM). Do you have some database you need to analyze? – Alex Dec 6 '12 at 10:27
What does up vote mean? No, it was just a question that sprung to my mind when I was doing probability questions. E.g if there is an infinite amount of reasons that some event might depend on, then how to compute the probability? – CAF Dec 6 '12 at 10:53
@CAF an upvote just means they think it's an interesting question. Voting it up rewards you for asking it with reputation, and makes it more likely that other people will see it. – Jonathan Christensen Dec 6 '12 at 16:43
Why the downvote? – Alex Dec 6 '12 at 21:05