Final answer:
To find the probability that a student chosen randomly from the class plays basketball or baseball, use the principle of inclusion-exclusion. Number of students playing A or B = Number of students playing A + Number of students playing B - Number of students playing both A and B.
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 of playing basketball as A and the event of playing baseball as B. We are given that there are 8 students who play basketball, 9 students who play baseball, and 12 students who play neither sport. So, the total number of students who play basketball or baseball is given by the formula:
Number of students playing A or B = Number of students playing A + Number of students playing B - Number of students playing both A and B.
Substituting the given values, we have:
Number of students playing A or B = 8 + 9 - 12 = 5.
The total number of students in the class is 26, so the probability of randomly choosing a student who plays basketball or baseball is:
Probability = Number of students playing A or B / Total number of students = 5 / 26 = 0.1923 (rounded to four decimal places).