Final answer:
To find the probability that a randomly chosen student from the class plays both basketball and baseball, we use the inclusion-exclusion principle and determine that 2 out of 13 students play both.
Step-by-step explanation:
The question asks for the probability that a student chosen randomly from the Algebra 2 class plays both basketball and baseball. We are told that the class has 26 students, 18 play basketball, 7 play baseball, and 5 play neither. To find the number of students who play both sports, we can use the principle of inclusion-exclusion. Adding the number who play basketball and baseball, we get 18 + 7 = 25. However, since the number of students is 26 and 5 play neither, we subtract those who play neither to get 26 - 5 = 21 students who play at least one of the sports. From the total of 25 (18 + 7) who seem to play basketball or baseball, we subtract the actual number who play at least one sport to find the number who play both: 25 - 21 = 4 students play both. Therefore, the probability that a randomly chosen student plays both is 4/26, which can be simplified to 2/13.