Example 2 Consider the example of tossing a fair coin twice. The sample space is S={ HH,HT,TH,TT} and all four outcomes are equally likely. Then we can define a random variable as follows Here .