Given two jointly distributed random variablesandthe conditional probability distribution ofgivenis the probability distribution ofwhenis known to be a particular value.
0 
1 
2 

0 
0.05 
0.05 
0 
0.1 

1 
0.2 
0.05 
0.15 
0.4 

2 
0.1 
0.06 
0.04 
0.2 

3 
0.1 
0.08 
0.12 
0.3 

0.45 
0.24 
0.31 
1The conditional probabilities forgivenare obtained by dividing each entry by the righthandmost entry shown in bold, giving
0 
1 
2 

0 
0.1 

1 
0.4 

2 
0.2 

3 
0.3 

0.45 
0.24 
0.31 
1Note that each row sums to one.
The conditional probabilities forgivenare obtained by dividing each entry by the bottom entry in the column shown in bold, giving
0 
1 
2 

0 
0.1 

1 
0.4 

2 
0.2 

3 
0.3 

0.45 
0.24 
0.31 
1 
Note that each column sums to one.
To generalise, for discrete random variables, the conditional probability mass function ofgiven (the occurrence of) the valueofwithcan be written, using the definition of conditional probability, as:

We can write down also the probability distribution ofgiven
From these we deduce
(1)
Similarly for continuous random variables, the conditional probability density function X given the value y of Y is and the conditional probability density function ofgiven the valueof can be written as
wheregives the joint density ofandwhileforgives the marginal distribution function for
Similarly as for (1) we can write
If for discrete random variablesfor allandor for continuous random variablesoror equivalentlyfor allandthenandare independent.
As a function ofgivenis a probability and so the sum over all(or integral if it is a conditional probability density) is 1. Seen as a function offor givenit is a likelihood function, so that the sum over allneed not be 1.