Joint Probability Calculator

Use this Joint Probability Calculator to enter values, adjust options, and review results in a compact responsive workspace.

Results are calculated automatically as you enter data.

Joint Probability Calculator

P(A and B)
Formula and interpretation

▼ See explanations and tips below ▼

What Is Joint Probability?

Joint probability is the probability that two events happen together. If the two events are called \(A\) and \(B\), their joint probability is written as:

$$ P(A \cap B) $$

The symbol \(\cap\) means “intersection,” which is the overlap between the two events. In words, \(P(A \cap B)\) means the probability that \(A\) happens and \(B\) happens in the same observation, trial, person, item, or situation.

Joint probability is useful because many real questions involve more than one condition. For example, a teacher might ask for the probability that a student both submitted an assignment and passed a quiz. A researcher might look at the probability that a survey respondent is both in one age group and prefers a certain product. A quality-control team might track the probability that an item both passes inspection and comes from a certain production line.

A joint probability is always between \(0\) and \(1\):

$$ 0 \le P(A \cap B) \le 1 $$

As a percentage, this is between \(0\%\) and \(100\%\). A probability of \(0\) means the two events never occur together in the model or data being used. A probability of \(1\) means they always occur together.


Why Joint Probability Matters

Joint probability helps you understand overlap. That overlap is often the key to answering practical questions such as:

  • How often do two characteristics appear together?
  • How much of one event is also part of another event?
  • Are two events related, or do they behave as if they are independent?
  • What does a two-way table say about the relationship between two categories?

It also connects several major probability ideas. Once you know \(P(A)\), \(P(B)\), and \(P(A \cap B)\), you can calculate the probability of \(A\) or \(B\), conditional probabilities such as \(P(A \mid B)\), complements, and an independence check.


Key Terms to Know

  • Event: A set of outcomes, such as “the student passed” or “the card is a heart.”
  • Joint probability: The probability that two events happen together, written as \(P(A \cap B)\).
  • Marginal probability: The probability of one event by itself, such as \(P(A)\) or \(P(B)\).
  • Union: The probability that at least one of two events happens, written as \(P(A \cup B)\).
  • Intersection: The overlap of two events, written as \(A \cap B\).
  • Complement: The event that something does not happen. The complement of \(A\) is often written as \(\bar{A}\) or \(A^c\).
  • Conditional probability: The probability of one event after another event is known to have happened, such as \(P(A \mid B)\).
  • Independent events: Events where knowing that one happened does not change the probability of the other.
  • Mutually exclusive events: Events that cannot happen together, so their joint probability is \(0\).
  • 2×2 contingency table: A table that splits observations into four groups: \(A\) and \(B\), \(A\) and not \(B\), not \(A\) and \(B\), and neither.

How Joint Probability Works

For two events, the most important relationship is the connection between the individual probabilities and their overlap.

The probability that \(A\) or \(B\) occurs is:

$$ P(A \cup B) = P(A) + P(B) - P(A \cap B) $$

The subtraction is necessary because the overlap is counted twice when \(P(A)\) and \(P(B)\) are added. Subtracting \(P(A \cap B)\) counts that overlap only once.

The four regions of a two-event probability model are:

  • \(P(A \cap B)\): both \(A\) and \(B\) happen.
  • \(P(A \cap \bar{B})\): \(A\) happens and \(B\) does not.
  • \(P(\bar{A} \cap B)\): \(B\) happens and \(A\) does not.
  • \(P(\bar{A} \cap \bar{B})\): neither event happens.

Together, these four regions must add to \(1\):

$$ P(A \cap B) + P(A \cap \bar{B}) + P(\bar{A} \cap B) + P(\bar{A} \cap \bar{B}) = 1 $$

If you know \(P(A)\), \(P(B)\), and \(P(A \cap B)\), the other regions can be found as:

$$ P(A \cap \bar{B}) = P(A) - P(A \cap B) $$
$$ P(\bar{A} \cap B) = P(B) - P(A \cap B) $$
$$ P(\bar{A} \cap \bar{B}) = 1 - P(A) - P(B) + P(A \cap B) $$

