Functions & Formulae

Each applied formula has its own function page, with a signature, implementations, and tests.

Chance node evaluation in a decision tree

sum_(j=1)^k p_(j|h) = 1; C_n = sum_j p_j C_j, E_n = sum_j p_j E_j; pi_t = p_1 * p_(2|1) * ... * p_(m|1,...,m-1)

Maps the branches leaving a chance node, each with a probability conditional on the pathway that leads to the node and a cost and health outcome at its end, to the expected cost and expected health outcome at the node. It also maps the chain of conditional branch probabilities along a pathway to the probability of reaching the terminal node at its end. The branch probabilities at every chance node sum to one. Strategies are compared only after the tree has been evaluated, with the ICER formula HE-FM-ICER-001 or net monetary benefit HE-FM-NMB-001, which are not restated here. Rolling back a whole tree from the terminal nodes to the first decision is covered on the Folding Back page; the formulae below work at the level of one node or one pathway.

  • Expected cost and health outcome at a chance node

    C_n = sum_(j=1)^k [p_j * C_j]; E_n = sum_(j=1)^k [p_j * E_j]

    Replaces a chance node with the probability-weighted averages of the costs and of the health outcomes at the ends of its k branches. Costs and health outcomes are averaged separately because they are measured in different units; in a cost-utility analysis the health outcome is usually QALYs. When a branch leads to a further chance node, its C_j and E_j are the expected values already calculated at that node.

  • Pathway probability to a terminal node

    pi_t = p_1 * p_2

    Multiplies the conditional branch probabilities along a pathway to give the probability of reaching its terminal node, the multiplication rule for a joint probability. The formula is written for a pathway through two chance nodes, as in the article's test-and-treat example; a pathway through m chance nodes multiplies one further conditional factor for each node. Probabilities of successive events along a pathway are multiplied, while probabilities of mutually exclusive pathways may be summed.