Can someone help me? I think that i misunderstood the concept of joint probabilities for independent and dependent events.

I understand that for independent events we can just multiply each random variable:

$P(X = x_{i}, Y = y_{j}) = P(X = x_{i}) \times P(Y = y_{j})$

But what happens when the events are dependent?

For example, this is from Chris Bishop book "Pattern Recognition and Machine Learning":

Imagine we have two boxes, one red and one blue, and in the red box we have 2 apples and 6 oranges, and in the blue box we have 3 apples and 1 orange. Now suppose we randomly pick one of the boxes and from that box we randomly select an item of fruit, and having observed which sort of fruit it is we replace it in the box from which it came. We could imagine repeating this process many times. Let us suppose that in so doing we pick the red box 40% of the time and we pick the blue box 60% of the time, and that when we remove an item of fruit from a box we are equally likely to select any of the pieces of fruit in the box.

I'm trying to draw the joint probability table from this example.

This is my first attempt:

     Red  |    Blue

A | $\frac{2}{12} \times \frac{4}{10}$ | $\frac{3}{12} \times \frac{6}{10}$

O | $\frac{6}{12} \times \frac{4}{10}$ | $\frac{1}{12} \times \frac{6}{10}$

Or should i consider the probabilities of fruit inside each box?

     Red  |    Blue

A | $\frac{2}{8} \times \frac{4}{10}$ | $\frac{3}{4} \times \frac{6}{10}$

O | $\frac{6}{8} \times \frac{4}{10}$ | $\frac{1}{4} \times \frac{6}{10}$


  • $\begingroup$ Please add the [self-study] tag & read its wiki. Then tell us what you understand thus far, what you've tried & where you're stuck. We'll provide hints to help you get unstuck. $\endgroup$ Oct 6, 2015 at 19:16
  • $\begingroup$ The latter joint probability matrix is correct. $\endgroup$ Oct 6, 2015 at 19:29
  • $\begingroup$ A quick check of any table of probabilities is to verify that they sum to unity. $\endgroup$
    – whuber
    Oct 6, 2015 at 19:32

1 Answer 1


To understand the joint probability distribution, you must understand the concept of conditional probabilities:

This picture describes the relation between different probabilities.

enter image description here

For your problem, let’s define the events:

Event A = Selecting an apple; A’ = Selecting an orange [as both are mutually exclusive and exhaustive events]

Event B = Selecting the Red box; B’ = Selecting the blue box [as both are mutually exclusive and exhaustive events]

The probabilities are:

P(B) = P(Selecting the Red box) = 40% = 0.4; P(B’) = P(Selecting the blue box) = 60% = 0.6

P(A|B) = P(Selecting an apple, if it is a red box) = 2/8

P(A|B’) = P(Selecting an apple, if it is a blue box) = 3/4

P(A’|B) = P(Selecting an orange, if it is a red box) = 6/8

P(A’|B’) = P(Selecting an orange, if it is a blue box) = ¼

Putting these probabilities in tabular form:

Hence, you second table is correct, it is cross checked by grand total. enter image description here

Hope it is clear now !


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.