Final answer:
To find the probability that a student chosen randomly from the class plays basketball or baseball, we can use the principle of inclusion-exclusion. The probability can be calculated as 9/20.
Step-by-step explanation:
To find the probability that a student chosen randomly from the class plays basketball or baseball, we can use the principle of inclusion-exclusion. Let's denote the event that a student plays basketball as A and the event that a student plays baseball as B. We want to find P(A ∪ B), which can be calculated using the formula P(A ∪ B) = P(A) + P(B) - P(A ∩ B).
Given that there are 5 students who play basketball, 6 students who play baseball, and 2 students who play both sports, we can substitute these values into the formula: P(A ∪ B) = P(A) + P(B) - P(A ∩ B) = 5/20 + 6/20 - 2/20 = 9/20. Therefore, the probability that a randomly chosen student plays basketball or baseball is 9/20.