Reservoir forecasting based on statistical functional analysis of data and prediction variables