A physics class has 40 students. Of​ these, 16 students are physics majors and 14 students are female. Of the physics​ majors, four are female. Find the probability that a randomly selected student is female or a physics major.