The probability distribution of a discrete random variable can be characterized by its probability mass function (pmf). When the probability distribution of the random variable is updated, in order to consider some information that gives rise to a conditional probability distribution, then such a conditional distribution can be characterized by a conditional probability mass function.
The following is a formal definition.
Definition
      Let
      
      and
      
      be two discrete random variables. The conditional probability mass function of
      
      given
      
      is a function
      
![[eq1]](/images/conditional-probability-mass-function__5.png) such
      that
      such
      that![[eq2]](/images/conditional-probability-mass-function__6.png) for
      any
for
      any
      ,
      where
      
      is the
       conditional
      probability that
      
,
      given that
      
.
   
   In order to derive the conditional pmf of a discrete variable
   
   given the realization of another discrete variable
   
,
   we need to know their
    joint probability mass
   function
   
.
   Suppose that we are informed that
   ,
   where
   
   denotes the value taken by
   
   (called the
    realization of
   
).
   How do we take this information into account? By deriving the conditional
   probability mass function of
   .
The derivation involves two steps:
         first, we compute the
          marginal probability
         mass function of
         
         by summing the joint probability mass over the support of
         
         (i.e., the set of all its possible values, denoted by
         
):
![[eq5]](/images/conditional-probability-mass-function__22.png) 
      
         then, we compute the conditional pmf as
         follows:![[eq6]](/images/conditional-probability-mass-function__23.png) 
      
Here is an example.
   Take two discrete variables
   
   and
   
   and consider them jointly as a random
   vector
   Suppose that the support of this vector is
   ![[eq8]](/images/conditional-probability-mass-function__27.png) and
   that its joint pmf
   is
and
   that its joint pmf
   is![[eq9]](/images/conditional-probability-mass-function__28.png) 
   Let us compute the conditional pmf of
   
   given
   
.
   The support of
   
   is
   The marginal pmf of
   
   evaluated at
   
   is
![[eq11]](/images/conditional-probability-mass-function__35.png) 
   The support of
   
   is
   Therefore, the conditional pmf of
   
   conditional on
   
   is
![[eq13]](/images/conditional-probability-mass-function__40.png) 
The previous example showed how the conditional pmf can be derived from the joint pmf. We can easily do the other way around.
   If we know the marginal pmf
   
   and the conditional
   
,
   then we can multiply them and obtain the joint
   distribution:
![[eq16]](/images/conditional-probability-mass-function__43.png) 
You can find more details about the conditional probability mass function in the lecture entitled Conditional probability distributions.
Previous entry: Conditional probability density function
Next entry: Consistent estimator
Please cite as:
Taboga, Marco (2021). "Conditional probability mass function", Lectures on probability theory and mathematical statistics. Kindle Direct Publishing. Online appendix. https://www.statlect.com/glossary/conditional-probability-mass-function.
Most of the learning materials found on this website are now available in a traditional textbook format.