Analyzing time series data with linear regression