# 2 Multiplication Rules?

Multiplication Rule : P(H1) * P(H2) I have been introduced to a new formula for computing P(A ∩ B) which is P(A ∩ B) = P(B)*P(A|B). The question in the picture is “Compute,P(M ∩ L), the probability that a customer buys both a mouse and a laptop — assign your answer to p_m_and_l.” The answer is supposed to be 32/2000. Isn’t it right to compute the probability of A and probability of B then apply the multiplication rule P(A ∩ B) = P(A) * P(B) I’m just starting to study probability. Thanks

P(A ∩ B) = P(B)*P(A|B) : this formulae is for Conditional Probability of A given B

P(A ∩ B) = P(A) * P(B) : if A and B are Independent

Hope this clarifies!

1 Like

Hi give me a moment to do the question thanks!

1 Like

Hi @timothyjapolinario so I managed to solve the question. Some of the parts were related.

Here is a screenshot of my code. Code Explanation is as follows: (Note that I used the prime `'` symbol instead of the superscript `C`, which can be used interchangeably)

``````p_ram = 0.0822
p_gl = 0.0184
p_ram_given_gl = 0.0022
`````` ``````"""For the 1st part, they are asking for GL intersect RAM.
Use the formula as shown above."""
p_gl_and_ram = p_gl * p_ram_given_gl #P(B ∩ A) = P(B) * P(A | B)
`````` ``````"""For the 2nd part, they are asking for the probability of RAM prime
given GL so use the formula from part 2/4 of the mission as above"""
# P(RAM' | GL) = 1 - P(RAM | GL) --> Rule from 2/4
p_non_ram_given_gl = 1- p_ram_given_gl
``````

P(A ∩ B) = P(B)*P(A|B) : this formulae is for Conditional Probability of A given B

``````"""For the 3rd part, they are asking for the probability of GL intersect RAM
so use the formula I mentioned earlier for conditional probability """
# P(GL ∩ RAM') = P(RAM' ∩ GL) --> P(A ∩ B) = P(B)*P(A|B)
p_gl_and_non_ram = p_gl * p_non_ram_given_gl
``````

``````"""For the last part they are asking about the probability of GL union RAM
so use the formula P(A ∪ B) = P(A) + P(B) - P(A ∩ B) """
# P(GL ∪ RAM) = P(GL) + P(RAM) - P(GL ∩ RAM)
p_gl_or_ram = p_gl + p_ram - (p_gl_and_ram) # P(A ∪ B) = P(A) + P(B) - P(A ∩ B)

``````

Hope this solves your issue and clears your doubts. If so, please mark this as the solution. Thanks!

1 Like