
William W. answered 11/11/21
Math and science made easy - learn from a retired engineer
This is a linear equation because you sell candy bars at a certain rate so the equation will fit the format "y = mx + b" where "m" is the rate you are selling them and "b" is the amount you start with.
The rate you sell them is (number of candy bars)/(time it took) but remember that you are going down in quantity. You start with 100 and you go down to 20 so the rate is actually 20 - 100 or negative 80. So m = (20 - 100)/4 = -80/4 = -20 candy bars per hour so m = -20
The number you started with is 100 so b = 100
y = mx + b becomes y = -20x + 100 or y = 100 - 20x
In this equation, "x" is the time that goes by and "y" is the number of candy bars you have. When time is zero, you have 100 candy bars: y = 100 - 20(0). And when time = 4, you have 20 candy bars: y = 100 - 20(4)
If you want, you can swap out the variables to something more appropriate maybe time could be "t" instead of "x" and maybe the number of candy bars could be "n" instead of "y" so that would mean n = 100 - 20t