So in conditional probability it is quoted Probability of A given B
What does the given mean?
B has occured ? Can someone explain this?
$\endgroup$ 22 Answers
$\begingroup$Here's one way I describe it to my students.
Suppose we give a survey with two questions, say "Do you support or oppose this messure?" and "Do you own a firearm?" and each response is written on one side of a slip of paper. We put all the slips in a hat. Now let's say we know the distribution of responses. We pull a random slip out of the hat and see that this respondant is for the ballot measure. But what's on the other side? We can find, based on the summary of responses, the probability that someone that favors the measure also owns a firearm.
The information we see is known and we are trying to determine something unknown. This is how conditional probability works.
Here's another explanation: draw a two-circle Venn diagram in the usual way. Label these sets A and B. Shade the intersection and ask the question "How much of A is in B?" We can interpret this as the ratio of the area of $A \cap B$ to $B$. That is, if we select a point known to be in A, what is the probability it is also in B?
$\endgroup$ $\begingroup$Yes. $B$ has occurred. And the probability of $A$ occurring is different (possibly) depending upon whether $B$ occurred.
Let's suppose $A$ is "Henry's Birthday is in January" and $B$ was "In New York City it snowed on Henry's birthday this year".
So the probability of $A$ if we don't know anything else other than the calendar should be $\frac{31}{365}$. But if we know that it was snowed in NYC this year than that changes everything.
Suppose this year it snowed: (I'm making this up). $1$ day in November. $8$ days in December, $12$ days in January. $16$ days in Feb. $5$ in March. $2$ days in April. And never in any other month.
So of the $44$ of the year it typically snows $12$ are in January so the probability of being born in January given that it was snowing in New York City the day you were born is $\frac {12}{44}$.
======
In the comments you ask "Formula states P(A and B) divided by P(B) but what's the logic behind that?"
$P(A) = \frac {\text{times A occurs}}{\text{times anything occurs}}$.
Alternatively $\text{times A occurs} = P(A)\times \text{times anything occurs}$
$P(B) = \frac {\text{times B occurs}}{\text{times anything occurs}}$.
Alternatively $\text{times B occurs} = P(B)\times \text{times anything occurs}$
And $P(A\text{ and }B)=\frac {\text{times A and B occur}}{\text{times anything occurs}}$.
Alternatively $\text{times A and B occur} = P(A\text{ and }B)\times \text{times anything occurs}$.
Okay. Now
$P(A\text{ occurred given that B occurred})= \frac{\text{the number of times A occurred when B occurred}}{\text{the total number of times B occurred}}$
But $\text{the number of times A occurred when B occurred}=\text{times A and B occur} = P(A\text{ and }B)\times \text{times anything occurs}$
And $\text{the total number of times B occurred}= P(B)\times \text{times anything occurs}$
So $P(A\text{ occurred given that B occurred})=\frac {P(A\text{ and }B)\times \text{times anything occurs}}{P(B)\times \text{times anything occurs}}= \frac {P(A\text{ and }B)}{P(B)}$
.....
In the example or rolling a TWO on a fair die given you rolled an even.
There are $6$ possible events: ONE, TWO, THREE, FOUR, FIVE, SIX. $1$ of them is rolling a TWO. $3$ of them are rolling an even: TWO, FOUR, SIX. And $1$ of them is rolling a TWO and an even.
So probability of rolling a $1$ given an even is $\frac {1\text{ event}}{3\text{ events}} =\frac 13$.
But $\frac {1\text{ event}}{3\text{ events}}=$
$\frac {1\text{ event}\times \frac 1{6 \text{ total number of events}}}{3\text{ event}\times \frac 1{6 \text{ total number of events}}}=$
$\frac {\frac{1\text{ event}}{6 \text{ total number of events}}}{\frac{3\text{ event}}{6 \text{ total number of events}}}=$ the probability of a TWO and even divided by the probability of an even.
.....
Hmm... since TWO never isn't EVEN maybe A = Prime and B = ODD. Is a better example. There are $3$ primes, TWO, THREE, FIVE. And there are $3$ ODDs; ONE, THREE, FIVE. And there is $2$ even primes. THREE, FIVE.
So $P(Prime|ODD) = \frac 23$ and $\frac {P(Prime\ and \ ODD)}{P(ODD)}=\frac {\frac 26}{\frac 36} = \frac 13$.
$\endgroup$