The complement of “both events happen” is “at least one of the two events does not happen.” That is:

$$ P(\bar{A} \cup \bar{B}) = 1 - P(A \cap B) $$

Conditional Probability

Conditional probability looks at one event inside the part of the sample space where another event has already happened.

The probability of \(A\) given \(B\) is:

$$ P(A \mid B) = \frac{P(A \cap B)}{P(B)} $$

This formula only works when \(P(B) > 0\). If \(P(B) = 0\), then \(P(A \mid B)\) is undefined because the denominator is zero.

Similarly:

$$ P(B \mid A) = \frac{P(A \cap B)}{P(A)} $$

This formula only works when \(P(A) > 0\).

It is important to keep the direction straight. In general, \(P(A \mid B)\) and \(P(B \mid A)\) are not the same number.

Independence

Two events are independent when the joint probability equals the product of the two marginal probabilities:

$$ P(A \cap B) = P(A)P(B) $$

If the actual overlap is larger than \(P(A)P(B)\), the events occur together more often than expected under independence. If the actual overlap is smaller than \(P(A)P(B)\), they occur together less often than expected under independence.

Independence is not the same as being mutually exclusive. If two events are mutually exclusive, then \(P(A \cap B)=0\). If both events have positive probability, that usually makes them dependent, not independent, because \(P(A)P(B)\) would be greater than \(0\).


Examples of Joint Probability in Practice

Example 1: Direct Probabilities

Suppose:

  • \(P(A)=0.60\)
  • \(P(B)=0.50\)
  • \(P(A \cap B)=0.30\)

The joint probability is already given:

$$ P(A \cap B)=0.30 $$

As a percentage, the probability that both events occur is:

$$ 0.30 \times 100 = 30\% $$

The probability that \(A\) or \(B\) occurs is:

$$ P(A \cup B)=0.60+0.50-0.30=0.80 $$

So there is an \(80\%\) chance that at least one of the two events occurs.

To check independence, compare the joint probability with \(P(A)P(B)\):

$$ P(A)P(B)=0.60 \times 0.50=0.30 $$

Because this equals \(P(A \cap B)\), these two events are independent in this model.


Example 2: A 2×2 Table

Suppose a class survey records whether students attended a review session and whether they passed a quiz.

Passed quiz \(B\) Did not pass \(\bar{B}\) Total
Attended review \(A\) 40 10 50
Did not attend \(\bar{A}\) 30 20 50
Total 70 30 100

The total is \(100\), so each cell can be converted into a probability by dividing by \(100\).

The joint probability that a student attended the review and passed is:

$$ P(A \cap B)=\frac{40}{100}=0.40 $$

The marginal probabilities are:

$$ P(A)=\frac{50}{100}=0.50 $$
$$ P(B)=\frac{70}{100}=0.70 $$

The probability that a student attended the review or passed the quiz is:

$$ P(A \cup B)=0.50+0.70-0.40=0.80 $$

The probability that a student attended the review given that the student passed is:

$$ P(A \mid B)=\frac{P(A \cap B)}{P(B)}=\frac{0.40}{0.70}\approx 0.5714 $$

So among the students who passed, about \(57.14\%\) attended the review.


Example 3: Mutually Exclusive Events

Suppose:

  • \(P(A)=0.35\)
  • \(P(B)=0.45\)
  • \(P(A \cap B)=0\)

Because the joint probability is zero, the events do not overlap. The probability that \(A\) or \(B\) occurs is:

$$ P(A \cup B)=0.35+0.45-0=0.80 $$

The independence comparison is:

$$ P(A)P(B)=0.35 \times 0.45=0.1575 $$

Because \(0 \ne 0.1575\), the events are not independent. They are mutually exclusive, which means one event happening rules out the other.


How to Interpret the Result

The primary result, \(P(A \cap B)\), is the probability that both events occur together.

A low joint probability means the overlap is small. That may happen because one or both events are rare, because the events rarely occur together, or both.

A high joint probability means the overlap is large. However, a high joint probability does not automatically prove a relationship. If both \(A\) and \(B\) are very common, their overlap may be high even when the events are independent.

