I think that "number sold" is the dependent variable, and "average price" is the independent variable. Am I right?

Yes. The amount that gets bought depends upon the price.

thanks

No, you have the roles of the dependent and independent variables reversed.

In a typical scenario, the dependent variable is the one that you want to understand or explain, while the independent variable is the one that you manipulate or control. In this case, if you are studying the relationship between the number of items sold and their average price, the number sold would be the dependent variable and the average price would be the independent variable.

To understand why, think about it this way: you are interested in finding out how the number of items sold is influenced by the average price. You can control or adjust the average price to see how it affects the number sold. Therefore, the average price becomes the independent variable, and the number sold becomes the dependent variable.