Skip to main content
ScanSolve logoScanSolve
Toggle sidebar
  • Home
  • Tutor
  • Humanizer
  • AI Detector
  • Questions
  • Blog
  • Mobile App

  • Home
  • Tutor
  • Humanizer
  • AI Detector

  • Questions
    Math homework helpMath
    Physics homework helpPhysics
    Chemistry homework helpChemistry
    Biology homework helpBiology
    Computer Science homework helpComputer Science
    History homework helpHistory
    More homework helpMore
  • Blog

  • Mobile App

Browse Subjects

  • Math
  • Physics
  • Chemistry
  • Biology
  • Computer Science
  • History
  • All Subjects
ScanSolvePLUS
  • Unlimited answers
  • ScanSolve AI Pro
Start Free Trial →
Try on WhatsApp
App StoreGoogle Play

Scan it, Solve it

support@getscansolve.com

© 2026 ScanSolve. All rights reserved.

Company

About UsCareersContact Us

Resources

Questions HubAI HumanizerAI DetectorBlog

Support

FAQTerms of ServicePrivacy Policy

Download App

Download ScanSolve on App StoreGet ScanSolve on Google PlayChat on WhatsApp
Home/Blog/How to Calculate Probability: Basic, Conditional & Bayes' Theorem
Mathematics

How to Calculate Probability: Basic, Conditional & Bayes' Theorem

Updated March 10, 202610 min read
Probability concepts diagram with dice, cards, and Venn diagrams

What Is Probability?

Probability is the mathematical study of randomness and uncertainty. It quantifies how likely an event is to occur on a scale from 0 (impossible) to 1 (certain). A probability of 0.5 means the event is equally likely to happen or not happen — like flipping a fair coin. Probability can also be expressed as a percentage (50%) or a fraction (1/2).

The concept of probability emerged in the 16th and 17th centuries from gambling problems. Blaise Pascal and Pierre de Fermat developed the foundations of probability theory through their correspondence about dice games in 1654. Today, probability is essential in fields ranging from medicine (interpreting diagnostic tests) to finance (assessing investment risk) to artificial intelligence (training machine learning models).

There are three main interpretations of probability. Classical probability is based on equally likely outcomes (rolling a die). Empirical (experimental) probability is based on observed data (the probability it will rain tomorrow, based on historical weather data). Subjective probability is based on personal judgment or belief (a doctor's estimate of a patient's recovery chance). In most math courses, you will work primarily with classical and empirical probability.

Basic Probability: The Counting Method

How to calculate probability examples

The fundamental formula for classical probability is: P(A) = (number of favorable outcomes) / (total number of possible outcomes). This assumes all outcomes are equally likely. For example, the probability of rolling a 3 on a fair six-sided die is P(3) = 1/6 ≈ 0.167, because there is 1 favorable outcome out of 6 equally likely outcomes.

For a standard deck of 52 playing cards: the probability of drawing a heart is P(heart) = 13/52 = 1/4 = 0.25, because there are 13 hearts in the deck. The probability of drawing a face card (jack, queen, or king) is P(face) = 12/52 = 3/13 ≈ 0.231, because there are 12 face cards (3 per suit × 4 suits).

The complement of an event A, written A' or Ā, is the event that A does NOT occur. P(A') = 1 - P(A). This is often the easiest way to solve 'at least one' problems. For example, the probability of rolling at least one six in two rolls: P(at least one 6) = 1 - P(no sixes) = 1 - (5/6)(5/6) = 1 - 25/36 = 11/36 ≈ 0.306.

The Addition Rule: P(A or B)

The addition rule calculates the probability that at least one of two events occurs. For mutually exclusive events (events that cannot happen simultaneously), the rule is simple: P(A or B) = P(A) + P(B). Rolling a 2 or a 5 on a die: P(2 or 5) = 1/6 + 1/6 = 2/6 = 1/3.

For non-mutually exclusive events (events that can happen together), you must subtract the overlap to avoid double-counting: P(A or B) = P(A) + P(B) - P(A and B). What is the probability of drawing a heart or a king from a standard deck? P(heart) = 13/52, P(king) = 4/52, P(heart AND king) = 1/52 (the king of hearts). So P(heart or king) = 13/52 + 4/52 - 1/52 = 16/52 = 4/13 ≈ 0.308.

A common mistake is forgetting to subtract the intersection. If two events CAN occur together, always check whether you need the general addition rule. A quick test: is there any outcome that belongs to both events? If yes, subtract P(A and B).

The Multiplication Rule: P(A and B)

The multiplication rule calculates the probability that two events both occur. For independent events (where the occurrence of one does not affect the other): P(A and B) = P(A) × P(B). The probability of flipping heads twice in a row: P(H and H) = 1/2 × 1/2 = 1/4.

For dependent events (where one event affects the probability of the other), use: P(A and B) = P(A) × P(B|A), where P(B|A) is the conditional probability of B given that A has occurred. Drawing two aces in a row from a deck without replacement: P(first ace) = 4/52. Given the first was an ace, P(second ace) = 3/51. So P(two aces) = 4/52 × 3/51 = 12/2652 = 1/221 ≈ 0.0045.

