The paper discusses the issues related to the use of principal components analysis (PCA) in mathematical simulation. The paper significantly expands the range of the solved problems using PCA. In particular, the solutions of the following three tasks are given: (i) structural similarity and homogeneity estimation for random Gaussian vectors; (ii) recovery of missing data; (iii) the forecast of non-stationary time series based on the caterpillar method, which is a generalization of PCA for non-stationary time series. To solve the problems, to restore missing data and to predict the data, the author offers an unbiased estimation of the variance of the error of the regression on the PCs base for the cases of large and small samples. All the main statements are formulated in the form of theorems proved by the author.