# Conditional event algebra

In probability theory, a conditional event algebra (CEA) is an alternative to a standard, Boolean algebra of possible events (a set of possible events related to one another by the familiar operations and, or, and not) that contains not just ordinary events but also conditional events that have the form "if A, then B". The usual motivation for a CEA is to ground the definition of a probability function for events, P, that satisfies the equation P(if A then B) = P(A and B) / P(A).

## Motivation

In standard probability theory the occurrence of an event corresponds to a set of possible outcomes, each of which is an outcome that corresponds to the occurrence of the event. P(A), the probability of event A, is the sum of the probabilities of all outcomes that correspond to event A; P(B) is the sum of the probabilities of all outcomes that correspond to event B; and P(A and B) is the sum of the probabilities of all outcomes that correspond to both A and B. In other words, and, customarily represented by the logical symbol ∧, is interpreted as set intersection: P(A ∧ B) = P(A ∩ B). In the same vein, or, ∨, becomes set union, ∪, and not, ¬, becomes set complementation, ′. Any combination of events using the operations and, or, and not is also an event, and assigning probabilities to all outcomes generates a probability for every event. In technical terms, this means that the set of events and the three operations together constitute a Boolean algebra of sets, with an associated probability function.
In standard practice, P(if A, then B) is not interpreted as P(A′ ∪ B), following the rule of material implication, but rather as the conditional probability of B given A, P(B | A) = P(A ∩ B) / P(A). This raises a question: what about a probability like P(if A, then B, and if C, then D)? For this, there is no standard answer. What would be needed, for consistency, is a treatment of if-then as a binary operation, →, such that for conditional events A → B and C → D, P(A → B) = P(B | A), P(C → D) = P(D | C), and P((A → B) ∧ (C → D)) are well-defined and reasonable. Philosophers including Robert Stalnaker argued that ideally, a conditional event algebra, or CEA, would support a probability function that meets three conditions:
    1. The probability function satisfies the usual axioms.
    2. For any two ordinary events A and B, if P(A) > 0, then P(A → B) = P(B | A) = P(A ∧ B) / P(A).
    3. For ordinary event A and acceptable probability function P, if P(A) > 0, then P$_A$ = P ( ⋅ | A), the function produced by conditioning on A, is also an acceptable probability function.
However, David Lewis proved in 1976 a fact now known as Lewis's triviality result: these conditions can only be met with near-standard approaches in trivial examples. In particular, those conditions can only be met when there are just two possible outcomes—as with, say, a single coin flip. With three or more possible outcomes, constructing a probability function requires choosing which of the above three conditions to violate. Interpreting A → B as A′ ∪ B produces an ordinary Boolean algebra that violates 2. With CEAs, the choice is between 1 and 3.

## Types of conditional event algebra
### Tri-event CEAs

Tri-event CEAs take their inspiration from three-valued logic, where the identification of logical conjunction, disjunction, and negation with simple set operations no longer applies. For ordinary events A and B, the tri-event A → B occurs when A and B both occur, fails to occur when A occurs but B does not, and is undecided when A fails to occur. (The term “tri-event” comes from de Finetti (1935): triévénement.) Ordinary events, which are never undecided, are incorporated into the algebra as tri-events conditional on Ω, the vacuous event represented by the entire sample space of outcomes; thus, A becomes Ω → A.
Since there are many three-valued logics, there are many possible tri-event algebras. Two types, however, have attracted more interest than the others. In one type, A ∧ B and A ∨ B are each undecided only when both A and B are undecided; when just one of them is, the conjunction or disjunction follows the other conjunct or disjunct. When negation is handled in the obvious way, with ¬A undecided just in case A is, this type of tri-event algebra corresponds to a three-valued logic proposed by Sobociński (1920) and favored by Belnap (1973), and also implied by Adams’s (1975) “quasi-conjunction” for conditionals. Schay (1968) was the first to propose an algebraic treatment, which Calabrese (1987) developed more properly.
The other type of tri-event CEA treats negation the same way as the first, but it treats conjunction and disjunction as min and max functions, respectively, with occurrence as the high value, failure as the low value, and undecidedness in between. This type of tri-event algebra corresponds to a three-valued logic proposed by Łukasiewicz (1920) and also favored by de Finetti (1935). Goodman, Nguyen and Walker (1991) eventually provided the algebraic formulation.
The probability of any tri-event is defined as the probability that it occurs divided by the probability that it either occurs or fails to occur. With this convention, conditions 2 and 3 above are satisfied by the two leading tri-event CEA types. Condition 1, however, fails. In a Sobociński-type algebra, ∧ does not distribute over ∨, so P(A ∧ (B ∨ C)) and P((A ∧ B) ∨ (A ∧ C)) need not be equal. In a Łukasiewicz-type algebra, ∧ distributes over ∨ but not over exclusive or, $\oplus$ (A $\oplus$ B = (A ∧ ¬B) ∨ (¬A ∧ B)). Also, tri-event CEAs are not complemented lattices, only pseudocomplemented, because in general, (A → B) ∧ ¬(A → B) cannot occur but can be undecided and therefore is not identical to Ω → ∅, the bottom element of the lattice. This means that P(C) and P(C $\oplus$ ((A → B) ∧ ¬(A → B))) can differ, when classically they would not.

