# How to do a linear regression if the independant variable will have different sample sizes?

I have time based data that is stochastically fluctuating in lower time resolutions. Moving to higher time frames, I expect to have non-stochastic behavior (that could e.g. be trend driven).

I would like to get an understanding, starting with which time resolution the stochastic behavior is not dominant anymore.

I got the advice to do a linear regression and to look at the dependence from previous samples to samples coming later. Doing this with different time frame sizes of the previous samples should lead to different R^2 values and therefore allow to understand when stochastic processes are not prevailing anymore.

So the idea would be to take previous data as the independent variable x and check how the variance of the coming dependent data y is explainable by previous information (e.g. take 10 samples at time a, a+1, a+2, ...., a+8, a+9 as variable x and check its dependence on the variable y that has samples from a+10, a+11, ...., a+18,a+19)

I wonder how I can perform this, as

1. for a linear regression analysis the sample size of x and y has to be the same.
2. I would like to have the same overall time span of x when doing the analysis for different time resolutions of x (otherwise I would expect different results of this analysis - depending whether e.g. a strong or a weak trend was ongoing).

I already thought to have different x variables like x_1, x_2, ... so that x_2 is taken from time a+0.5, a+1.5, a+2.5, a+3.5 etc.

Is this a meaningful approach?

Or is a completely different technique (instead of a linear regression) perhaps more promising?