Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Joint Probability Calculator

How to use Joint Probability Calculator
  1. Type the names of the two events in Event 1 and Event 2; every header and cell notation follows them. Learn more about naming the events
  2. Type decimals from 0 to 1 in the four white cells; once two values of a row or column are known the third is filled in, and the margins follow. Learn more about entering joint probabilities
  3. Or type the margins, P(A) and P(B) with one joint probability, and let the calculator fill the cells. Learn more about the marginal probabilities
  4. Click Generate Random Example for a valid table at once, Calculate from Marginals to build the cells from the margins, or Clear All to start again. Learn more about the buttons
  5. Read the table: joint cells in the middle, Marginal P(B) on the right, Marginal P(A) at the bottom, the Total in the corner. Learn more about the table
  6. Hover a ? for the meaning of a header, cell or margin and its current value. Learn more about the hints
  7. Watch the message box above the table: a red message names the rule a value breaks. Learn more about the messages

A
?
Ac
?
Marginal
P(B)
?
B
?
P(A∩B)
?
P(Ac∩B)
?
P(B)
?
Bc
?
P(A∩Bc)
?
P(Ac∩Bc)
?
P(Bc)
?
Marginal
P(A)
?
P(A)
?
P(Ac)
?
Total
1.000
?
How to use:
  • Direct Entry: Enter the four joint probabilities directly in the center cells. They must sum to 1.
  • From Marginals: Enter marginal probabilities (P(A), P(B)) AND one joint probability (e.g., P(A∩B)), then click "Calculate from Marginals" to compute the remaining three.
  • Auto-calculation: When you enter 2 out of 3 values in any row or column, the third is automatically calculated.
  • Complements: When you enter a marginal (e.g., P(A)), its complement (P(Ac)) is automatically calculated.

What is Joint Probability?

Joint probability is the chance that two events happen together, P(AcapB)P(A cap B); the four joint cells of the table partition the sample space and add up to 11, and each marginal is the sum of its row or column. Learn more about joint probability

Key Concepts

Sample Space: All four joint probabilities represent mutually exclusive outcomes that cover the entire sample space.

Marginal Probabilities: The sum of joint probabilities across a row or column gives the probability of a single event.

Complement: P(Ac) = 1 - P(A) represents the probability that A does NOT occur.

The Law of Total Probability

The four joint probabilities partition the sample space into mutually exclusive and exhaustive events. Therefore, they must sum to exactly 1.








Naming the Events

DemoTwo names and a cell
Step 0 of 3
The two boxes above the buttons, Event 1 and Event 2, hold the names of the events, AA and BB when the page opens. Type any short label, "Rain" and "Cloudy" for example, and every header, cell notation, hint and message is rewritten with it at once: the columns become Rain and Rainc^c, the first cell P(Rain∩Cloudy)P(\text{Rain} \cap \text{Cloudy}), the marginal row Marginal P(Rain). The numbers are not touched by a rename.

Short names keep the table readable, since each appears several times in every cell. The names are also used in the validation messages, so "P(Rain) = 1.100 is invalid" names the margin that went wrong. What the two events and their complements stand for is explained in What is Joint Probability?.

Entering Joint Probabilities

DemoFour cells, a sum above 1, the sum corrected
Step 0 of 3
The 2×2 table holds four white cells in the middle, one for each combination of the two events: P(A∩B)P(A \cap B) and P(Ac∩B)P(A^c \cap B) in the top row, P(A∩Bc)P(A \cap B^c) and P(Ac∩Bc)P(A^c \cap B^c) in the second row. Type a decimal from 00 to 11 in a cell; the placeholder reads 0.0000.000 and values the calculator fills in itself are written with three decimals. The four cells partition the sample space, so they must add up to exactly 11: a line under the table reports their sum once all four are filled, and a red message appears when the sum exceeds 11.

The table completes itself as you type. As soon as two of the three values in a row or a column are known, the third is filled in: typing 0.30.3 and 0.150.15 in the top row writes 0.4500.450 into the marginal P(B)P(B), and typing 0.20.2 and 0.350.35 in the second row writes 0.5500.550 into P(Bc)P(B^c) and 0.5000.500 into P(A)P(A) and P(Ac)P(A^c). Changing a cell afterwards recomputes the margins: 0.40.4 instead of 0.30.3 lifts P(B)P(B) to 0.5500.550 and the sum to 1.1001.100, which the message flags. What the four cells mean is explained in What is Joint Probability?.