### Product-space CEAs

If P(if A, then B) is thought of as the probability of A-and-B occurring before A-and-not-B in a series of trials, this can be calculated as an infinite sum of simple probabilities: the probability of A-and-B on the first trial, plus the probability of not-A (and either B or not-B) on the first trial and A-and-B on the second, plus the probability of not-A on the first two trials and A-and-B on the third, and so on—that is, P(A ∧ B) + P(¬A)P(A ∧ B) + P(¬A)$^2$P(A ∧ B) + …, or, in factored form, P(A ∧ B)[1 + P(¬A) + P(¬A)$^2$ + …]. Since the second factor is the Maclaurin series expansion of 1 / [1 – P(¬A)] = 1 / P(A), the infinite sum equals P(A ∧ B) / P(A) = P(B |A).
The infinite sum is itself is a simple probability, but with the sample space now containing not ordinary outcomes of single trials but infinite sequences of ordinary outcomes. Thus the conditional probability P(B |A) is turned into simple probability P(B → A) by replacing Ω, the sample space of all ordinary outcomes, with Ω*, the sample space of all sequences of ordinary outcomes, and by identifying conditional event A → B with the set of sequences where the first (A ∧ B)-outcome comes before the first (A ∧ ¬B)-outcome. In Cartesian-product notation, Ω* = Ω × Ω × Ω × …, and A → B is the infinite union [(A ∩ B) × Ω × Ω × …] ∪ [A′ × (A ∩ B) × Ω × Ω × …] ∪ [A′ × A′ × (A ∩ B) × Ω × Ω × …] ∪ …. Unconditional event A is, again, represented by conditional event Ω → A. Unlike tri-event CEAs, this type of CEA supports the identification of ∧, ∨, and ¬ with the familiar operations ∩, ∪, and ′ not just for ordinary, unconditional events but for conditional ones, as well. Because Ω* is a space defined by an infinitely long Cartesian product, the Boolean algebra of conditional-event subsets of Ω* is called a product-space CEA. This type of CEA was introduced by van Fraassen (1976), in response to Lewis’s result, and was later discovered independently by Goodman and Nguyen (1994).
The probability functions associated with product-space CEAs satisfy conditions 1 and 2 above. However, given probability function P that satisfies conditions 1 and 2, if P(A) > 0, it can be shown that P$_A$(C | B) = P(C | A ∧ B) and P$_A$(B → C) = P(B ∧ C | A) + P(B′ | A)P(C | B). If A, B and C are pairwise compatible but P(A ∧ B ∧ C) = 0, then P(C | A ∧ B) = P(B ∧ C | A) = 0 but P(B′ | A)P (C | B) > 0. Therefore, P$_A$(B → C) does not reliably equal P$_A$(C | B). Since P$_A$ fails condition 2, P fails condition 3.

### Nested if–thens

What about nested conditional constructions? In a tri-event CEA, right-nested constructions are handled more or less automatically, since it is natural to say that A → (B → C) takes the value of B → C (possibly undecided) when A is true and is undecided when A is false. Left-nesting, however, requires a more deliberate choice: when A → B is undecided, should (A → B) → C be undecided, or should it take the value of C? Opinions vary. Calabrese adopts the latter view, identifying (A → B) → (C → D) with ((¬A ∨ B) ∧ C) → D.
With a product-space CEA, nested conditionals call for nested sequence-constructions: evaluating P((A → B) → (C → D)) requires a sample space of metasequences of sequences of ordinary outcomes. The probabilities of the ordinary sequences are calculated as before. Given a series of trials where the outcomes are sequences of ordinary outcomes, P((A → B) → (C → D)) is P(C → D | A → B) = P((A → B) ∧ (C → D)) / P(A → B), the probability that an ((A → B) ∧ (C → B))-sequence will be encountered before an ((A → B) ∧ ¬(C → B))-sequence. Higher-order-iterations of conditionals require higher-order metasequential constructions.
In either of the two leading types of tri-event CEA, A → (B → C) = (A ∧ B) → C. Product space CEAs, on the other hand, do not support this identity. The latter fact can be inferred from the failure, already noted, of P$_A$(B → C) to equal P$_A$(C | B), since P$_A$(C | B) = P((A ∧ B) → C) and P$_A$(B → C) = P(A → (B → C)). For a direct analysis, however, consider a metasequence whose first member-sequence starts with an (A ∧ ¬B ∧ C)-outcome, followed by a (¬A ∧ B ∧ C)-outcome, followed by an (A ∧ B ∧ ¬C)-outcome. That metasequence will belong to the event A → (B → C), because the first member-sequence is an (A ∧ (B → C))-sequence, but the metasequence will not belong to the event (A ∧ B) → C, because the first member-sequence is an ((A ∧ B) → ¬C)-sequence.

## Applications

The initial impetus for CEAs is theoretical—namely, the challenge of responding to Lewis's triviality result—but practical applications have been proposed. If, for instance, events A and C involve signals emitted by military radar stations and events B and D involve missile launches, an opposing military force with an automated missile defense system may want the system to be able to calculate P((A → B) ∧ (C → D)) and/or P((A → B) → (C → D)). Other applications range from image interpretation to the detection of denial-of-service attacks on computer networks.