Real-time detection of potential problems from animal production data is challenging, since these data do not just include chance fluctuations but reflect natural variability as well. This variability makes future observations from a specific instance of the production process hard to predict, even though a general trend may be known. Given the importance of well-established residuals for reliable detection of trend deviations, we present a new method for real-time residual calculation which aims at reducing the effects of natural variability and hence results in residuals reflecting chance fluctuations mostly. The basic idea is to exploit prior knowledge about the general expected data trend and to adapt this trend to the instance of the production process at hand as real data becomes available. We study the behavioural performance of our method by means of artificially generated and real-world data, and compare it against Bayesian linear regression.