Always compare the joint probability with the marginal probabilities:

$$ P(A \cap B) \le P(A) $$
$$ P(A \cap B) \le P(B) $$

The overlap cannot be larger than either event by itself. If a proposed joint probability is larger than \(P(A)\) or \(P(B)\), the probability model is impossible.

The union result, \(P(A \cup B)\), means the probability that at least one event occurs. It includes three regions: \(A\) only, \(B\) only, and both.

The conditional results answer different questions:

  • \(P(A \mid B)\) means “among the cases where \(B\) happened, how often did \(A\) also happen?”
  • \(P(B \mid A)\) means “among the cases where \(A\) happened, how often did \(B\) also happen?”

The independence check compares the actual overlap with the overlap expected if the events were independent:

$$ \text{Expected overlap under independence} = P(A)P(B) $$

If the two values are equal, the events are independent in the two-event probability model. If they are not equal, the events are dependent in that model.


Common Mistakes and Misconceptions

Entering percentages instead of decimals. A probability of \(60\%\) should be entered as \(0.60\) in direct probability mode, not as \(60\).

Confusing “and” with “or.” \(P(A \cap B)\) means both events happen. \(P(A \cup B)\) means at least one event happens. The union is usually larger than the intersection.

Forgetting to subtract the overlap. When calculating \(P(A \cup B)\), the overlap is counted twice if you simply add \(P(A)\) and \(P(B)\). The correct formula subtracts \(P(A \cap B)\) once.

Using an impossible joint probability. The joint probability cannot be greater than either individual probability. For example, if \(P(A)=0.40\), then \(P(A \cap B)\) cannot be \(0.50\).

Assuming \(P(A \mid B)\) equals \(P(B \mid A)\). These two conditional probabilities often answer different questions and can be very different.

Confusing mutually exclusive events with independent events. Mutually exclusive events cannot happen together. Independent events can happen together, but one event does not change the probability of the other.

Treating table counts as final probabilities. In a 2×2 table, the cell values are usually counts or frequencies. They become probabilities only after dividing by the table total.

Expecting a Venn diagram to be area-exact. A schematic Venn diagram is a visual aid. Unless it is specifically constructed to scale, its circle sizes and overlap should not be read as exact areas.


When to Use Joint Probability

Use joint probability when you need to study the overlap of two events, categories, or conditions.

Common use cases include:

  • Checking whether two events can happen together.
  • Calculating the probability that a randomly selected observation has two characteristics.
  • Turning a 2×2 count table into probabilities.
  • Finding \(P(A \cup B)\) without double-counting the overlap.
  • Calculating \(P(A \mid B)\) or \(P(B \mid A)\).
  • Comparing the observed overlap with the independent-events expectation \(P(A)P(B)\).
  • Explaining Venn diagrams, contingency tables, and two-event probability models.

Limitations and Things to Keep in Mind

Joint probability calculations depend on the quality of the inputs. A mathematically correct result can still be misleading if the probabilities or table values come from biased, incomplete, or poorly defined data.

For direct probabilities, the values must form a consistent two-event model. In particular:

$$ P(A \cap B) \le \min(P(A),P(B)) $$

and

$$ P(A \cup B) \le 1 $$

Because:

$$ P(A \cup B)=P(A)+P(B)-P(A \cap B) $$

For table inputs, each cell should be nonnegative, and the table total must be greater than zero. The probabilities from the table represent shares of the table total, not necessarily universal or population-wide probabilities.

Rounding can also affect how results appear. A value shown as a percentage may be rounded, and a very small nonzero probability may be displayed in exponential notation. Avoid rounding too early when doing multi-step probability work.

This type of calculation is limited to two events. More complex situations involving three or more events may require additional formulas, assumptions, or a different model.

For decisions involving money, health, safety, engineering, legal obligations, scientific claims, or official records, use probability calculations as a supporting tool rather than as the only basis for a decision. When the stakes are high, check the data source and consult a qualified professional.


