Sensitivity Analysis
Context
When you enter evidence in BayesiaLab, inference uses the probabilities stored in the network. A conditional probability table might give a single value for the probability of chest pain given a particular condition. How precisely is that value known? A table learned from a finite sample carries sampling uncertainty. In a table elicited from several experts, the experts may disagree about the same probability.
A Credible Intervals Report shows how precisely each probability in a learned table has been estimated. Sensitivity analysis takes the next step. It shows how much a result calculated from those tables can vary, such as a marginal probability or a measure of association with a Target Node.
Usage
In Validation Mode, open Menus > Analysis > Visual > Sensitivity. Choose the analysis that answers your question.
- Which configurations contribute to a node’s marginal probability? Joint Probability breaks down that probability across combinations of states of the parameter nodes.
- How much could a result vary because the tables were learned from a finite sample? Credible Intervals draws plausible probability tables from their posterior distributions and repeats inference for each draw.
- How much does a result depend on whose judgments you use? Expert Assessments generates networks from the individual assessments behind a consensus model.
Example
The network contains 303 cases. is the target and a parent of , , and . We will read the conditional probabilities for these three nodes, then simulate how uncertainty in the tables affects the age distribution and the association between chest pain and the target.
Read the Three Conditional Probability Tables
Open the network and select , (shown as in the report), and . On macOS, click the first node, then Command-click each of the other two. The three selected nodes have handles in the graph.
Choose Menus > Network > Reports > Credible Intervals. Set Confidence Level to 90% and click OK.

Each table has one row for each state of . In the table, follow the row to the column for state . The estimated probability is 11.7143%, with a 90% credible interval from 6.6288% to 17.7971%. In the row for , the estimate for the same state is 71.2471%.

Run the Simulation
Close the report and choose Menus > View > Validation Mode. Leave the network without evidence and select the same three nodes. Choose Menus > Analysis > Visual > Sensitivity > Credible Intervals. Check that the confirmation shows 3 selected nodes, then click OK.

Set Number of Samples to 10,000. Enable Compute Metrics on Target to include measures of association with . Leave both effect options clear. Enable Fixed Seed, enter 31, and click OK. Each sample draws a set of probability tables and recalculates the results using those tables.

Inspect the Age Probabilities
In the results window, select and States' Probabilities. Choose Density Function and set Number of Intervals to 100. Each color shows how often the simulation produced a given probability for one of the three age groups.

The table above gives a 76.7619% probability of age 58.5 or younger given = . Here the network has no evidence on , so inference averages over both condition states. Across the 10,000 draws, the mean probability of age 58.5 or younger is 51.0882%. The means for the middle and oldest age groups are 29.4006% and 19.5112%, respectively.
Inspect the Association With the Target
Select , then Relative Mutual Information. Relative Mutual Information measures the fraction of uncertainty about explained by observing . The simulated mean is 0.2667, or about 27% of the uncertainty about the target. The standard deviation is 0.0448.

Click Report to read the exact values for all three nodes. For each state probability and each metric, the report lists the minimum and maximum observed across the draws, the mean, and the standard deviation.
