---
title: "Bayes: meningitis and stiff neck"
subject: "Artificial Intelligence"
chapter: 4
key: "semester_6/artificial_intelligence:meningitis-stiff-neck-bayes"
source: https://www.bctengineer.com/q/semester_6/artificial_intelligence/meningitis-stiff-neck-bayes
site: BCT Engineering
---

# Bayes: meningitis and stiff neck

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

- Asked in: 2071 Magh, 3+5 marks
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_6/artificial_intelligence/meningitis-stiff-neck-bayes
- Whole chapter: https://www.bctengineer.com/md/semester_6/artificial_intelligence/chapter-4

## Question

What is [?] network? Describe its types. A doctor knows that the disease meningitis causes the patient to have a stiff neck 50% of the time. The doctor also knows that the probability that a patient has meningitis is 1/50,000, and the probability that any patient has a stiff neck is 1/20. Find the probability that a patient with a stiff neck has meningitis.

## Short answer

Bayesian network is a directed acyclic graph with conditional probability tables for probabilistic reasoning. Types: singly connected (polytree) vs multiply connected; static vs dynamic (DBN). For meningitis: P(M|S) = P(S|M)P(M)/P(S) = 0.5 × (1/50000) / (1/20) = 0.0002 (1/5000).

## Answer

(The word in the question is read as "Bayesian (belief)" network.)

#### Bayesian network
A **Bayesian network** (belief network, causal network) is a probabilistic graphical model: a directed acyclic graph whose nodes are random variables and whose arcs show direct dependence (cause → effect). Each node has a conditional probability table P(node | parents), and the joint distribution is P(X1,...,Xn) = Π P(Xi | Parents(Xi)). It is used for reasoning under uncertainty (medical diagnosis, spam filtering, fault finding).

#### Types
1. **Based on structure**
   - *Singly connected network (polytree):* only one undirected path between any two nodes; inference is efficient (linear time).
   - *Multiply connected network:* more than one undirected path between some nodes (loops); inference is NP-hard in general.
2. **Based on time**
   - *Static Bayesian network:* variables at one point in time.
   - *Dynamic Bayesian network (DBN):* models how variables change over time (hidden Markov models are a special case).
3. **Types of reasoning** it supports: causal (cause → effect), diagnostic (effect → cause) and intercausal (explaining away).

#### Numerical problem
Let M = patient has meningitis, S = patient has a stiff neck.

Given: P(S | M) = 0.5, P(M) = 1/50000, P(S) = 1/20.

Bayes' theorem:
**P(M | S) = P(S | M) · P(M) / P(S)**

= 0.5 × (1/50000) / (1/20)

= (0.5 / 50000) × 20

= 0.00001 × 20

= **0.0002 = 1/5000**

**Answer:** the probability that a patient with a stiff neck has meningitis is 0.0002 (1 in 5000, or 0.02 %). It is small because meningitis is very rare, even though it often causes a stiff neck.

## Check yourself

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

1. What is a Bayesian network?
   A. An undirected graph of rules with IF-THEN labels
   B. A directed acyclic graph of random variables with conditional probability tables
   C. A neural network trained by backpropagation
   D. A table of joint probabilities with no graph
   Answer: B. Nodes are variables, arcs show cause to effect, and each node has P(node | parents). (Key point: Bayesian network structure)

2. What distinguishes a singly connected network (polytree) from a multiply connected one?
   A. A polytree has loops; a multiply connected network does not
   B. A polytree changes over time
   C. A polytree has only one undirected path between any two nodes
   D. A polytree has no conditional probability tables
   Answer: C. Multiple undirected paths (loops) make inference NP-hard in general; polytrees allow linear-time inference. (Key point: Singly vs multiply connected)

3. Which expression gives P(meningitis | stiff neck)?
   A. P(S|M) · P(M) / P(S)
   B. P(M|S) · P(M) / P(S)
   C. P(S|M) · P(S) / P(M)
   D. P(S|M) + P(M) - P(S)
   Answer: A. Bayes' theorem: P(M|S) = P(S|M)P(M)/P(S). (Key point: Bayes formula)

4. What is P(meningitis | stiff neck) with P(S|M)=0.5, P(M)=1/50000, P(S)=1/20?
   A. 0.5
   B. 0.00001
   C. 0.02
   D. 0.0002 (1 in 5000)
   Answer: D. 0.5 × (1/50000) ÷ (1/20) = 0.00001 × 20 = 0.0002. It is small because meningitis is very rare. (Key point: Meningitis result)

## Related in Artificial Intelligence

- [Causal net, belief network, Bayes](https://www.bctengineer.com/question.md?key=semester_6%2Fartificial_intelligence%3Acausal-net-belief-network) — Artificial Intelligence, chapter 4, asked 2×
- [Bayes: flu, measles and rash](https://www.bctengineer.com/question.md?key=semester_6%2Fartificial_intelligence%3Abayes-flu-measles-rash) — Artificial Intelligence, chapter 4

## Related in other subjects

- [Depreciation, causes; declining balance for 50,000](https://www.bctengineer.com/question.md?key=semester_6%2Fengineering_economics%3Adepreciation-causes-db-50000) — Engineering Economics, chapter 7, asked 2×
- [EVA; BCWS 9,50,000, BCWP 8,00,000, ACWP 10,00,000](https://www.bctengineer.com/question.md?key=semester_7%2Fproject_engineering%3Aeva-bcws-bcwp-actual-s73) — Project Engineering, chapter 4
- [Depreciation, causes, methods; DB schedule for 60,000](https://www.bctengineer.com/question.md?key=semester_6%2Fengineering_economics%3Adepreciation-causes-methods-60000-db) — Engineering Economics, chapter 7, asked 2×
- [PERT expected time and completion probability](https://www.bctengineer.com/question.md?key=semester_6%2Findustrial_engineering_and_management%3Apert-probability-of-completion) — Industrial Engineering and Management, chapter 3
