Because of the environmental impact of methane (CH4), it is of great interest to reduce CH4 emission of dairy cattle and selective breeding might contribute to this. However, this approach requires a rapid and inexpensive measurement technique that can be used to quantify CH4 emission for a large number of individual dairy cows. Milk infrared (IR) spectroscopy has been proposed as a predictor for CH4 emission. In this study, we investigated the feasibility of milk IR spectra to predict breath sensor-measured CH4 of 801 dairy cows on 10 commercial farms. To evaluate the prediction equation, we used random and block cross validation. Using random cross validation, we found a validation coefficient of determination (R(2)val) of 0.49, which suggests that milk IR spectra are informative in predicting CH4 emission. However, based on block cross validation, with farms as blocks, a negligible R(2)val of 0.01 was obtained, indicating that milk IR spectra cannot be used to predict CH4 emission. Random cross validation thus results in an overoptimistic view of the ability of milk IR spectra to predict CH4 emission of dairy cows. The difference between the validation strategies could be due to the confounding of farm and date of milk IR analysis, which introduces a correlation between batch effects on the IR analyses and farm-average CH4. Breath sensor-measured CH4 is strongly influenced by farm-specific conditions, which magnifies the problem. Milk IR wavenumbers from water absorption regions, which are generally considered uninformative, showed moderate accuracy (R(2)val = 0.25) when based on random cross validation, but not when based on block cross validation (R(2)val = 0.03). These results indicate, therefore, that in the current study, random cross validation results in an overoptimistic view on the ability of milk IR spectra to predict CH(4 )emission. We suggest prediction based on wavenumbers from water absorption regions as a negative control to identify potential dependence structures in the data.