Dependent & independent variables | 6th grade | Khan Academy
Let's say that you love to eat apples, and you are going to buy apples. So, A is the number of apples. But you also have a budget, so you have to care about cost. Let's say C is equal to the total cost, and let's say that the price of an apple is two dollars. So, two dollars per apple.
There are several ways that we can express the relationship between the total cost and the number of apples. One way is if we solve for the total cost, and we say, "Okay, the total cost is going to be two dollars per apple times the number of apples." So, it's going to be 2A.
Another way that we could rewrite this, if we were to divide both sides of this by two, we would get that the number of apples is equal to cost over two. These are equivalent expressions. I should say, these are equivalent equations, but the way they've been written makes it useful for different scenarios.
For example, on the left-hand side here, it's really easy to try out different A's and then think about how that will affect the cost. When it's written like this, we would call the variable that it's easy to try out different values the independent variable. The one that we are essentially solving for, that we then spit out a value after we compute using the independent variable, you call that the dependent variable.
You could view it as, look, in this situation, the cost is dependent on the number of apples you choose to eat.
Now, when we wrote it over here, this looks a little bit different. Now, the number of apples is solved for, and we compute how many apples based on the cost. So, this would be a scenario where you have a budget, and you tell me what the budget is, and I could tell you the number of apples.
In this situation, C is the independent variable, and since we have solved for A, A is the dependent variable. This is useful if I give you a number of apples, and you want to know the total cost, and this is useful if you have a certain cost, and then I, and then you want to find out the number of apples.