We show that Kolmogorov complexity and such its estimators as universal codes (or data compression methods) can be applied for hypothesis testing in a framework of classical mathematical statistics. The methods for identity testing and nonparametric testing of serial independence for time series are suggested. AMS subject classification: 60G10, 62M07, 68Q30, 68W01, 94A29. Keywords. algorithmic complexity, algorithmic information theory, Kolmogorov complexity, universal coding, hypothesis testing, theory of computation, computational complexity.