Of a class of 100 students 80 attend lectures.
The whole class is made to sit a multiple-choice test.
On the first question, any student who has attended lectures knows the answer.
The other students each know the answer with probability 1/2.
Any student who knows the answer gets it right.
A student who does not know, picks an answer at random from the 3 choices offered.
The teacher selects a student who has answered the first question correctly.
Show that the probability that the student attended lectures is 6/7.