I have a very long dataset and I'm trying to reduce it by grouping the data in periods of 24 hours. In this way, there will be a single data point that represents that day, but they must yield the same (or a good approximation)
b coefficients when I fit a line with
y = ax + b. I thought about taking the mean of each group, or the median, or perhaps the centroid, but I'm not sure which metric would be appropriate.
Another reason to reduce my dataset is to plot it faster, as of today it takes much longer than I can afford.
To summarize: as in the image below I have the grey points and need to group them and find the orange squares that would provide the same line when I perform a linear regression.