In this experiment, the number of heads X is a binomial random variable:
[tex]X\sim B(0.5,3)[/tex]The number of heads can range from 0 to 3, so the sample space for X is {0, 1, 2, 3}.
The associated probability of each outcome correspond to the binomial probability:
[tex]P(X=k)=\binom{n}{k}p^k(1-p)^{n-k}[/tex]Then, we can calculate