Calculators King

Probability

Conditional Probability Calculator

Divide a joint probability by P(B) to get P(A given B), and check independence when P(A) is also supplied.

Worksheet

Press Calculate to see the result.

Divide a joint probability by P(B) to get P(A given B), and check independence when P(A) is also supplied.

What this calculator answers

Conditional probability answers a narrowed question: among the outcomes where B happens, what share also have A. The definition is the joint probability divided by P(B). Nothing else is required for that quotient. If you also know P(A), the page compares the joint probability with the product P(A) times P(B). When those two are within 0.02, independence approximately holds and learning B does not move the probability of A. When they differ, A and B carry information about each other.

P(A given B) is the joint divided by P(B). If P(A) is blank, the independence sentence is skipped. If P(A) is present, the page reports whether the joint is within 0.02 of the product P(A) P(B). Supporting counts and intermediate terms sit under the headline so a reader can see what was divided by what. When a checkbox or a tail setting changes the divisor or the rejection region, that choice appears in the steps rather than vanishing into a silent default.

The formula, written out

Definition of conditional probability uses this relationship.

P(A|B) = P(A and B) / P(B). Independence: P(A and B) ≈ P(A) P(B).

  • P(A and B). The probability that both events happen.
  • P(B). The probability of the conditioning event.
  • P(A|B). The probability of A among the outcomes where B happens.
  • P(A) P(B). The joint probability independence would have produced.

Restricting attention to the outcomes in B rescales their probabilities so they add to 1. Dividing the joint slice by P(B) is that rescaling. Independence means the slice equals the rectangle P(A) times P(B), which is equivalent to P(A given B) equaling P(A). The 0.02 band is a numerical tolerance for approximate independence, not a hypothesis test. The algebra is the named textbook identity for this worksheet. Intermediate products and quotients appear in order so a calculator and a pencil can agree to the displayed rounding. If a neighbouring page uses a different divisor or a continuity correction, that page says so on its own ticket.

A full worked example

Example loaded in the worksheet

The form is prefilled with a small example so every arithmetic step can be checked by hand. Change one field after you finish the walkthrough and confirm the ticket moves the way the formula predicts.

P(A and B) is 0.12 and P(B) is 0.4. P(A|B) = 0.12 / 0.4 = 0.3. The conditioning event has probability 0.4, which is greater than 0, so the division is defined.

The joint 0.12 does not exceed P(B). P(A) is 0.5, so the independence product is 0.5 × 0.4 = 0.2. The joint is 0.12 and the absolute gap is 0.08.

The gap is greater than 0.02, so independence does not approximately hold. P(A|B) = 0.3 differs from P(A) = 0.5. The 0.02 band is a numerical reading aid for these inputs, not a hypothesis test.

Figures from the worked example
P(A|B)0.3
P(A and B)0.12
P(B)0.4
P(A)0.5
IndependenceNo

A second situation

A joint probability that matches independence

P(A and B) is 0.2 and P(B) is 0.4. P(A|B) = 0.2 / 0.4 = 0.5. The conditioning event has probability 0.4, which is greater than 0, so the division is defined.

The joint 0.2 does not exceed P(B). P(A) is 0.5, so the independence product is 0.5 × 0.4 = 0.2. The joint is 0.2 and the absolute gap is 0.

The gap is at most 0.02, so independence approximately holds. P(A|B) is close to P(A). The 0.02 band is a numerical reading aid for these inputs, not a hypothesis test.

Figures from the worked example
P(A|B)0.5
P(A and B)0.2
P(B)0.4
P(A)0.5
IndependenceApproximately yes

A joint of 0.20 with P(A) = 0.50 and P(B) = 0.40 matches the product exactly, so the conditional probability equals P(A) and the independence check passes. A joint that misses the product moves P(A given B) away from P(A) and the check fails. The division formula did not change. The second example changes the feature that this formula is sensitive to, and the ticket shows the new figure beside the same definition. That contrast is the fastest way to see which input owns the movement.

What moves when the input moves

P(B) moved from 0.40 to 0.60 while the joint probability stayed at 0.12. The headline result went from 0.3 to 0.2.

The nudged inputs

P(A and B) is 0.12 and P(B) is 0.6. P(A|B) = 0.12 / 0.6 = 0.2. The conditioning event has probability 0.6, which is greater than 0, so the division is defined.

The joint 0.12 does not exceed P(B). P(A) is 0.5, so the independence product is 0.5 × 0.6 = 0.3. The joint is 0.12 and the absolute gap is 0.18.

The gap is greater than 0.02, so independence does not approximately hold. P(A|B) = 0.2 differs from P(A) = 0.5. The 0.02 band is a numerical reading aid for these inputs, not a hypothesis test.

Figures from the worked example
P(A|B)0.2
P(A and B)0.12
P(B)0.6
P(A)0.5
IndependenceNo

How to read the result

Read P(A given B) as a probability inside the world where B is known, not as a joint and not as P(B given A). Those three numbers are different questions. The independence line is a comparison of two products, not a causal claim. Say the unit, the sample size or contract terms, and the formula name in the same sentence as the figure. A number without those three pieces invites a later reader to invent a definition that this page never used.