How to Use This Calculator

  1. Choose direct mode if you already know \(P(A)\), \(P(B)\), and \(P(A \cap B)\).
  2. In direct mode, enter probabilities as decimals from \(0\) to \(1\). Direct decimal inputs support at most 512 digits and an exponent magnitude of at most 512. For example, enter \(60\%\) as \(0.60\).
  3. Choose table mode if you have a 2×2 table of counts, frequencies, weights, or proportional cell values.
  4. In table mode, enter nonnegative values for \(A\) and \(B\), \(A\) and not \(B\), not \(A\) and \(B\), and neither. Blank cells are treated as \(0\).
  5. Review the primary result, \(P(A \cap B)\), shown as both a percentage and a decimal.
  6. Check the derived values for \(P(A)\), \(P(B)\), \(P(A \cup B)\), \(P(A \mid B)\), \(P(B \mid A)\), and \(P(\bar{A} \cup \bar{B})\).
  7. Use the normalized table to see how the four regions and margins relate.
  8. Use the independence comparison to see whether the observed overlap is equal to, above, or below \(P(A)P(B)\).
  9. Treat the Venn diagram as a schematic visual aid, not as an area-exact diagram.

Frequently Asked Questions

What is the difference between joint probability and conditional probability?

Joint probability asks how likely it is that two events happen together. Conditional probability asks how likely one event is after another event is already known to have happened. The joint probability \(P(A \cap B)\) is used inside the conditional probability formula.


Can a joint probability be greater than \(P(A)\) or \(P(B)\)?

No. The overlap of two events cannot be larger than either event by itself. If \(P(A \cap B)\) is greater than \(P(A)\) or greater than \(P(B)\), the inputs do not describe a valid two-event probability model.


What does \(P(A \cup B)\) mean?

\(P(A \cup B)\) means the probability that \(A\) happens, \(B\) happens, or both happen. In probability, “or” is usually inclusive unless stated otherwise. That is why the formula subtracts the overlap once.


What does it mean if \(P(A \mid B)\) is undefined?

\(P(A \mid B)\) is undefined when \(P(B)=0\). Conditional probability requires narrowing the sample space to the cases where \(B\) occurred. If \(B\) has probability zero, there is no positive-probability conditioning group to divide by.


How do I know whether two events are independent?

Compare \(P(A \cap B)\) with \(P(A)P(B)\). If the two values are equal, the events are independent in this model. If they are not equal, the events are dependent.


Are mutually exclusive events independent?

Usually no, if both events have positive probability. Mutually exclusive events have \(P(A \cap B)=0\), while independent events require \(P(A \cap B)=P(A)P(B)\). If \(P(A)\) and \(P(B)\) are both greater than \(0\), then \(P(A)P(B)\) is greater than \(0\), so the two conditions cannot both hold.


Why does table mode divide every cell by the total?

Dividing by the total converts counts, frequencies, or weights into probabilities. For example, if the table total is \(200\) and the \(A\) and \(B\) cell is \(50\), then the normalized joint probability is:

$$ P(A \cap B)=\frac{50}{200}=0.25 $$

That means \(25\%\) of the table falls in the overlap.


Sources and References

Books and Textbooks

  1. OpenStax. Introductory Statistics 2e. Rice University/OpenStax, 2023. Sections 1.1, “Definitions of Statistics, Probability, and Key Terms,” and 3.3, “Two Basic Rules of Probability.” https://openstax.org/books/introductory-statistics-2e/pages/1-1-definitions-of-statistics-probability-and-key-terms; https://openstax.org/books/introductory-statistics-2e/pages/3-3-two-basic-rules-of-probability
  1. Diez, David M.; Barr, Christopher D.; and Çetinkaya-Rundel, Mine. OpenIntro Statistics, 4th ed., OpenIntro, 2019. Chapter 2, Sections 2.1, “Defining Probability,” and 2.2, “Conditional Probability I,” available through Statistics LibreTexts and OpenIntro. https://stats.libretexts.org/Bookshelves/IntroductoryStatistics/OpenIntroStatistics%28Diezetal%29./02%3AProbability/2.01%3ADefiningProbability; https://stats.libretexts.org/Bookshelves/IntroductoryStatistics/OpenIntroStatistics%28Diezetal%29./02%3AProbability/2.02%3AConditionalProbability_I