In a math class with 27 students, a test was given the same day that an assignment was due. There were 18 students who passed the test and 22 students who completed the assignment. There were 3 students who failed the test and also did not complete the assignment. What is the probability that a student chosen randomly from the class did not complete the homework?