Prediction And Statistical Inference In Feedback Loops