foundations of computational agents
To represent a domain in a belief network, the designer of a network must consider the following questions:
What are the relevant variables? In particular, the designer must consider
what the agent may observe in the domain. Each feature that may be observed should be a variable, because the agent must be able to condition on all of its observations.
what information the agent is interested in knowing the posterior probability of. Each of these features should be made into a variable that can be queried.
other hidden variables or latent variables that will not be observed or queried but make the model simpler. These variables either account for dependencies, reduce the size of the specification of the conditional probabilities, or better model how the world is assumed to work.
What values should these variables take? This involves considering the level of detail at which the agent should reason to answer the sorts of queries that will be encountered.
For each variable, the designer should specify what it means to take each value in its domain. What must be true in the world for a (non-hidden) variable to have a particular value should satisfy the clarity principle: an omniscient agent should be able to know the value of a variable. It is a good idea to explicitly document the meaning of all variables and their possible values. The only time the designer may not want to do this for hidden variables whose values the agent will want to learn from data [see Section 10.3.2].
What is the relationship between the variables? This should be expressed by adding arcs in the graph to define the parent relation.
How does the distribution of a variable depend on its parents? This is expressed in terms of the conditional probability distributions.
Suppose you want to use the diagnostic assistant to diagnose whether there is a fire in a building and whether there has been some tampering with equipment based on noisy sensor information and possibly conflicting explanations of what could be going on. The agent receives a report from Sam about whether everyone is leaving the building. Suppose Sam’s report is noisy: Sam sometimes reports leaving when there is no exodus (a false positive), and sometimes does not report when everyone is leaving (a false negative). Suppose the leaving only depends on the fire alarm going off. Either tampering or fire could affect the alarm. Whether there is smoke only depends on whether there is fire.
Suppose we use the following variables in the following order:
${T}{}{a}{}{m}{}{p}{}{e}{}{r}{}{i}{}{n}{}{g}$ is true when there is tampering with the alarm.
${F}{}{i}{}{r}{}{e}$ is true when there is a fire.
${A}{}{l}{}{a}{}{r}{}{m}$ is true when the alarm sounds.
${S}{}{m}{}{o}{}{k}{}{e}$ is true when there is smoke.
${L}{}{e}{}{a}{}{v}{}{i}{}{n}{}{g}$ is true if there are many people leaving the building at once.
${R}{}{e}{}{p}{}{o}{}{r}{}{t}$ is true if Sam reports people leaving. ${R}{}{e}{}{p}{}{o}{}{r}{}{t}$ is false if there is no report of leaving.
Assume the following conditional independencies:
${F}{}{i}{}{r}{}{e}$ is conditionally independent of ${T}{}{a}{}{m}{}{p}{}{e}{}{r}{}{i}{}{n}{}{g}$ (given no other information).
${A}{}{l}{}{a}{}{r}{}{m}$ depends on both ${F}{}{i}{}{r}{}{e}$ and ${T}{}{a}{}{m}{}{p}{}{e}{}{r}{}{i}{}{n}{}{g}$. That is, we are making no independence assumptions about how ${A}{}{l}{}{a}{}{r}{}{m}$ depends on its predecessors given this variable ordering.
${S}{}{m}{}{o}{}{k}{}{e}$ depends only on ${F}{}{i}{}{r}{}{e}$ and is conditionally independent of ${T}{}{a}{}{m}{}{p}{}{e}{}{r}{}{i}{}{n}{}{g}$ and ${A}{}{l}{}{a}{}{r}{}{m}$ given whether there is a ${F}{}{i}{}{r}{}{e}$.
${L}{}{e}{}{a}{}{v}{}{i}{}{n}{}{g}$ only depends on ${A}{}{l}{}{a}{}{r}{}{m}$ and not directly on ${F}{}{i}{}{r}{}{e}$ or ${T}{}{a}{}{m}{}{p}{}{e}{}{r}{}{i}{}{n}{}{g}$ or ${S}{}{m}{}{o}{}{k}{}{e}$. That is, ${L}{}{e}{}{a}{}{v}{}{i}{}{n}{}{g}$ is conditionally independent of the other variables given ${A}{}{l}{}{a}{}{r}{}{m}$.
${R}{}{e}{}{p}{}{o}{}{r}{}{t}$ only directly depends on ${L}{}{e}{}{a}{}{v}{}{i}{}{n}{}{g}$.
The belief network of Figure 8.3 expresses these dependencies.
This network represents the factorization
${P}{(}{T}{a}{m}$ | ${p}{e}{r}{i}{n}{g}{,}{F}{i}{r}{e}{,}{A}{l}{a}{r}{m}{,}{S}{m}{o}{k}{e}{,}{L}{e}{a}{v}{i}{n}{g}{,}{R}{e}{p}{o}{r}{t}{)}$ | ||
${=}$ | ${P}{(}{T}{a}{m}{p}{e}{r}{i}{n}{g}{)}{*}{P}{(}{F}{i}{r}{e}{)}{*}{P}{(}{A}{l}{a}{r}{m}{\mid}{T}{a}{m}{p}{e}{r}{i}{n}{g}{,}{F}{i}{r}{e}{)}$ | ||
${*}{P}{(}{S}{m}{o}{k}{e}{\mid}{F}{i}{r}{e}{)}{*}{P}{(}{L}{e}{a}{v}{i}{n}{g}{\mid}{A}{l}{a}{r}{m}{)}{*}{P}{(}{R}{e}{p}{o}{r}{t}{\mid}{L}{e}{a}{v}{i}{n}{g}{)}{.}$ |
Note that the alarm is not a smoke alarm, which would affected by the smoke, and not directly by the fire, but rather is a heat alarm that is directly affected by the fire. This is made explicit in the model in that the ${A}{\mathit{}}{l}{\mathit{}}{a}{\mathit{}}{r}{\mathit{}}{m}$ is independent of ${S}{\mathit{}}{m}{\mathit{}}{o}{\mathit{}}{k}{\mathit{}}{e}$ given ${F}{\mathit{}}{i}{\mathit{}}{r}{\mathit{}}{e}$.
We also must define the domain of each variable. Assume that the variables are Boolean; that is, they have domain ${\mathrm{\{}}{t}{\mathit{}}{r}{\mathit{}}{u}{\mathit{}}{e}{\mathrm{,}}{f}{\mathit{}}{a}{\mathit{}}{l}{\mathit{}}{s}{\mathit{}}{e}{\mathrm{\}}}$. We use the lower-case variant of the variable to represent the true value and use negation for the false value. Thus, for example, ${T}{\mathit{}}{a}{\mathit{}}{m}{\mathit{}}{p}{\mathit{}}{e}{\mathit{}}{r}{\mathit{}}{i}{\mathit{}}{n}{\mathit{}}{g}{\mathrm{=}}{t}{\mathit{}}{r}{\mathit{}}{u}{\mathit{}}{e}$ is written as ${t}{\mathit{}}{a}{\mathit{}}{m}{\mathit{}}{p}{\mathit{}}{e}{\mathit{}}{r}{\mathit{}}{i}{\mathit{}}{n}{\mathit{}}{g}$, and ${T}{\mathit{}}{a}{\mathit{}}{m}{\mathit{}}{p}{\mathit{}}{e}{\mathit{}}{r}{\mathit{}}{i}{\mathit{}}{n}{\mathit{}}{g}{\mathrm{=}}{f}{\mathit{}}{a}{\mathit{}}{l}{\mathit{}}{s}{\mathit{}}{e}$ is written as ${\mathrm{\neg}}{\mathit{}}{t}{\mathit{}}{a}{\mathit{}}{m}{\mathit{}}{p}{\mathit{}}{e}{\mathit{}}{r}{\mathit{}}{i}{\mathit{}}{n}{\mathit{}}{g}$.
The examples that follow assume the following conditional probabilities:
${P}{}{(}{t}{}{a}{}{m}{}{p}{}{e}{}{r}{}{i}{}{n}{}{g}{)}{=}{0.02}$ ${P}{}{(}{f}{}{i}{}{r}{}{e}{)}{=}{0.01}$ ${P}{(}{a}{l}{a}{r}{m}{\mid}{f}{i}{r}{e}{\wedge}{t}{a}{m}{p}{e}{r}{i}{n}{g}{)}{=}{0.5}$ ${P}{(}{a}{l}{a}{r}{m}{\mid}{f}{i}{r}{e}{\wedge}{\mathrm{\neg}}{t}{a}{m}{p}{e}{r}{i}{n}{g}{)}{=}{0.99}$ ${P}{(}{a}{l}{a}{r}{m}{\mid}{\mathrm{\neg}}{f}{i}{r}{e}{\wedge}{t}{a}{m}{p}{e}{r}{i}{n}{g}{)}{=}{0.85}$ ${P}{(}{a}{l}{a}{r}{m}{\mid}{\mathrm{\neg}}{f}{i}{r}{e}{\wedge}{\mathrm{\neg}}{t}{a}{m}{p}{e}{r}{i}{n}{g}{)}{=}{0.0001}$ ${P}{(}{s}{m}{o}{k}{e}{\mid}{f}{i}{r}{e}{)}{=}{0.9}$ ${P}{(}{s}{m}{o}{k}{e}{\mid}{\mathrm{\neg}}{f}{i}{r}{e}{)}{=}{0.01}$ ${P}{(}{l}{e}{a}{v}{i}{n}{g}{\mid}{a}{l}{a}{r}{m}{)}{=}{0.88}$ ${P}{(}{l}{e}{a}{v}{i}{n}{g}{\mid}{\mathrm{\neg}}{a}{l}{a}{r}{m}{)}{=}{0.001}$ ${P}{(}{r}{e}{p}{o}{r}{t}{\mid}{l}{e}{a}{v}{i}{n}{g}{)}{=}{0.75}$ ${P}{(}{r}{e}{p}{o}{r}{t}{\mid}{\mathrm{\neg}}{l}{e}{a}{v}{i}{n}{g}{)}{=}{0.01}$Before any evidence arrives, the probability is given by the priors. The following probabilities follow from the model (all of the numbers here are to about three decimal places):
${P}{}{(}{t}{}{a}{}{m}{}{p}{}{e}{}{r}{}{i}{}{n}{}{g}{)}{=}{0.02}$ | ||
${P}{}{(}{f}{}{i}{}{r}{}{e}{)}{=}{0.01}$ | ||
${P}{}{(}{r}{}{e}{}{p}{}{o}{}{r}{}{t}{)}{=}{0.028}$ | ||
${P}{}{(}{s}{}{m}{}{o}{}{k}{}{e}{)}{=}{0.0189}$ |
Observing a report gives the following:
${P}{(}{t}{a}{m}{p}{e}{r}{i}{n}{g}{\mid}{r}{e}{p}{o}{r}{t}{)}{=}{0.399}$ | ||
${P}{(}{f}{i}{r}{e}{\mid}{r}{e}{p}{o}{r}{t}{)}{=}{0.2305}$ | ||
${P}{(}{s}{m}{o}{k}{e}{\mid}{r}{e}{p}{o}{r}{t}{)}{=}{0.215}$ |
As expected, the probabilities of both ${t}{\mathit{}}{a}{\mathit{}}{m}{\mathit{}}{p}{\mathit{}}{e}{\mathit{}}{r}{\mathit{}}{i}{\mathit{}}{n}{\mathit{}}{g}$ and ${f}{\mathit{}}{i}{\mathit{}}{r}{\mathit{}}{e}$ are increased by the report. Because the probability of ${f}{\mathit{}}{i}{\mathit{}}{r}{\mathit{}}{e}$ is increased, so is the probability of ${s}{\mathit{}}{m}{\mathit{}}{o}{\mathit{}}{k}{\mathit{}}{e}$.
Suppose instead that ${s}{\mathit{}}{m}{\mathit{}}{o}{\mathit{}}{k}{\mathit{}}{e}$ alone was observed:
${P}{(}{t}{a}{m}{p}{e}{r}{i}{n}{g}{\mid}{s}{m}{o}{k}{e}{)}{=}{0.02}$ | ||
${P}{(}{f}{i}{r}{e}{\mid}{s}{m}{o}{k}{e}{)}{=}{0.476}$ | ||
${P}{(}{r}{e}{p}{o}{r}{t}{\mid}{s}{m}{o}{k}{e}{)}{=}{0.320}$ |
Note that the probability of ${t}{\mathit{}}{a}{\mathit{}}{m}{\mathit{}}{p}{\mathit{}}{e}{\mathit{}}{r}{\mathit{}}{i}{\mathit{}}{n}{\mathit{}}{g}$ is not affected by observing ${s}{\mathit{}}{m}{\mathit{}}{o}{\mathit{}}{k}{\mathit{}}{e}$; however, the probabilities of ${r}{\mathit{}}{e}{\mathit{}}{p}{\mathit{}}{o}{\mathit{}}{r}{\mathit{}}{t}$ and ${f}{\mathit{}}{i}{\mathit{}}{r}{\mathit{}}{e}$ are increased.
Suppose that both ${r}{\mathit{}}{e}{\mathit{}}{p}{\mathit{}}{o}{\mathit{}}{r}{\mathit{}}{t}$ and ${s}{\mathit{}}{m}{\mathit{}}{o}{\mathit{}}{k}{\mathit{}}{e}$ were observed:
${P}{(}{t}{a}{m}{p}{e}{r}{i}{n}{g}{\mid}{r}{e}{p}{o}{r}{t}{\wedge}{s}{m}{o}{k}{e}{)}{=}{0.0284}$ | ||
${P}{(}{f}{i}{r}{e}{\mid}{r}{e}{p}{o}{r}{t}{\wedge}{s}{m}{o}{k}{e}{)}{=}{0.964}$ |
Observing both makes ${f}{\mathit{}}{i}{\mathit{}}{r}{\mathit{}}{e}$ even more likely. However, in the context of the ${r}{\mathit{}}{e}{\mathit{}}{p}{\mathit{}}{o}{\mathit{}}{r}{\mathit{}}{t}$, the presence of ${s}{\mathit{}}{m}{\mathit{}}{o}{\mathit{}}{k}{\mathit{}}{e}$ makes ${t}{\mathit{}}{a}{\mathit{}}{m}{\mathit{}}{p}{\mathit{}}{e}{\mathit{}}{r}{\mathit{}}{i}{\mathit{}}{n}{\mathit{}}{g}$ less likely. This is because the ${r}{\mathit{}}{e}{\mathit{}}{p}{\mathit{}}{o}{\mathit{}}{r}{\mathit{}}{t}$ is explained away by ${f}{\mathit{}}{i}{\mathit{}}{r}{\mathit{}}{e}$, which is now more likely.
Suppose instead that ${r}{\mathit{}}{e}{\mathit{}}{p}{\mathit{}}{o}{\mathit{}}{r}{\mathit{}}{t}$, but not ${s}{\mathit{}}{m}{\mathit{}}{o}{\mathit{}}{k}{\mathit{}}{e}$, was observed:
${P}{(}{t}{a}{m}{p}{e}{r}{i}{n}{g}{\mid}{r}{e}{p}{o}{r}{t}{\wedge}{\mathrm{\neg}}{s}{m}{o}{k}{e}{)}{=}{0.501}$ | ||
${P}{(}{f}{i}{r}{e}{\mid}{r}{e}{p}{o}{r}{t}{\wedge}{\mathrm{\neg}}{s}{m}{o}{k}{e}{)}{=}{0.0294}$ |
In the context of the ${r}{\mathit{}}{e}{\mathit{}}{p}{\mathit{}}{o}{\mathit{}}{r}{\mathit{}}{t}$, ${f}{\mathit{}}{i}{\mathit{}}{r}{\mathit{}}{e}$ becomes much less likely and so the probability of ${t}{\mathit{}}{a}{\mathit{}}{m}{\mathit{}}{p}{\mathit{}}{e}{\mathit{}}{r}{\mathit{}}{i}{\mathit{}}{n}{\mathit{}}{g}$ increases to explain the ${r}{\mathit{}}{e}{\mathit{}}{p}{\mathit{}}{o}{\mathit{}}{r}{\mathit{}}{t}$.
This example illustrates how the belief net independence assumption gives commonsense conclusions and also demonstrates how explaining away is a consequence of the independence assumption of a belief network.
Consider the problem of diagnosing why someone is sneezing and perhaps has a fever. Sneezing could be because of influenza or because of hay fever. They are not independent, but are correlated due to the season. Suppose hay fever depends on the season because it depends on the amount of pollen, which in turn depends on the season. The agent does not get to observe sneezing directly, but rather observed just the “Achoo” sound. Suppose fever depends directly on influenza. These dependency considerations lead to the belief network of Figure 8.4.
Consider the wiring example of Figure 1.8. Suppose we decide to have variables for whether lights are lit, for the switch positions, for whether lights and switches are faulty or not, and for whether there is power in the wires. The variables are defined in Figure 8.5.
We order the variables so that each variable has few parents. In this case there seems to be a natural causal order where, for example, the variable for whether a light is lit comes after variables for whether the light is working and whether there is power coming into the light.
Whether light ${{l}}_{{\mathrm{1}}}$ is lit depends only on whether there is power in wire ${{w}}_{{\mathrm{0}}}$ and whether light ${{l}}_{{\mathrm{1}}}$ is working properly. Other variables, such as the position of switch ${{s}}_{{\mathrm{1}}}$, whether light ${{l}}_{{\mathrm{2}}}$ is lit, or who is the Queen of Canada, are irrelevant. Thus, the parents of ${{L}}_{{\mathrm{1}}}{\mathit{}}{\mathrm{\_}}{\mathit{}}{l}{\mathit{}}{i}{\mathit{}}{t}$ are ${{W}}_{{\mathrm{0}}}$ and ${{L}}_{{\mathrm{1}}}{\mathit{}}{\mathrm{\_}}{\mathit{}}{s}{\mathit{}}{t}$.
Consider variable ${{W}}_{{\mathrm{0}}}$, which represents whether there is power in wire ${{w}}_{{\mathrm{0}}}$. If we knew whether there was power in wires ${{w}}_{{\mathrm{1}}}$ and ${{w}}_{{\mathrm{2}}}$, and we knew the position of switch ${{s}}_{{\mathrm{2}}}$ and whether the switch was working properly, the value of the other variables (other than ${{L}}_{{\mathrm{1}}}{\mathit{}}{\mathrm{\_}}{\mathit{}}{l}{\mathit{}}{i}{\mathit{}}{t}$) would not affect our belief in whether there is power in wire ${{w}}_{{\mathrm{0}}}$. Thus, the parents of ${{W}}_{{\mathrm{0}}}$ should be ${{S}}_{{\mathrm{2}}}{\mathit{}}{\mathrm{\_}}{\mathit{}}{P}{\mathit{}}{o}{\mathit{}}{s}$, ${{S}}_{{\mathrm{2}}}{\mathit{}}{\mathrm{\_}}{\mathit{}}{s}{\mathit{}}{t}$, ${{W}}_{{\mathrm{1}}}$, and ${{W}}_{{\mathrm{2}}}$.
Figure 8.5 shows the resulting belief network after the independence of each variable has been considered. The belief network also contains the domains of the variables, as given in the figure, and conditional probabilities of each variable given its parents.
For the variable ${{W}}_{{\mathrm{1}}}$, the following conditional probabilities must be specified:
${P}{(}{{W}}_{{1}}{=}{l}{i}{v}{e}{\mid}{{S}}_{{1}}{\mathrm{\_}}{p}{o}{s}{=}{u}{p}{\wedge}{{S}}_{{1}}{\mathrm{\_}}{s}{t}{=}{o}{k}{\wedge}{{W}}_{{3}}{=}{l}{i}{v}{e}{)}$ | ||
${P}{(}{{W}}_{{1}}{=}{l}{i}{v}{e}{\mid}{{S}}_{{1}}{\mathrm{\_}}{p}{o}{s}{=}{u}{p}{\wedge}{{S}}_{{1}}{\mathrm{\_}}{s}{t}{=}{o}{k}{\wedge}{{W}}_{{3}}{=}{d}{e}{a}{d}{)}$ | ||
${P}{(}{{W}}_{{1}}{=}{l}{i}{v}{e}{\mid}{{S}}_{{1}}{\mathrm{\_}}{p}{o}{s}{=}{u}{p}{\wedge}{{S}}_{{1}}{\mathrm{\_}}{s}{t}{=}{u}{p}{s}{i}{d}{e}{\mathrm{\_}}{d}{o}{w}{n}{\wedge}{{W}}_{{3}}{=}{l}{i}{v}{e}{)}$ | ||
${\mathrm{}}{\mathit{\hspace{1em}\hspace{1em}\u2006}}{\mathrm{\vdots}}$ | ||
${P}{(}{{W}}_{{1}}{=}{l}{i}{v}{e}{\mid}{{S}}_{{1}}{\mathrm{\_}}{p}{o}{s}{=}{d}{o}{w}{n}{\wedge}{{S}}_{{1}}{\mathrm{\_}}{s}{t}{=}{b}{r}{o}{k}{e}{n}{\wedge}{{W}}_{{3}}{=}{d}{e}{a}{d}{)}{.}$ |
There are two values for ${{S}}_{{\mathrm{1}}}{\mathit{}}{\mathrm{\_}}{\mathit{}}{p}{\mathit{}}{o}{\mathit{}}{s}$, five values for ${{S}}_{{\mathrm{1}}}{\mathit{}}{\mathrm{\_}}{\mathit{}}{o}{\mathit{}}{k}$, and two values for ${{W}}_{{\mathrm{3}}}$, so there are ${\mathrm{2}}{\mathrm{*}}{\mathrm{5}}{\mathrm{*}}{\mathrm{2}}{\mathrm{=}}{\mathrm{20}}$ different cases where a value for the conditional probability of ${{W}}_{{\mathrm{1}}}{\mathrm{=}}{l}{\mathit{}}{i}{\mathit{}}{v}{\mathit{}}{e}$ must be specified. As far as probability theory is concerned, the probability for ${{W}}_{{\mathrm{1}}}{\mathrm{=}}{l}{\mathit{}}{i}{\mathit{}}{v}{\mathit{}}{e}$ for these 20 cases could be assigned arbitrarily. Of course, knowledge of the domain constrains what values make sense. The values for ${{W}}_{{\mathrm{1}}}{\mathrm{=}}{d}{\mathit{}}{e}{\mathit{}}{a}{\mathit{}}{d}$ can be computed from the values for ${{W}}_{{\mathrm{1}}}{\mathrm{=}}{l}{\mathit{}}{i}{\mathit{}}{v}{\mathit{}}{e}$ for each of these cases.
Because the variable ${{S}}_{{\mathrm{1}}}{\mathit{}}{\mathrm{\_}}{\mathit{}}{s}{\mathit{}}{t}$ has no parents, it requires a prior distribution, which can be specified as the probabilities for all but one of the values; the remaining value is derived from the constraint that all of the probabilities sum to 1. Thus, to specify the distribution of ${{S}}_{{\mathrm{1}}}{\mathit{}}{\mathrm{\_}}{\mathit{}}{s}{\mathit{}}{t}$, four of the following five probabilities must be specified:
${P}{(}{{S}}_{{1}}{\mathrm{\_}}{s}{t}{=}{o}{k}{)}$ | ||
${P}{(}{{S}}_{{1}}{\mathrm{\_}}{s}{t}{=}{u}{p}{s}{i}{d}{e}{\mathrm{\_}}{d}{o}{w}{n}{)}$ | ||
${P}{(}{{S}}_{{1}}{\mathrm{\_}}{s}{t}{=}{s}{h}{o}{r}{t}{)}$ | ||
${P}{(}{{S}}_{{1}}{\mathrm{\_}}{s}{t}{=}{i}{n}{t}{e}{r}{m}{i}{t}{t}{e}{n}{t}{)}$ | ||
${P}{(}{{S}}_{{1}}{\mathrm{\_}}{s}{t}{=}{b}{r}{o}{k}{e}{n}{)}$ |
The other variables are represented analogously.
Such a network is used in a number of ways:
By conditioning on the knowledge that the switches and circuit breakers are ok, and on the values of the outside power and the position of the switches, this network simulates how the lighting should work.
Given values of the outside power and the position of the switches, the network can infer the probability of any outcome, such as how likely it is that ${{l}}_{{1}}$ is lit.
Given values for the switches and whether the lights are lit, the posterior probability that each switch or circuit breaker is in any particular state can be inferred.
Given some observations, the network may be used to determine the most likely position of switches.
Given some switch positions, some outputs, and some intermediate values, the network may be used to determine the probability of any other variable in the network.
Note the independence assumption embedded in this model. The DAG specifies that the lights, switches, and circuit breakers break independently. To model dependencies among how the switches break, you could add more arcs and perhaps more variables. For example, if some lights do not break independently because they come from the same batch, you could add an extra node modeling the batch, and whether it is a good batch or a bad batch, which is made a parent of the ${{L}}_{{i}}{\mathit{}}{\mathrm{\_}}{\mathit{}}{s}{\mathit{}}{t}$ variables for each light ${{L}}_{{i}}$ from that batch. The lights now break dependently. When you have evidence that one light is broken, the probability that the batch is bad may increase and thus make it more likely that other lights from that batch are broken. If you are not sure whether the lights are indeed from the same batch, you could add variables representing this, too. The important point is that the belief network provides a specification of independence that lets us model dependencies in a natural and direct manner.
The model implies that there is no possibility of shorts in the wires or that the house is wired differently from the diagram. For example, it implies that ${{w}}_{{\mathrm{0}}}$ cannot be shorted to ${{w}}_{{\mathrm{4}}}$ so that wire ${{w}}_{{\mathrm{0}}}$ gets power from wire ${{w}}_{{\mathrm{4}}}$. You could add extra dependencies that let each possible short be modeled. An alternative is to add an extra node that indicates that the model is appropriate. Arcs from this node would lead to each variable representing power in a wire and to each light. When the model is appropriate, you could use the probabilities of Example 8.17. When the model is inappropriate, you could, for example, specify that each wire and light works at random. When there are weird observations that do not fit in with the original model – they are impossible or extremely unlikely given the model – the probability that the model is inappropriate will increase.