In a certain Algebra 2 class of 29 students, 18 of them play basketball and 5 of them play baseball. There are 9 students who play neither sport. What is the probability that a student chosen randomly from the class plays basketball or baseball?

We can start by using the formula:

P(B or C) = P(B) + P(C) - P(B and C)

where B represents the event of playing basketball, C represents the event of playing baseball, and P(B and C) represents the probability of playing both sports.

We know that there are 18 students who play basketball and 5 students who play baseball. However, we don't know how many students play both sports. Let's call this number x.

Using a Venn diagram, we can set up the following equation:

18 - x x 5 - x
B only B and C C only

We also know that there are 9 students who play neither sport, so:

B only + B and C + C only + neither = 29
18 - x + x + 5 - x + 9 = 29
22 - x = 29
x = 7

Therefore, there are 7 students who play both basketball and baseball.

Now we can calculate the probability of a student chosen randomly from the class playing basketball or baseball:

P(B or C) = P(B) + P(C) - P(B and C)
P(B or C) = 18/29 + 5/29 - 7/29
P(B or C) = 16/29

So the probability of a student chosen randomly playing basketball or baseball is 16/29 or approximately 0.55.