Understanding Marginal Probabilities

DemoMargins first, then one joint cell
Step 0 of 3
The marginal probabilities sit in the column headed Marginal P(B) on the right, P(B)P(B) and P(Bc)P(B^c), and in the row headed Marginal P(A) at the bottom, P(A)P(A) and P(Ac)P(A^c); the corner cell shows the Total, 1.0001.000. Each marginal is the sum of its row or column of joint probabilities, by the sum rule, and the calculator writes it in as soon as both cells of that line are known. When a marginal box is left empty but its cells are filled, the computed value is shown under the box as "=0.450= 0.450".

The marginal boxes can also be typed into. Typing P(A)=0.5P(A) = 0.5 writes the complement P(Ac)=0.500P(A^c) = 0.500 at once, and P(B)=0.45P(B) = 0.45 writes P(Bc)=0.550P(B^c) = 0.550; with the margins in place, one joint probability fixes the rest, so P(A∩B)=0.3P(A \cap B) = 0.3 fills P(A∩Bc)=0.200P(A \cap B^c) = 0.200, P(Ac∩B)=0.150P(A^c \cap B) = 0.150 and P(Ac∩Bc)=0.350P(A^c \cap B^c) = 0.350. A typed marginal that disagrees with its cells, or a pair of marginals that does not add up to 11, is reported in the message box. The rule behind the margins is explained in Sum Rule and Probability Tables.

Using the Random, Calculate from Marginals and Clear All Buttons

DemoA random example, Clear All, another example
Step 0 of 3
Three buttons sit above the table. Generate Random Example fills the four joint cells with random values that add up to exactly 11, clears the marginal boxes so that they are recomputed from the cells, and is the quickest way to see a complete table; click it again for another example. Calculate from Marginals builds the four cells from the other direction: type P(A)P(A) or P(Ac)P(A^c), P(B)P(B) or P(Bc)P(B^c), and the joint probability P(A∩B)P(A \cap B), then click it, and the three remaining cells are filled by subtraction. Clear All empties every box, cells and margins alike, and removes the message.

There is no Reset to a default example; the page opens with every box empty, and Generate Random Example is the way to get a filled table at once. Where the random values and the subtractions come from is explained in Sum Rule and Probability Tables.

Reading the Probability Table Structure

DemoNamed events, a filled row, the grid cleared
Step 0 of 3
The table follows the usual layout of a contingency table. The columns are headed AA and AcA^c, the rows BB and BcB^c; the superscript cc marks the complement, the event not occurring, so the four white cells read P(A∩B)P(A \cap B), P(Ac∩B)P(A^c \cap B), P(A∩Bc)P(A \cap B^c) and P(Ac∩Bc)P(A^c \cap B^c). Each cell carries its notation above the box and a small ? that opens a hint. The right-hand column, Marginal P(B), holds P(B)P(B) and P(Bc)P(B^c), the sums of the two rows; the bottom row, Marginal P(A), holds P(A)P(A) and P(Ac)P(A^c), the sums of the two columns; and the corner holds the Total 1.0001.000.

The event names in the headers are the ones typed in the Event 1 and Event 2 boxes above the table, so with "Rain" and "Cloudy" the first cell reads P(Rain∩Cloudy)P(\text{Rain} \cap \text{Cloudy}). Typing two cells of a row fills its marginal, and Clear All empties the whole grid again. The layout is explained in Sum Rule and Probability Tables.

Interpreting Tooltips and Mathematical Notation

DemoTwo hints, then renamed notation
Step 0 of 3
Every header and cell has a small ? beside its notation. Hovering over it opens a hint: for a column header, which outcomes the column collects ("Column for outcomes where A occurs"); for a joint cell, that it is a joint probability and what it means ("Both A and B occur"), with the current value of the box once one is typed; for a marginal box, that it is the sum of its row or column, with the formula. Move the pointer away and the hint closes.

The notation uses ∩\cap for "and" and the superscript cc for the complement: P(Ac∩B)P(A^c \cap B) is the probability that AA does not occur while BB does. The names inside the symbols follow the Event 1 and Event 2 boxes, so renaming AA to "Rain" turns every P(A…)P(A \ldots) into P(Rain…)P(\text{Rain} \ldots). The symbols are explained in Joint vs Marginal vs Conditional Probability.

Reading the Validation Messages

