[Math] Easier way to solve conditional probability question

conditional probabilityprobability

Two digits are chosen at random from a table of random numbers containing the digits 0,1,2,…,9. Find the probability that the second number is 2, given that the sum is of the two numbers is greater than 7.

Now, thats my solution:

A = 2nd number is 3.

B = sum is greater than 7.

P(A|B) = $\frac{P(A\cap B)}{P(B)}$

$P(A\cap B)$ equals to $\frac{4}{100}$ simply by calculating all possible successful events.

In order to calculate P(B) I used complementary event $P(\overline{B})$ and then by drawing a table of all possible variations like (0,0),(0,1),(0,2),…,(7,0) found that there are 36 possible choices.

And so the answer is $\frac{1}{16}$

My question is what do I do if there are say not 10 numbers, but say 40 and we are asked to calculate similar probability of an event where the sum is greater than 28 or something. I mean there is no way to calculate it the way I did it. Is there any standart method for these kind of problems?

I apologize in advance if the answer is very simple and I just dont see it, as I'm new to this topic.

Best Answer

When we are calculating conditional probabilities by the technique you used, we need to calculate certain probabilities. There is no universal recipe for this, but let us look at the particular problem you mentioned. We have two numbers chosen, in order, "with replacement" from the set $\{0,1,\dots,39\}$. We want the probability that the sum of the first and the second is greater than $28$, that is, $29$ or more.

There are $40^2$ ordered pairs of numbers, all equally likely.

As in your calculation, it is easier to count the complement, the event that the sum is $28$ or less.

If the first is $0$, we have $29$ possibilities for the second, $0$ to $28$.

If the first is $1$, we have $28$ possibilities for the second.

This continues, until if the first is $28$, there is only one possibility for the second.

Thus the number of possibilities is $29+28+\cdots +1$. By the usual formula for the sum of an arithmetic series, the sum is $(29)(30)/2$.