How would you explain regression analysis in the context of forecasting outcomes from historical trends?