Let
denote the events that a student is male, a student is female, and a student has a phone, respectively. Then we're given



We want to determine
, which is equivalent to

By the law of total probability, we have

That is, any student belonging to
will be either male or female, and the events
and
are mutually exclusive of one another (because they are complementary). We're told that

By definition of conditional probability,

and so

So we have