DemoA margin above 1, corrected, then four cells above 1
Step 0 of 3
A message box appears above the table as soon as the numbers break a rule, and disappears when they are corrected. A red Invalid message names the rule: a joint cell larger than its marginal ("P(A∩B)=0.600P(A \cap B) = 0.600 cannot exceed P(A)=0.500P(A) = 0.500"), a marginal outside 00 to 11, a typed marginal that disagrees with the sum of its cells, a pair of complements that does not add up to 1.0001.000, or four joint cells whose sum exceeds 11 ("Sum of joint probabilities is 1.4001.400, which exceeds 1"). Typing 0.60.6 and 0.50.5 in the top row, for example, makes P(B)=1.100P(B) = 1.100 and is refused; lowering the first cell to 0.40.4 clears the message.

The checks run on every keystroke, so a message may appear halfway through typing a number and vanish once it is complete. They enforce the axioms that every probability lies between 00 and 11 and that the four joint probabilities partition the sample space. Why these rules hold is explained in Sum Rule and Probability Tables.

What is Joint Probability?

Joint probability quantifies the likelihood of two or more events occurring simultaneously. For events A and B, the joint probability P(A∩B) gives the probability both happen together in a single trial. This differs from asking about each event separately.

Joint probabilities satisfy probability axioms: they're non-negative (≥0) and the sum over all possible joint outcomes equals 1. For two binary events, four mutually exclusive outcomes exist: both occur, only A occurs, only B occurs, neither occurs. These four joint probabilities partition the sample space completely.

Mutual exclusivity of the four cells means exactly one outcome occurs per trial. You can't simultaneously have both A and B occur while also having neither occur. The four joint probabilities represent exhaustive, non-overlapping possibilities.

Joint distributions specify complete probabilistic relationships between events. Knowing all joint probabilities allows calculating any related probability: marginals, conditionals, unions, or intersections. The joint distribution contains maximum information about how events relate.

For comprehensive theory on joint probability including derivations, properties, and applications to multiple events, see joint probability theory.

The lesson defines it in Definition and Notation, and covers the computations in Calculating joint probabilities.

Joint vs Marginal vs Conditional Probability

Joint probability P(A∩B) asks about two events together: "What's the probability both A and B occur?" It focuses on the intersection, requiring both events simultaneously. Joint probabilities fill the interior table cells.

Marginal probability P(A) or P(B) asks about single events without conditioning on others: "What's the probability of A, regardless of B?" Marginals are obtained by summing joint probabilities over all states of other events. P(A) = P(A∩B) + P(A∩B̄), summing across B and B̄. Marginals appear in the table's edges (margins).

Conditional probability P(A|B) asks about one event given another occurred: "What's the probability of A, knowing B happened?" Conditionals restrict attention to outcomes where the conditioning event occurred. Calculate conditionals from joint and marginal probabilities: P(A|B) = P(A∩B)/P(B), dividing the joint by the marginal.

These three probability types answer different questions using the same underlying joint distribution. Joint probabilities are most fundamental—they determine both marginals (through summation) and conditionals (through division). This table displays joint and marginal probabilities; conditionals require additional calculation.

The calculator doesn't compute conditionals directly, but you can calculate them manually: divide any joint probability by its corresponding marginal. For example, P(A|B) = P(A∩B)/P(B) using values from the table.

The three are compared in Marginal probability and From joint to conditional; the conditional formula is in The conditional probability formula and the independence case in Independence.

Sum Rule and Probability Tables

The sum rule (law of total probability) states that marginal probabilities equal the sum of joint probabilities over other events. For event A: P(A) = Σ_b P(A∩B=b), summing over all possible values of B. In the 2×2 table, this simplifies to P(A) = P(A∩B) + P(A∩B̄).

This rule explains how marginal probabilities in the table's edges derive from joint probabilities in the interior. Sum across a row to get the row's marginal probability; sum down a column to get the column's marginal. The yellow highlighted cells display these sums.

Verification: All joint probabilities must sum to 1 since they partition the sample space. Additionally, each pair of marginals must sum to 1: P(A) + P(Ā) = 1 and P(B) + P(B̄) = 1. The table enforces these constraints through its structure and validation.

The sum rule connects joint and marginal distributions, allowing you to work backward and forward. Given marginals and independence, you can construct joints (P(A∩B) = P(A)×P(B) when independent). Given joints, you compute marginals through summation.

Understanding the sum rule clarifies why the table has its specific structure: interior cells represent joint probabilities, edge cells show marginals computed by summing, and the corner displays the total sum verifying probability axioms.

The rule is taught as The law of total probability and applied to tables in Joint probability tables.