No, it is not a valid inference because she asked all 22 students in her science class instead of taking a sample of the students in her school. In the problem, it states that she wanted to know how many people in the school enjoyed watching reality tv shows, not just in her one class. And just because it said that 40% of the school is expected to like watching reality tv shows, doesnt mean that that is true. This might be the wrong answer, but its the only one that makes sense based on the information given