# Predict demand, given price, if data is a list of single-item sales

Is there a way to predict demand given some price if the data, that I have, looks somewhat like this:

Date        Price
2023-01-01  100
2023-01-01  100
2023-01-01  150
2023-01-02  100
2023-01-02  102
2023-01-02  94
2023-01-02  94
2023-01-02  94
2023-01-02  94
2023-01-02  94
2023-01-02  94
2023-01-03  150
2023-01-03  100


Each row represents a single item sold at a specific date for a specific price.

As a newbie, I have only dumb ideas:

• Group by date and I'll get a list of (price, items_sold) tuples. Then linear regression.
• Group prices into several buckets, count sales. Then linear regression.
• This looks like time series data, is it? Give us some context. Aug 23, 2023 at 9:46

## 1 Answer

Your on the right track! Given your dataset, you can start by grouping the data by date and then calculate the total number of items sold on each date. This will give you a list of (date, total_items_sold) pairs. After that, you can use techniques like linear regression also remember linear regression assumes a linear relationship, so if your data shows more complex patterns, you might need to explore other regression techniques or time series forecasting methods like ARIMA or machine learning algorithms.