80% of students passed a class. 90% of those 80% did homework. Of the 20% that didn't pass, 60% of them did the homework. What is the probability of a student having done the homework?

To calculate the probability of a student having done the homework, we need to consider two different scenarios: those who passed the class and those who did not.

First, let's determine the percentage of students who passed the class. We're given that 80% of the students passed, so the percentage of students who didn't pass would be 100% - 80% = 20%.

Next, we need to find the percentage of students who did the homework within each group.

For the students who passed the class, we know that 90% of them did the homework. So, out of the 80% who passed, the percentage who did the homework would be 80% * 90% = 72%.

For the students who didn't pass the class, we know that 60% of them did the homework. So, out of the 20% who didn't pass, the percentage who did the homework would be 20% * 60% = 12%.

Now, to calculate the overall probability of a student having done the homework, we need to consider both groups. We can add up the probabilities:

Probability (doing homework) = Probability (passed and did homework) + Probability (did not pass and did homework)
Probability (doing homework) = 72% + 12% = 84%

Therefore, the probability of a student having done the homework is 84%.