{
  "id": "conditional-probability",
  "title": "Conditional Probability",
  "lang": "en",
  "source_lang": "en",
  "summary": "Conditional probability measures the probability of an event when specified information or another event is taken as given.",
  "category": "mathematics",
  "subcategory": "probability-statistics",
  "type": "concept",
  "aliases": [
    "Probability given an event"
  ],
  "generated_at": "2026-10-04",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/conditional-probability/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/conditional-probability/",
      "json": "https://aiwiki.page/zh/conditional-probability.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "Conditional probability is the probability assigned to an event when another event or specified information is taken as given. Written \\(P(A\\mid B)\\), it is read “the probability of \\(A\\) given \\(B\\).” Conditioning restricts attention to outcomes consistent with the information and adjusts their probabilities accordingly. It is a fundamental tool in statistics for describing dependence and reasoning under uncertainty. (pages.stat.wisc.edu)"
    },
    {
      "heading": "Definition and interpretation",
      "text": "Let \\(A\\) and \\(B\\) be events in a probability space \\((\\Omega,\\mathcal F,P)\\). If \\(P(B)>0\\), then\n\n\\[P(A\\mid B)=\\frac{P(A\\cap B)}{P(B)}.\\]\n\nHere \\(A\\cap B\\) is the event that both occur. The denominator rescales the probability within \\(B\\), making \\(B\\) itself have conditional probability one. Equivalently, \\(B\\) becomes the effective sample space. For fixed \\(B\\), the map \\(A\\mapsto P(A\\mid B)\\) obeys the usual probability axioms, including nonnegativity and countable additivity. (arxiv.org)\n\nFor example, consider a fair six-sided die. Let \\(A\\) mean “the result exceeds three” and \\(B\\) mean “the result is even.” Within \\(B=\\{2,4,6\\}\\), two of the three equally likely outcomes belong to \\(A\\), so \\(P(A\\mid B)=2/3\\), whereas \\(P(A)=1/2\\). This calculation illustrates restriction followed by normalization. Counting outcomes works directly only when the relevant outcomes are equally likely. (live.ocw.mit.edu)"
    },
    {
      "heading": "Multiplication and total probability",
      "text": "Rearranging the definition gives the multiplication rule:\n\n\\[P(A\\cap B)=P(A\\mid B)P(B).\\]\n\nRepeated application gives\n\n\\[P\\!\\left(\\bigcap_{i=1}^{n}A_i\\right) =P(A_1)\\prod_{i=2}^{n} P\\!\\left(A_i\\mid\\bigcap_{j=1}^{i-1}A_j\\right),\\]\n\nprovided the conditioning events have positive probability. This factorization expresses a joint probability through successive conditional probabilities; it does not require independence. (arxiv.org)\n\nThe law of total probability combines conditional probabilities across alternative cases. If \\(B_1,\\ldots,B_n\\) are mutually exclusive events covering the sample space, each with positive probability, then\n\n\\[P(A)=\\sum_{i=1}^{n}P(A\\mid B_i)P(B_i).\\]\n\nThus an unconditional probability is a weighted average of probabilities within the separate cases. The weights are their probabilities, not necessarily equal fractions. (live.ocw.mit.edu)"
    },
    {
      "heading": "Bayes’ theorem and reversed conditioning",
      "text": "In general, \\(P(A\\mid B)\\) and \\(P(B\\mid A)\\) differ. Bayes’ theorem relates them:\n\n\\[P(A\\mid B)=\\frac{P(B\\mid A)P(A)}{P(B)},\\]\n\nwhen the quantities on the right are defined. For a partition of possible hypotheses \\(H_i\\),\n\n\\[P(H_i\\mid E)= \\frac{P(E\\mid H_i)P(H_i)} {\\sum_j P(E\\mid H_j)P(H_j)}.\\]\n\nIn Bayesian inference, the prior distribution represents uncertainty before incorporating evidence, the likelihood function describes the evidence under each hypothesis, and the posterior distribution represents uncertainty after conditioning. (ocw.mit.edu)\n\nAs a calculated illustration, suppose a coin is selected with equal probability from a fair coin and a coin that always produces heads. After observing one head, the probability that the selected coin is the always-heads coin is\n\n\\[\\frac{1\\cdot(1/2)} {1\\cdot(1/2)+(1/2)\\cdot(1/2)} =\\frac23.\\]\n\nAlthough heads is certain under that hypothesis, the hypothesis is not certain after heads. Reversing the conditioning without accounting for the prior probabilities would confuse two different questions. (ocw.mit.edu)"
    },
    {
      "heading": "Independence and conditional independence",
      "text": "Events have statistical independence when\n\n\\[P(A\\cap B)=P(A)P(B).\\]\n\nFor \\(P(B)>0\\), this is equivalent to \\(P(A\\mid B)=P(A)\\): learning that \\(B\\) occurred leaves the probability of \\(A\\) unchanged. Independence is different from mutual exclusivity. Two mutually exclusive events with positive probabilities cannot be independent, because their intersection has probability zero. (pages.stat.wisc.edu)\n\nConditional independence is independence within a specified information state. Given an event \\(C\\) of positive probability, it means\n\n\\[P(A\\cap B\\mid C)=P(A\\mid C)P(B\\mid C).\\]\n\nNeither ordinary independence nor conditional independence implies the other in general. Conditioning can therefore reveal or remove statistical dependence rather than simply preserve it. (live.ocw.mit.edu)"
    },
    {
      "heading": "Conditional distributions",
      "text": "For discrete random variables \\(X\\) and \\(Y\\), their joint probability distribution determines the conditional probability mass function:\n\n\\[p_{X\\mid Y}(x\\mid y) =\\frac{p_{X,Y}(x,y)}{p_Y(y)}, \\qquad p_Y(y)>0.\\]\n\nFor each qualifying \\(y\\), these conditional probabilities sum to one. Their weighted average over \\(Y\\) recovers the distribution of \\(X\\). (ocw.mit.edu)\n\nIf \\(X\\) and \\(Y\\) have a joint probability density function, a corresponding conditional density is\n\n\\[f_{X\\mid Y}(x\\mid y) =\\frac{f_{X,Y}(x,y)}{f_Y(y)}, \\qquad f_Y(y)>0.\\]\n\nConditional probabilities are obtained by integrating this density over the desired values of \\(X\\). For continuously distributed \\(Y\\), the event \\(Y=y\\) has probability zero, so this construction is not an application of the elementary event-ratio formula. The conditional distribution also determines the conditional expectation \\(E[X\\mid Y=y]\\), its expected value when that value of \\(Y\\) is given. (ocw.mit.edu)"
    },
    {
      "heading": "Measure-theoretic formulation",
      "text": "In measure theory, information is represented by a sub-sigma-algebra \\(\\mathcal G\\subseteq\\mathcal F\\). Conditional probability is defined through conditional expectation:\n\n\\[P(A\\mid\\mathcal G)=E[\\mathbf1_A\\mid\\mathcal G],\\]\n\nwhere \\(\\mathbf1_A\\) equals one on \\(A\\) and zero elsewhere. This is generally a random variable, not a single number. It is \\(\\mathcal G\\)-measurable and satisfies\n\n\\[\\int_G P(A\\mid\\mathcal G)\\,dP=P(A\\cap G) \\quad\\text{for every }G\\in\\mathcal G.\\]\n\nIt is unique up to changes on sets of probability zero. This formulation accommodates conditioning on random variables without requiring their individual values to have positive probability; values on null sets are not uniquely determined by the defining identity. (arxiv.org)"
    }
  ],
  "links": [
    "probability",
    "statistics",
    "probability-space",
    "sample-space",
    "law-of-total-probability",
    "bayes-theorem",
    "bayesian-inference",
    "prior-distribution",
    "likelihood-function",
    "posterior-distribution",
    "statistical-independence",
    "conditional-independence",
    "random-variable",
    "joint-probability-distribution",
    "probability-mass-function",
    "probability-distribution",
    "probability-density-function",
    "conditional-expectation",
    "expected-value",
    "measure-theory",
    "sigma-algebra"
  ],
  "sources": [
    {
      "title": "pages.stat.wisc.edu/~kdlevin/teaching/Fall2022/STAT340/lecs/L05_IndepCondBayes.…",
      "url": "https://pages.stat.wisc.edu/~kdlevin/teaching/Fall2022/STAT340/lecs/L05_IndepCondBayes.html"
    },
    {
      "title": "arxiv.org/pdf/2010.16280",
      "url": "https://arxiv.org/pdf/2010.16280"
    },
    {
      "title": "live.ocw.mit.edu/courses/res-6-012-introduction-to-probability-spring-2018/d973…",
      "url": "https://live.ocw.mit.edu/courses/res-6-012-introduction-to-probability-spring-2018/d973b10c2587781f86ca4f2aff49098f_MITRES_6_012S18_Textbook.pdf"
    },
    {
      "title": "ocw.mit.edu/courses/6-1200j-mathematics-for-computer-science-spring-2024/mit6_1…",
      "url": "https://www.ocw.mit.edu/courses/6-1200j-mathematics-for-computer-science-spring-2024/mit6_1200j_s24_lec19.pdf"
    },
    {
      "title": "ocw.mit.edu/courses/18-440-probability-and-random-variables-spring-2014/45b2b86…",
      "url": "https://ocw.mit.edu/courses/18-440-probability-and-random-variables-spring-2014/45b2b86ffc4234ef33d78b9cbda159e9_MIT18_440S14_Lecture26.pdf"
    }
  ],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}