Final answer:
To find the probability that a student chosen randomly from the class plays basketball or baseball, subtract the number of students who play neither sport from the number of students who play basketball or baseball. Then, divide that number by the total number of students in the class. The probability is 0.75.
Step-by-step explanation:
To find the probability that a student chosen randomly from the class plays basketball or baseball, we need to use the concept of set theory. First, let's find the number of students who play basketball or baseball. There are 16 students who play basketball and 7 students who play baseball, but we need to subtract the 5 students who play neither sport.
The number of students who play basketball or baseball is 16 + 7 - 5 = 18. Now, we can find the probability by dividing the number of students who play basketball or baseball by the total number of students in the class. The total number of students in the class is 24.
Therefore, the probability that a student chosen randomly from the class plays basketball or baseball is 18/24 = 0.75.