# Conditional Probability

## Understanding Conditional Probability

Conditional probability is a fundamental concept in probability that helps us understand the relationship between different events. It is the probability of an event B occurring, given the knowledge that event A has already taken place. In simpler terms, event B is dependent on event A, or A serves as a prerequisite for B.

## Calculating Conditional Probability

To calculate the probability of B given A, we can use the formula P(B|A) = P(A∩B) / P(A). In this formula, P(B|A) represents the probability of B given A, P(A∩B) is the probability of both A and B occurring, and P(A) is the probability of A occurring.

For example, let's consider a class of 32 students in an international school, out of which 5 are Italian. Among these 5 Italian students, 3 are boys. If a student is chosen randomly from the class, what is the probability of that student being a boy given that they are Italian? We can calculate this as P(boy | Italian) using the formula above, which gives us a 60% chance or **0.6 probability.**

## Conditional Probability Tree Diagram

A tree diagram is a useful tool for visualizing and solving problems involving conditional probabilities. It involves drawing branches for both event A and event B, based on the probabilities of each event occurring.

For instance, let's imagine there are 10 sweets in a bag, 6 of which are strawberry and 4 of which are lemon. If we pick one sweet from the bag, eat it, and then pick another one, the probabilities will vary depending on the first sweet picked. If the first sweet was strawberry, there would be 6 strawberry and 3 lemon sweets left, whereas if the first sweet picked was lemon, there would be 5 strawberry and 4 lemon sweets remaining.

To represent this visually, we can create a tree diagram with the probabilities of picking either lemon or strawberry sweets. The first branches would be 0.6 (for strawberry) and 0.4 (for lemon). For the second pick, the probabilities would be 0.556 (for strawberry) and 0.444 (for lemon) if the first sweet picked was strawberry, and 0.667 (for strawberry) and 0.333 (for lemon) if the first sweet chosen was lemon.

## Conditional Probability Venn Diagram

Venn diagrams are another useful tool for solving conditional probability problems. They involve using the probabilities of event A, event B, and both A and B occurring to create a diagram.

For example, in a survey of 65 people regarding their ice cream preferences, 30 people said they only like chocolate, 20 said they only like vanilla, 10 said they like both, and the rest said they don't like either flavor. From this, we can determine that the probability of someone only liking chocolate is 0.462 (30/65) and the probability of someone liking both chocolate and vanilla is 0.154 (10/65). Using this information, we can create the following Venn diagram:

<