Passed test and did assignment: 12
Passed the test 14
Did assignment: 16
Then:
[tex]14-12=2[/tex][tex]16-12=4[/tex]Then:
[tex]2+4+12=18[/tex]There were 18 students who did something.
[tex]21-18=3[/tex]This leaves 3 people who did nothing. 12 out of the 16 who did the homework passed the test so:
[tex]\frac{12}{16}=0.75[/tex]The probability is 0.75.