To determine whether events are independent, check if P(A and B) = P(A) × P(B). If this equation holds, the events are independent. Drawing cards with replacement is independent; drawing without replacement is dependent. Rolling two separate dice is independent; drawing two cards from the same deck without replacement is dependent.

Conditional Probability: P(A|B)

Conditional probability answers the question: 'Given that event B has occurred, what is the probability that event A also occurs?' The formula is: P(A|B) = P(A and B) / P(B). The vertical bar '|' is read as 'given.'

Example: In a class of 30 students, 18 play sports and 12 are on the honor roll. 8 students both play sports and are on the honor roll. If a student is selected at random and you learn they play sports, what is the probability they are on the honor roll? P(honor roll | sports) = P(honor roll and sports) / P(sports) = (8/30) / (18/30) = 8/18 = 4/9 ≈ 0.444.

Notice that P(A|B) is NOT the same as P(B|A). P(honor roll | sports) = 4/9, but P(sports | honor roll) = (8/30) / (12/30) = 8/12 = 2/3 ≈ 0.667. Confusing these two conditional probabilities is one of the most common errors in probability and statistics — and it has real-world consequences, especially in medical testing and legal reasoning.

Bayes' Theorem: Updating Probabilities with New Evidence

Bayes' theorem provides a way to update the probability of a hypothesis based on new evidence. The formula is: P(A|B) = P(B|A) × P(A) / P(B). Here, P(A) is the prior probability (what you believed before seeing the evidence), P(B|A) is the likelihood (how probable the evidence is if A is true), and P(A|B) is the posterior probability (what you believe after seeing the evidence).

Classic example: A medical test for a disease is 99% accurate (it correctly identifies 99% of sick people and 99% of healthy people). The disease affects 1% of the population. If you test positive, what is the probability you actually have the disease? Intuitively, most people guess 99%, but the answer is much lower.

Using Bayes' theorem: P(disease | positive) = P(positive | disease) × P(disease) / P(positive). P(positive) = P(positive | disease) × P(disease) + P(positive | no disease) × P(no disease) = 0.99 × 0.01 + 0.01 × 0.99 = 0.0099 + 0.0099 = 0.0198. So P(disease | positive) = (0.99 × 0.01) / 0.0198 = 0.0099 / 0.0198 = 0.50 or 50%. Even with a 99% accurate test, a positive result only means a 50% chance of having the disease when the disease is rare. This counterintuitive result is why screening tests often require confirmation.

Common Probability Mistakes and Practice Tips

The gambler's fallacy is the belief that past random events affect future ones. If a coin lands heads five times in a row, the probability of heads on the next flip is still exactly 50%. The coin has no memory. Each flip is independent.

Another common error is neglecting the base rate, as illustrated by the medical test example above. When the base rate (prior probability) is very low, even highly accurate tests produce many false positives. Always consider how common the event is before interpreting conditional probabilities.

When solving probability problems, draw a tree diagram or create a two-way table. These visual tools make it much easier to identify all possible outcomes and avoid counting errors. For complex problems involving multiple events, a tree diagram branches at each decision point, and you multiply along branches to find joint probabilities. If you are stuck on a probability problem, snap a photo and ScanSolve will walk you through the solution step by step.

ScanSolve Editorial Team

ScanSolve Editorial Team

Our team of educators and AI specialists creates step-by-step guides to help students master every subject.

In This Article

  • What Is Probability?
  • Basic Probability: The Counting Method
  • The Addition Rule: P(A or B)
  • The Multiplication Rule: P(A and B)
  • Conditional Probability: P(A|B)
  • Bayes' Theorem: Updating Probabilities with New Evidence
  • Common Probability Mistakes and Practice Tips

Explore More Homework Help

Statistics Homework HelpMathematics Homework HelpAlgebra Homework HelpData Science Homework HelpBrowse All Questions

Need Help With Your Homework?

Snap a photo of any homework problem and get a step-by-step solution instantly. ScanSolve handles math, science, history, and more.

Try ScanSolve Free

Related Articles

Quadratic formula and parabola graph showing the solutions of a quadratic equation
Mathematics

How to Solve Quadratic Equations: Complete Step-by-Step Guide

Learn how to solve quadratic equations using factoring, the quadratic formula, and completing the square. Step-by-step examples with detailed explanations for students.

Right triangle diagram showing the Pythagorean theorem with sides a, b, and hypotenuse c
Mathematics

What Is the Pythagorean Theorem? Formula, Proof & Examples

Learn the Pythagorean theorem with clear examples and proofs. Understand a² + b² = c² and how to use it to find missing sides of right triangles.

Triangle area formulas diagram showing base-height, Heron, and trigonometric methods
Mathematics

How to Find the Area of a Triangle: Formulas, Heron's Formula & Examples

Learn how to find the area of a triangle using base and height, Heron's formula, and trigonometry. Step-by-step examples and practice problems for geometry students.