This concept can be generalized for the multivariate case also, i.e., Figure 1.6 and Figure 1.7.
Figure 1.6: Probability mapping from sample space to real line considering
Figure 1.7: Probability mapping from sample space to real line considering