In the given situation, the independent quantity is the average class size, and the dependent quantity is the cost of textbooks. This is because the cost of textbooks changes based on the size of the class.
So the correct identification would be:
average class size; cost