# Conditional probability choosing from the objects

• I
• Vital
In summary: P(X | red) = P(X)P(red | X)...which is the same as P(red | X) = P(X)P(red). In summary, the problem asks for the probability of an X given that it is red. The first line of thinking calculates this correctly, but the second line of thinking gets the wrong answer because it doesn't recognize that the first space has already been covered.

#### Vital

Hello.
I am reading an online stats book, and there is the following question, which I solved incorrectly, and I think I understand what is my mistake, but I will be grateful for your explanation, if I have incorrectly detected the logic behind my mistake. I am weak at math (trying to improve it on my own - mainly the process of thinking and analyzing math problems), so I am coming here for help.)

Also, as I was analyzing my mistake, I came up with some other ones by thinking about other possible questions about choosing a red object for this particular problem. I am sorry for lengthy and a bit tangled explanation below.

Problem:
One of the following 30 items is chosen at random. What is the probability it is an X given that it is red? Put your answer in decimal form.
They give a picture, on which there are 7 red items (zeros and X's) and there are 3 red X-s. Also, there are two more colors - blue and pink, each containing Xs and 0s. The total number of X (red, blue, pink) = 13.

My solution:
I have solved the problem by first finding the probability of choosing a red object out of 30 objects:
P(red) = 7/30
And then multiplying this by the probability that X comes up out of these red ones:
P(X | red) = 3/7

Hence, the answer I gave was: P = P(red) x P(X|red) = 0.1

The book give the answer P(X | red) = 3/7 = 0.43

My explanation of my mistake - please, let me know if it is correct, or not:

(1) P = P(red) x P(X|red) = 0.1 this approach and hence the answer are wrong because

P(red) means that we first compute the probability of "taking out" one red object out of 30 objects, i.e. that is out first event.

And if then we multiply it by P(X | red), it means that we are trying to compute the second event of choosing any (not only red) X out of the now 29 objects, and, if that was a question, the correct approach would be:

P(red) x P(X | red) = (7 / 30) x (13 / 29)

But, when I wrote that, I realized that 13/29 might also be incorrect, because 7/30 might include the red X, and hence when computing the second event there might be less than 13 Xs left. Oops, I am stumbled here.

(2) On the other hand, if first we need to choose any red object, and then choose only a red X, the correct approach would be:

P(red) x P(red X | red) = (7 / 30) x (3 / 6) but here again a question - if we choose a red object in the first event and the probability is P(red) = (7 / 30), then P(red X | red) = (3 / 6) might be incorrect in the numerator as there might already be less than 3 red Xs, correct?

Thank you very much.

Vital said:
What is the probability it is an X given that it is red? ...
P(X | red) = 3/7
I don’t understand how you missed this question. The question is asking for P(X|red) and you have P(X|red) right here. Why did you go on and multiply that by anything? It seems like the problem is that you somehow didn’t recognize that you already had the answer

FactChecker
You must make a distinction between two concepts:

1) The probability of "A and B" (In the example, the probability of choosing something that is both an X and Red)

2) The probability of "A given B" (In the example, the probability of choosing an X given you have chosen an object that is red).

Your first line of thinking looks like a correct calculation for the probability of "A and B", which can be computed by ##P(A \cap B) = P(A)P(B|A) = P(B) P(A|B)##.

In a probability problem, you should always define "probability spaces" A probability space consists of a set of "outcomes" and a probability "measure" on subsets of the outcomes. There may be several probability spaces involved in a single problem.

In the problem at hand, the set of "outcomes" in the overall probability space ##S## consists of the individual choices of objects. The probability measure defined on ##S## assigns a probability measure of 1/30 to each outcome.

The probability of "An X and a red object" is the probability measure of the subset of the outcomes in ##S## consisting of the 3 red X's. This set had measure 3/30.

The phrase "The probability of an X given the object is red" refer to a different probability space than ##S##. It refers to a probability space ##S_R## whose set outcomes consist only of the red objects. The probability measure of an outcome in ##S_R## is defined by dividing the probability measure of an outcome in ##S## by the probability measure of the set ##S_R## in ##S##. The probability measure of an outcome in ##S_R## is (1/30)/(7/30) = 1/7.

The probability of the set of outcomes consisting of 3 red X's as a subset of ##S_R## is 3/7.

Conditional probability is a confusing concept because both ##P(A \cap B)## and ##P(A|B)## involve the same set of outcomes. In the problem at hand, both concepts involve finding the probability of 3 red X's. In general, both concepts involve the set ##A \cap B##. However, the two concepts ask for probabilities in different probability spaces. In computing ##P(A|B)## we consider a probability space where the only possible outcomes are those in set ##B ##. ##\ ## In computing ##P(A \cap B)## we consider a larger probability space, which may include outcomes not in set ##B##.

There are other ways to explain the distinction between ##P(A \cap B## and ##P(A|B)## anecdotally. One can tell stories about "For ##P(X | red)## you know you have chosen one of the 7 red objects so... " etc. ##\ ## Yet the fundamental mathematical reason for the distinction between ##P(A \cap B)## and ##P(A|B)## is that ##P(A|B)## is defined to involve a different probability space than ##P(A \cap B)##.

Last edited:
Vital, FactChecker and Dale
Given the item is red leaves you with 7 (red) items. Out of these 7 items, there are 3 Xs. So, the probability of selecting X given red is 3/7. If the question is what is the probability of selecting X, then you say P(X) = P(X/red)P(red) + P(X/blue)P(blue) +...

Thank you all very much for your help. I have to do much more exercises to get to grips with probability problems.

Dale

## 1. What is conditional probability?

Conditional probability is the likelihood of an event occurring given that another event has already occurred. It takes into account new information or conditions that may affect the probability of an event.

## 2. How is conditional probability calculated?

Conditional probability is calculated by dividing the probability of the intersection of two events by the probability of the first event. This can be represented as P(A|B) = P(A and B) / P(B).

## 3. What is the difference between conditional and unconditional probability?

Unconditional probability is the probability of an event occurring without taking into account any other conditions or information. Conditional probability, on the other hand, considers new information or conditions that may affect the probability of an event.

## 4. Can conditional probability be greater than unconditional probability?

Yes, it is possible for conditional probability to be greater than unconditional probability. This can occur when the new information or conditions increase the likelihood of an event occurring.

## 5. How is conditional probability used in real-life situations?

Conditional probability is commonly used in fields such as finance, medicine, and data analysis. It can be used to make predictions and decisions based on new information or conditions. For example, in medicine, conditional probability can be used to determine the likelihood of a patient having a certain disease given their symptoms and test results.