---
title: "Bayes: flu, measles and rash"
subject: "Artificial Intelligence"
chapter: 4
key: "semester_6/artificial_intelligence:bayes-flu-measles-rash"
source: https://www.bctengineer.com/q/semester_6/artificial_intelligence/bayes-flu-measles-rash
site: BCT Engineering
---

# Bayes: flu, measles and rash

Artificial Intelligence · Chapter 4: Knowledge Representation, Inference & Reasoning

- Asked in: 2073 Magh, 8 marks
- Video: [A doctor is called to see a sick child. The doctor knows (prior to the visit) that \( 90 \% \) o...](https://www.youtube.com/watch?v=-g0A5BVEKMk) — PW Solutions
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_6/artificial_intelligence/bayes-flu-measles-rash
- Whole chapter: https://www.bctengineer.com/md/semester_6/artificial_intelligence/chapter-4

## Question

A doctor is called to see a sick child. The doctor has prior information that 90% of sick children in that neighborhood have the flu, while the other 10% are sick with measles. Let F stand for an event of a child being sick with flu and M stand for an event of a child being sick with measles. Assume for simplicity that there are no other maladies in that neighborhood. A well-known (and common) symptom of measles is a rash and has probability of 0.95. However, very occasionally, children with flu also develop rash and has probability of 0.08. Upon examining the child, the doctor finds a rash. What is the probability that the child has measles?

## Short answer

By Bayes' theorem: P(Measles|Rash) = (0.95×0.10) / (0.95×0.10 + 0.08×0.90) = 0.095/0.167 ≈ 0.569. Probability is about 56.9%.

## Answer

**Given:** P(F) = 0.90, P(M) = 0.10, P(R | M) = 0.95, P(R | F) = 0.08. We need P(M | R) by Bayes' theorem.

#### Bayes' theorem
P(M | R) = P(R | M)·P(M) / P(R)

#### Step 1: Total probability of a rash
Only flu and measles exist, so
P(R) = P(R | M)·P(M) + P(R | F)·P(F)
= (0.95 × 0.10) + (0.08 × 0.90)
= 0.095 + 0.072
= 0.167

#### Step 2: Posterior
P(M | R) = 0.095 / 0.167 = 0.5689

#### Check
P(F | R) = 0.072 / 0.167 = 0.4311, and 0.5689 + 0.4311 = 1. 

**Answer: P(child has measles | rash) ≈ 0.569 (about 56.9%).**

Note that measles was only 10% likely before the examination, but the rash raises it to over 50% because a rash is far more likely with measles (0.95) than with flu (0.08).

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Which formula gives P(M | R)?
   A. P(R|M)P(M) / [P(R|M)P(M) + P(R|F)P(F)]
   B. P(R|M)P(F) / P(R)
   C. P(M)P(F) / P(R)
   D. P(R|M) + P(R|F)
   Answer: A. Bayes' theorem with total probability of rash as the denominator. (Key point: Formula)

2. What is P(R)?
   A. 0.095
   B. 0.167
   C. 1.03
   D. 0.072
   Answer: B. P(R) = 0.95×0.10 + 0.08×0.90 = 0.095 + 0.072 = 0.167. (Key point: Total probability)

3. What is P(measles | rash)?
   A. 0.95
   B. 0.10
   C. About 0.569
   D. About 0.431
   Answer: C. 0.095/0.167 = 0.569; the prior of 10% rises because a rash is far likelier with measles. (Key point: Posterior)

## Related in Artificial Intelligence

- [Bayes: meningitis and stiff neck](https://www.bctengineer.com/question.md?key=semester_6%2Fartificial_intelligence%3Ameningitis-stiff-neck-bayes) — Artificial Intelligence, chapter 4
- [Resolution: oversmart persons, Ram](https://www.bctengineer.com/question.md?key=semester_6%2Fartificial_intelligence%3Aresolution-oversmart-ram-naughty) — Artificial Intelligence, chapter 4

## Related in other subjects

- [Event types; airport weapon detection Bayes](https://www.bctengineer.com/question.md?key=semester_5%2Fprobability_and_statistics%3Aairport-weapon-bayes) — Probability and Statistics, chapter 1
- [Mutually exclusive vs equally likely; Bayes topper](https://www.bctengineer.com/question.md?key=semester_5%2Fprobability_and_statistics%3Abayes-top-student-electronics) — Probability and Statistics, chapter 1
- [BPT requirement; residual head at stand post](https://www.bctengineer.com/question.md?key=semester_5%2Fwater_supply_engineering%3Abpt-requirement-residual-head) — Water Supply Engineering, chapter 9
- [Hill road earthwork, 0 m to 90 m, 10/8 m widths](https://www.bctengineer.com/question.md?key=semester_7%2Festimating_and_costing%3Ahill-road-e-0-90) — Estimating and Costing, chapter 6, asked 2×
