The table shows the amount of pet food in cups remaining in an automatic feeder as a function of the number of meals the feeder has dispensed.

Number of meals dispensed, n:1,3,6,7
Amount of Pet Food Remaining, f(n) (cups):21,15,6,3

Based on the table, which function models this situation?

A linear function models this situation. We can find the rate of change by calculating the difference in the amounts of pet food remaining divided by the difference in the number of meals.

(21-15)/(3-1) = 6/2 = 3 cups per meal

(15-6)/(6-3) = 9/3 = 3 cups per meal

(6-3)/(7-6) = 3/1 = 3 cups per meal

Therefore, the function that models this situation is f(n) = 24 - 3n.