Loading…

Marginal and Conditional Probabilities

Statistics • Probability

View all topics

Marginal and Conditional Probabilities

Build a two-way (contingency) table, compute marginal probabilities from row/column totals, and compute conditional probabilities such as P(A | B). The visualization draws a tree diagram.

First category of Variable 1.

Second category of Variable 1.

Used in the table and tree diagram.

First category of Variable 2.

Second category of Variable 2.

Used in the table and tree diagram.

Enter the 2×2 counts (cells)

Male & In Favor

Male & Against

Female & In Favor

Female & Against

Conditional probability to compute

Matches the examples such as P(in favor | male) or P(female | in favor).

Controls which variable splits first in the tree diagram.

Ready

Visualization: tree diagram

First branches show marginal probabilities. Second branches show conditional probabilities. Leaf labels show the joint probabilities for each cell.

Enter counts and click “Calculate”.

Rate this calculator

0.0 /5 (0 ratings)
Be the first to rate.
Your rating
You can update your rating any time.

Frequently Asked Questions

What is a marginal probability in a two-way table?

A marginal probability is the probability of a single category without conditioning on the other variable. In a contingency table, it is a row total or column total divided by the grand total.

How do I compute a conditional probability from a 2x2 table?

Use P(A | B) = count(A and B) / count(B). The numerator is the cell at the intersection of the event and the condition, and the denominator is the total for the condition category.

What is the difference between P(Column | Row) and P(Row | Column)?

They condition on different totals, so they can produce different values. P(Column | Row) divides by a row total, while P(Row | Column) divides by a column total.

What do the leaf values in the tree diagram represent?

Each leaf corresponds to a joint probability for one cell of the table. It represents the probability of both category choices occurring together along that path.