# Conditional Probability Calculator

Calculate P(A given B) from joint probability P(A and B) and condition probability P(B)

> Canonical page: https://elysiatools.com/en/tools/conditional-probability-calculator

- **Category:** Math & Numbers

- **Keywords:** conditional probability, p a given b, joint probability, statistics, probability

## Overview

Calculate conditional probability.

Conditional probability answers: if event B has happened, what is the probability that event A also happened?

Formula: P(A | B) = P(A and B) / P(B).

## Inputs

- **Joint Probability P(A and B)** (number)
- **Condition Probability P(B)** (number)
- **Input Scale** (select)
- **Decimal Places** (number)

## When to use

- Solving statistics homework or academic problems involving basic probability rules.
- Analyzing datasets to find the likelihood of a specific outcome within a filtered subset of data.
- Evaluating risk or forecasting events in business and finance based on prior occurrences.

## How it works

- Enter the joint probability P(A and B), which is the likelihood of both events happening together.
- Input the condition probability P(B), representing the likelihood of the known or prior event.
- Select your preferred input scale (Percent or Proportion) and set the desired decimal precision.
- The calculator divides the joint probability by the condition probability to output the exact conditional probability P(A given B).

## Use cases

- Medical testing: Calculating the probability of a patient actually having a disease given a positive test result.
- Marketing analytics: Determining the likelihood of a customer making a purchase given they clicked on a specific promotional banner.
- Quality control: Finding the probability of a product defect given that it was manufactured on a specific assembly machine.

## Frequently asked questions

### What is conditional probability?

Conditional probability is the likelihood of an event or outcome occurring, based on the occurrence of a previous event or outcome. It is denoted mathematically as P(A | B).

### What is the formula for conditional probability?

The formula is P(A | B) = P(A and B) / P(B), where P(A and B) is the joint probability of both events, and P(B) is the probability of the condition event.

### Can I use percentages instead of decimals?

Yes, the calculator allows you to select either 'Percent' or 'Proportion' as your input scale, automatically handling the mathematical conversions for you.

### What happens if the condition probability P(B) is zero?

If P(B) is zero, the conditional probability is undefined because an event that has a zero percent chance of happening cannot be the given condition.

### What is the difference between joint and conditional probability?

Joint probability measures the likelihood of two events happening at the exact same time. Conditional probability measures the likelihood of one event happening given that the other has already occurred.

## Related tools

- [Absolute Value Calculator](https://elysiatools.com/en/tools/absolute-value-calculator): Calculate the absolute value of positive, negative, or decimal numbers and explain the sign relationship
- [Adjusted R-Squared Calculator](https://elysiatools.com/en/tools/adjusted-r-squared-calculator): Calculate adjusted R squared from R squared, sample size, and predictor count
- [Air Changes per Hour (ACH, n = Q/V)](https://elysiatools.com/en/tools/air-changes-per-hour): Compute the air change rate (ACH / n) of a room from the outdoor supply airflow Q and the room volume V: n = Q/V (1/h). Three modes: solve ACH (given Q and V), solve airflow (given n and V), or solve volume (given n and Q). Flow in m³/s/m³/h/CFM, volume in m³/ft³/L. Also reports the well-mixed single-zone purge time to reach a target residual fraction ε (default 1%): t = −ln(ε)/n hours.
- [Bearing Life L10 Calculator](https://elysiatools.com/en/tools/bearing-life-l10): Calculate the basic rating life of a rolling bearing: L10 = (C/P)^p, with p = 3 for ball bearings and p = 10/3 for roller bearings. When a speed is provided, converts to L10h in operating hours.
- [Bolt Torque Clamp Force Calculator](https://elysiatools.com/en/tools/bolt-torque-clamp-force): Convert between bolt tightening torque and axial clamp force. T = K·F·d, where K is the nut factor (~0.20 for dry steel). Solve torque from force, or force from torque.
- [Chain Sprocket Ratio Calculator](https://elysiatools.com/en/tools/chain-sprocket-ratio): Calculate the ratio, driven speed and chain linear speed of a chain drive. i = z₂/z₁ = n₁/n₂, chain speed v = z₁·p·n₁/60000. Enter the pitch to compute chain speed.
- [Condensing / Evaporating Temperature Calculator](https://elysiatools.com/en/tools/condensing-temperature-calculator): Estimate the saturated condensing temperature (T_cond) and evaporating temperature (T_evap) of a refrigeration circuit. Three modes: (1) from coil approach — T_cond = T_ambient + condenser ΔT approach, T_evap = T_medium − evaporator ΔT approach; (2) from measured saturated pressures — given P_cond and P_evap for a known refrigerant (R-22 / R-134a / R-410A), invert the Antoine fit; (3) from subcooling & superheat — T_cond = T_liquid − SC, T_evap = T_suction − SH. Temperature in °C/K/°F; pressure in bar/MPa/kPa/PSI absolute or gauge (atmospheric default 1.01325 bar). Results reported in °C.
- [Cooling Load Calculator (Area / U-value + Infiltration)](https://elysiatools.com/en/tools/cooling-load-calculator): Estimate the cooling load of a room by the simplified ASHRAE steady-state method. Transmission sensible load Q_trans = Σ(A_i·U_i·ΔT) over envelope surfaces entered one per line as 'area,U' (U in W/(m²·K)). Infiltration/ventilation sensible Q_s = 1.23·ACH·V·ΔT and latent Q_l = 3010·ACH·V·ΔW (W), where ΔW is the indoor-outdoor humidity-ratio difference derived from dry-bulb temperature and relative humidity via the Magnus saturation fit. Total cooling load = total sensible + total latent. Temperature in °C/K/°F (only differences matter), area in m²/ft².

## Samples

- [Web Image Processing Python Samples](https://elysiatools.com/en/samples/web-image-processing-python): Web Python image processing examples using PIL/Pillow including reading, saving, resizing, and format conversion
- [Android Image Processing Java Samples](https://elysiatools.com/en/samples/android-image-processing-java): Android Java image processing examples including reading/saving images, scaling, and format conversion
- [Android Image Processing Kotlin Samples](https://elysiatools.com/en/samples/android-image-processing-kotlin): Android Kotlin image processing examples including reading/saving images, scaling, and format conversion
- [Web Image Processing Rust Samples](https://elysiatools.com/en/samples/web-image-processing-rust): Web Rust image processing examples including image read/save, scaling, and format conversion