Write the result with its unit, the inputs that produced it, and the name of the formula. Write the result with its unit, the inputs that produced it, and the name of the formula. If the ticket shows a decision sentence, quote the alpha and the tail with it. If the ticket shows a money or dose figure, quote the rate and the schedule that produced it.

Assumptions that have to stay true

  • P(B) is greater than 0, because the definition divides by it.
  • The joint does not exceed P(B) or, when supplied, P(A).
  • All inputs are proportions from 0 to 1.
  • The 0.02 band is an approximate numerical check, not a significance test.

If an assumption above is false, do not average the discomfort away. Change the worksheet or change the question. A correct arithmetic step on the wrong model is still the wrong answer for the decision you are trying to make.

Mistakes that change the answer

  • Dividing by P(A) when the question was A given B.
  • Calling the joint a conditional probability without dividing.
  • Declaring independence from a story about separate causes while the numbers disagree.
  • Leaving P(B) at 0. Conditioning on an impossible event is undefined.

Where a different calculator is the honest choice

Use the Bayes theorem calculator when the inputs are prevalence, sensitivity, and specificity rather than a joint and a marginal. Use the probability calculator for a complement, a union, or at least one success. Use the expected value calculator when the next step is a weighted average of payoffs. Related links under the essay open pages that keep their own formulas instead of hiding a mode switch inside this ticket.

When the job changes, move to a page built for that job: Bayes Theorem Calculator, Probability Calculator, Expected Value Calculator.

Check yourself

P(A and B) is 0.12 and P(B) is 0.40. If P(A) is 0.50, what is P(A given B), and does independence hold?

P(A given B) = 0.12 / 0.40 = 0.30. The product P(A) P(B) is 0.20, and |0.12 − 0.20| = 0.08, which is larger than 0.02, so independence does not approximately hold.

Using the result in a sentence

Classroom tables of two events, checking whether two survey answers move together, and the first step of a Bayes problem when the joint is already known. Keep the count, the unit, and the assumption list beside any copy of the number that leaves this browser tab.

Approximate independence within 0.02 can still matter in a large population, and a gap below 0.02 can still be real structure. The check is a reading aid. Dependence also does not say which event causes the other. Pair the headline with the steps before you staff a route, set a grade boundary, or compare two contracts from a single number.

Questions people ask next

01What definition does the Conditional Probability Calculator commit to?

This page uses Definition of conditional probability: P(A|B) = P(A and B) / P(B). Independence: P(A and B) ≈ P(A) P(B).. Restricting attention to the outcomes in B rescales their probabilities so they add to 1. Dividing the joint slice by P(B) is that rescaling. Independence means the slice equals the rectangle P(A) times P(B), which is equivalent to P(A given B) equaling P(A). The 0.02 band is a numerical tolerance for approximate independence, not a hypothesis test. If a textbook uses a different divisor, a different continuity correction, or a different rounding rule, the last digits can move, so the definition is printed above the result. The worksheet asks for P(A and B), P(B), P(A), optional, and it refuses a blank that the formula cannot interpret. Keep that printed definition in the sentence you write next to the figure so a later reader can rebuild the arithmetic without guessing which convention you chose.

02How should the worked example be read out loud?

In the loaded example the p(a|b) is 0.3. Read P(A given B) as a probability inside the world where B is known, not as a joint and not as P(B given A). Those three numbers are different questions. The independence line is a comparison of two products, not a causal claim. Say the unit and the count before you say whether the number is large or small. Read the steps in order rather than jumping to the headline, because the intermediate terms are where a swapped percent and proportion usually hide. If the ticket shows both a primary figure and a comparison figure, name which one you are quoting.

03What is the fastest way to get a misleading result?

Dividing by P(A) when the question was A given B. Approximate independence within 0.02 can still matter in a large population, and a gap below 0.02 can still be real structure. The check is a reading aid. Dependence also does not say which event causes the other. A second common failure is leaving a checkbox or tail setting in the wrong state and then treating the number as if the default had matched your plan. Reset the example, change one input, and confirm the ticket moves in the direction the formula predicts before you trust a live run.

04When should I leave this page for a different calculator?

Use the Bayes theorem calculator when the inputs are prevalence, sensitivity, and specificity rather than a joint and a marginal. Use the probability calculator for a complement, a union, or at least one success. Use the expected value calculator when the next step is a weighted average of payoffs. The related links under the essay go to those worksheets, which keep their own formulas instead of hiding them in a mode switch. If the question changed from a summary to a test, from a payment to a refinance, or from a raw score to a percentile, switch pages rather than forcing this ticket to answer a job it was not built for.

05What belongs in the sentence next to the number?

P(A given B) = 0.12 / 0.40 = 0.30. The product P(A) P(B) is 0.20, and |0.12 − 0.20| = 0.08, which is larger than 0.02, so independence does not approximately hold. Name the formula, the sample size or the inputs, and the unit before you compare the figure with someone else's. A bare number without those three pieces cannot be audited when a score, a rate, or a lab value is challenged later. Store the inputs beside the result whenever the figure will travel into a report.