Jump to content

Conditional probability table

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Loraof (talk | contribs) at 22:52, 22 May 2018 (top: defining notation). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

In statistics, the conditional probability table (CPT) is defined for a set of discrete and mutually dependent random variables to demonstrate conditional probability of a single variable with respect to the others. For example, assume there are three random variables where each has states. Then, the conditional probability table of provides the conditional probability values – where the vertical bar means “given the values of” – for each of the K possible values of the variable and for each possible combination of values of This table has cells. In general, for variables with states for each of them, the CPT for any one of them has size [1]

With only two variables, a CPT can be put into matrix form. For example, the values of with k and j ranging over K values, create a K×K matrix. This matrix is a stochastic matrix since the columns sum to 1; i.e. for all j. For example, suppose that two binary variables x and y have the joint probability distribution given in this table:

x=0 x=1 P(y)
y=0 4/9 1/9 5/9
y=1 2/9 2/9 4/9
P(x) 6/9 3/9 1

Each of the four central cells shows the probability of a particular combination of x and y values. The first column sum is the probability that x =0 and y equals any of the values it can have – that is, the column sum 6/9 is the marginal probability that x=0. If we want to find the probability that y=0 given that x=0, we compute the fraction of the probabilities in the x=0 column that have the value y=0, which is 4/9 ÷ 6/9 = 4/6. Likewise, in the same column we find that the probability that y=1 given that x=0 is 2/9 ÷ 6/9 = 2/6. In the same way, we can also find the conditional probabilities for y equalling 0 or 1 given that x=1. Combining these pieces of information gives us this table of conditional probabilities for y:

x=0 x=1
P(y=0 given x) 4/6 1/3
P(y=1 given x) 2/6 2/3
Sum 1 1

References

  1. ^ Murphy, KP (2012). Machine learning: a probabilistic perspective. The MIT Press.