## 3 Results
After data array processing by the program code, the program plotted the cross-correlation functions and also output a numeric array (Figure 5). \begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**Groups**} & **Number of Rest** & **Average Duration of a Rest** & **Duration of Rest,** \\  & **Periods/Day** & **Period, Minutes** & **Minutes/Day** \\ \hline
1 st group (\(n\) = 37) & 12.30 \(\pm\) 0.24 * & 66.33 \(\pm\) 1.05 ** & 753.91 \(\pm\) 8.45 ** \\ \hline
2 nd group (\(n\) = 23) & 11.33 \(\pm\) 0.92 & 69.67 \(\pm\) 4.40 & 801.02 \(\pm\) 38.42 \\ \hline \hline \end{tabular}  
* \({}^{*}\) Parameters of the motor activity of cows during estrus, stress and disease.  
\end{table} 
Table 1: Main parameters of animals’ motor activity in normal conditions, during the heat and under stress or disease. Figure 5: Functions of cross-correlations between physiological indicators of cattle health and microclimate parameters. (**a**) Cross-correlation function of rumen temperature and physical activity level; (**b**) cross-correlation function of rumen temperature and rumen pH value; (**c**) cross-correlation function of rumen temperature and ambient air temperature; (**d**) cross-correlation function of rumen pH value and ambient air temperature. In order to identify functions, dependencies, and correlations, statistical processing of the data array was carried out by the method of random variables. It was performed using the Formulas (1) and (2)  
\[r_{XY}=\frac{\sum_{i=1}^{N}\left(X_{i}-\overline{X}\right)\left(Y_{i}-\overline{ Y}\right)}{\sqrt{\sum_{i=1}^{N}\left(X_{i}-\overline{X}\right)^{2}\left(Y_{i}- \overline{Y}\right)^{2}}}, \tag{1}\]  
where \(N\) is the measurements number, \(X_{i}\) and \(Y_{i}\) are results of the \(i\)th measurement, \(\overline{X}\) and \(\overline{Y}\) are average values. The normalized cross-correlation function of the random variables \(X\) and \(Y\) is an analogue of the linear correlation coefficient, with the only difference that one of the arrays is shifted several positions to the right or to the left:  
\[f(j)=\frac{\sum_{i=1}^{N-j}\left(X_{i}-\overline{X}\right)\left(Y_{i+j}- \overline{Y}\right)}{\sqrt{\sum_{i=1}^{N-j}\left(X_{i}-\overline{X}\right)^{2} \left(Y_{i+j}-\overline{Y}\right)^{2}}}, \tag{2}\]  
where \(f(j)\) is the cross-correlation function, and \(j\) is delay (in measurements number). From the analysis of the cross-correlation function on the Cheddock scale, we found that when measuring both the rumen temperature and the locomotive activity level at any given instant of time, a moderate negative correlation was observed, i.e., with a statistically significant probability, a decrease in one of the values meant an increase in the other one (Figure 6a). Figure 6: Algorithms for diseases detection. (**a**) Algorithm for the detection of nervous system diseases; (**b**) algorithm for the detection of infectious diseases; (**c**) algorithm for the detection of parasitic diseases; the blue blocks indicate algorithms’ main criteria; (**d**) the green blocks indicate for additional criteria; the red blocks indicate the end of the algorithms. For measurements of rumen temperature and rumen pH, a moderate positive correlation between the values was observed, i.e., an increase in rumen temperature was more often associated with an increase in the pH than with a decrease; however, the difference in the frequency was rather insignificant (Figure 6b). For measurements of rumen temperature and air temperature in cowshed, a remarkable negative correlation was observed, i.e., in an hour, any change in air temperature in the cowsheds had an impact on the rumen temperature (Figure 6c). For measurements of rumen pH and air temperature in the cowsheds, regardless of how they were made, i.e., simultaneously or in conditions of various delays, a moderate negative correlation was observed, i.e., the air temperature affected the rumen pH value within an hour after the measurements were taken (Figure 6d).