And how would I do that via computer? If this is homework, do it your self, it's not that hard. Draw it and scan it (man computer doesn't have the ability to scan things)
Given:
Total number of students = 27
Students who play basketball = 7
Student who play baseball = 18
Students who play neither sports = 7
To find:
The probability the student chosen at randomly from the class plays both basketball and base ball.
Solution:
Let the following events,
A : Student plays basketball
B : Student plays baseball
U : Union set or all students.
Then according to given information,




We know that,



Now,





It means, the number of students who play both sports is 5.
The probability the student chosen at randomly from the class plays both basketball and base ball is


Therefore, the required probability is
.
I believe the answer is 5.9