# Basic Probability Question

• Jul 31st 2010, 05:18 AM
Atomic_Sheep
Basic Probability Question
Hi, I'm pondering on the following problem and I'm not quite sure how to tackle it even though it looks like I've covered this in the past.

If y is the random variable that represents the type of animal where

0 = dog
1 = elephant

how does p(x) = p(x|y=1) * p(y) + p(x|y=0) * p(0)

I'm trying to conceptually visualise what each of these parts means i.e. what does p(x|y=1) * p(y) mean? and what does p(x|y=0) * p(0) mean by themselves?

The way I see it, we are basically multiplying the distribution which defines elephants by the probability that our distribution is of an elephant but that's just obvious and doesn't outline the concept behind this multiplication which is where I'm drawing a blank. (That's right isn't it? it's the distribution of the elephant?) Is there some sort of visual representation that would show this? I think I'm better at understanding this stuff if I see a graph or something but really, I'd be very appreciative of any form of explanation.
• Jul 31st 2010, 05:39 AM
Quote:

Originally Posted by Atomic_Sheep
Hi, I'm pondering on the following problem and I'm not quite sure how to tackle it even though it looks like I've covered this in the past.

If y is the random variable that represents the type of animal where

0 = dog
1 = elephant

how does p(x) = p(x|y=1) * p(y) + p(x|y=0) * p(0)

I'm trying to conceptually visualise what each of these parts means i.e. what does p(x|y=1) * p(y) mean? and what does p(x|y=0) * p(0) mean by themselves?

The way I see it, we are basically multiplying the distribution which defines elephants by the probability that our distribution is of an elephant but that's just obvious and doesn't outline the concept behind this multiplication which is where I'm drawing a blank. (That's right isn't it? it's the distribution of the elephant?) Is there some sort of visual representation that would show this? I think I'm better at understanding this stuff if I see a graph or something but really, I'd be very appreciative of any form of explanation.

Is X meant to be an unknown or it's a piece of information that you missed ?
• Jul 31st 2010, 08:17 AM
ecnanif
What you have written is the law of total probability.
Since you do not mention what $X$ is, I just assume itīs a general random variable.

You sum over all the possibilities.

(Suppose this belongs in Basic probability sub-forum)
• Jul 31st 2010, 08:36 AM
alexgnnn
0 = dog
1 = elephant

Using additivity axiom it follows that p(x) = p(x intersect 1) + p(x intersect 0)

The definition of conditional probability is p(x intersect 1) = p(x|1)*p(1) and p(x intersect 0) = p(x|0)*p(0)

And so p(x) = p(x|1)*p(1) + p(x|0)*p(0)

So you are using additivity axiom of probability and the definition of conditional probability to derive the formula.

It's called total law of probability theorem. Note: p(0) and p(1) are mutually exclusive and exhaustive. Find the diagram and read a paragraph this concept is important and well documented.