# Probabilistic Livestock Testing

**Discrete Mathematics**Level 4

A farmer is testing a new piece of equipment he has for determining whether an animal is a cow or a sheep. If a cow walks through the machine, 90% of the time it says it is a cow and 10% of the time it says it is a sheep. If a sheep walks through the machine, 95% of the time it says it is a sheep and 5% of the time it says it is a cow. The farmer has 5 cows and 36 sheep. If an animal walks through and the machine claims it is a cow, the probability that it actually is a cow can be expressed as \(\frac{a}{b}\) where \(a\) and \(b\) are coprime numbers. What is \(a + b\)?