Skip to content
UoL CS Notes

Independent Random Variables

COMP111 Lectures

Random variables F and G are independent if:

P(F,G)=P(F)×P(G)

That is, for all values r and s:

P(F=r,G=s)=P(F=r)×P(G=s)

As one’s dental problems do not influence the weather, the pairs of random variables are each independent:

  • Toothache,Weather
  • Catch,Weather
  • Cavity,Weather

Example - Weather and Dental Problems

The full joint probability distribution:

P(Toothache, Catch, Cavity, Weather)

has 32 entries. It contains four tables for the dentist variables and one for the four kinds of weather.

The number of entries comes from the 2×2×2×4 of the 2 outcomes for the 4 dentist variables and the 4 outcomes of the Weather variable.

Thus we have:

  • 8 probabilities for (Weather=sunny):
    • P(Weather=sunny,Toothache=r1, Catch=r2,Cavity=r3)
  • And so on for the other three weather types.

Clearly we can make the independence assumption that for any combination of values of the random variables Toothache, Catch, Cavity, the probability for Weather. For example:

P(Weather=sunny|Toothache=r1,Catch=r2,Cavity=r3)=P(Weather=sunny)

for all r1,r2,r3{0,1}.

Thus equivalently:

P(Weather=sunny|Toothache=r1,Catch=r2,Cavity=r3)=P(Weather=sunny)×P(Toothache=r1,Catch=r2,Cavity=r3)

for all r1,r2,r3{0,1}.

This means that they are related proportionally.

We have seen that the join probability distribution

P(Weather, Toothache, Catch, Cavity)

can be written as:

P(Weather)×P(Toothache, Catch, Cavity)

The 32-element table for four variables can be constructed from one 4-element table and an 8-element table.

Independence Analysis

Unfortunately this type of independence is very rare as generally things that you want to compare are inter-related. This is especially true within a single domain. Conditional independence is much more prevalent and useful.