Simple SummaryThis article studies the effect of the onset of intramammary infection (IMI) in dairy sheep on milk production, electrical conductivity (EC), SCC and milk quality, together with other physiological variation factors. In addition, it analyses the performance of different algorithms that use the variable EC of gland milk (a variable that can be automated in the milking parlour) for economic and early detection of IMI. The onset of IMI was found to cause an increase in SCC and a significant drop in production, more pronounced in bilaterally than unilaterally infected ewes, while EC was significantly higher when infection occurred bilaterally. The best algorithm for IMI detection using EC achieved 50% sensitivity and 100% specificity.AbstractThe aim of this study was to determine the effect of the onset of intramammary infection (IMI) on the electrical conductivity (EC) of ewe milk and assess the detection capability of various algorithms based on daily glandular milk EC measurement. An experiment was carried out with 26 Manchega sheep located at the farm of the Miguel Hernández University, Elche, Spain. The variables in milk from the gland (production, EC) were monitored daily for 2 weeks during the morning and evening milking; once infection was established in the gland, the variables were measured for a further 4 weeks. In addition, the SCC, sodium, potassium, chloride and milk macro-compositions were analysed. The sensitivity, specificity and positive and negative predictive values for IMI detection of different algorithms were calculated using the EC variable. It was observed that the onset of IMI resulted in an increase in SCC and a significant decrease in yield, and EC rose significantly when infection occurred bilaterally. The best results for IMI detection were obtained with the algorithm that detected deviations greater than 3σ of the conductivity ratio between collateral glands with respect to a moving average calculated with a time horizon of 10 days (50% sensitivity and 100% specificity).