Reputation plays a crucial role in the success of e-commerce. In a commercial transaction, it is necessary to present reputation values of web services in a timely and a robust manner so as to counter the unfair ratings of malicious users. To address the time lag problem, most popular web sites use an averaging algorithm with fixed sliding windows, window size is constant and older ratings are dropped upon the arrival of new ratings. Herein, we propose a dynamic sliding window model that is capable of reflecting the reputation values yielded by the latest changes in services. Furthermore, we implement a statistical strategy to filter out unfair ratings by calculating the standard deviation of the ratings after transposing the two-dimensional linear window into the constant one-dimensional window by using linear regression. Experiments confirm the effectiveness of the proposed model, it outperforms the existing reputation system by 40% on average based on the 5 test cases examined, and also show that it can asymptotically converge to the underlying reputation value as ratings accumulate.