This article has multiple issues. Please help talk page. (Learn how and when to remove these template messages)
( or discuss these issues on the Learn how and when to remove this template message)

In probability theory, conditional probability is a measure of the probability of an event given that (by assumption, presumption, assertion or evidence) another event has occurred.^{[1]} If the event of interest is A and the event B is known or assumed to have occurred, "the conditional probability of A given B", or "the probability of A under the condition B", is usually written as P(AB), or sometimes P_{B}(A). For example, the probability that any given person has a cough on any given day may be only 5%. But if we know or assume that the person has a cold, then they are much more likely to be coughing. The conditional probability of coughing given that you have a cold might be a much higher 75%.
The concept of conditional probability is one of the most fundamental and one of the most important concepts in probability theory.^{[2]} But conditional probabilities can be quite slippery and require careful interpretation.^{[3]} For example, there need not be a causal or temporal relationship between A and B.
P(AB) may or may not be equal to P(A) (the unconditional probability of A). If P(AB) = P(A) (or its equivalent P(BA) = P(B)), then events A and B are said to be independent: in such a case, having knowledge about either event does not change our knowledge about the other event. Also, in general, P(AB) (the conditional probability of A given B) is not equal to P(BA). For example, if you have dengue you might have a 90% chance of testing positive for dengue. In this case what is being measured is that if event B ("having dengue") has occurred, the probability of A (test is positive) given that B (having dengue) occurred is 90%: that is, P(AB) = 90%. Alternatively, if you test positive for dengue you may have only a 15% chance of actually having dengue because most people do not have dengue and the false positive rate for the test may be high. In this case what is being measured is the probability of the event B (having dengue) given that the event A (test is positive) has occurred: P(BA) = 15%. Falsely equating the two probabilities causes various errors of reasoning such as the base rate fallacy. Conditional probabilities can be correctly reversed using Bayes' theorem.
Given two events A and B, from the sigmafield of a probability space, with P(B) > 0, the conditional probability of A given B is defined as the quotient of the probability of the joint of events A and B, and the probability of B^{[4]}:
This may be visualized as restricting the sample space to B. The logic behind this equation is that if the outcomes are restricted to B, this set serves as the new sample space.
Note that this is a definition but not a theoretical result. We just denote the quantity as and call it the conditional probability of A given B.
Some authors, such as de Finetti, prefer to introduce conditional probability as an axiom of probability:
Although mathematically equivalent, this may be preferred philosophically; under major probability interpretations such as the subjective theory, conditional probability is considered a primitive entity. Further, this "multiplication axiom" introduces a symmetry with the summation axiom for mutually exclusive events:^{[5]}
Conditional probability can be defined as the probability of a conditional event ^{[6]}. Assuming that the experiment underlying the events and is repeated, the GoodmanNguyenvan Fraassen conditional event can be defined as
It can be shown that
which meets the Kolmogorov definition of conditional probability. Note that the equation is a theoretical result and not a definition. The definition via conditional events can be understood directly in terms of the Kolmogorov axioms and is particularly close to the Kolmogorov interpretation of probability in terms of experimental data. For example, conditional events can be repeated themselves leading to a generalized notion of conditional event . It can be shown^{[6]} that the sequence is i.i.d., which yields a strong law of large numbers for conditional probability:
If P(B) = 0, then according to the simple definition, P(AB) is undefined. However, it is possible to define a conditional probability with respect to a ?algebra of such events (such as those arising from a continuous random variable).
For example, if X and Y are nondegenerate and jointly continuous random variables with density ?_{X,Y}(x, y) then, if B has positive measure,
The case where B has zero measure is problematic. For the case that B = {y_{0}}, representing a single point, the conditional probability could be defined as
however this approach leads to the BorelKolmogorov paradox. The more general case of zero measure is even more problematic, as can be seen by noting that the limit, as all ?y_{i} approach zero, of
depends on their relationship as they approach zero. See conditional expectation for more information.
Conditioning on an event may be generalized to conditioning on a random variable. Let X be a random variable; we assume for the sake of presentation that X is discrete, that is, X takes on only finitely many values x. Let A be an event. The conditional probability of A given X is defined as the random variable, written P(AX), that takes on the value
whenever
More formally,
The conditional probability P(AX) is a function of X: e.g., if the function g is defined as
then
Note that P(AX) and X are now both random variables. From the law of total probability, the expected value of P(AX) is equal to the unconditional probability of A.
The partial conditional probability is about the probability of event given that each of the condition events has occurred to a degree (degree of belief, degree of experience) that might be different from 100%. Frequentistically, partial conditional probability makes sense, if the conditions are tested in experiment repetitions of appropriate length ^{[7]}. Such bounded partial conditional probability can be defined as the conditionally expected average occurrence of event in testbeds of length that adhere to all of the probability specifications , i.e.:
Based on that, partial conditional probability can be defined as
Jeffrey conditionalization ^{[8]}^{[9]} is a special case of partial conditional probability in which the condition events must form a partition:
Suppose that somebody secretly rolls two fair sixsided dice, and we must predict the outcome (the sum of the two upward faces).
What is the probability that D1 = 2?
Table 1 shows the sample space of 36 outcomes.
Clearly, D1 = 2 in exactly 6 of the 36 outcomes; thus P(D1=2) = = .
+  D2  

1  2  3  4  5  6  
D1  1  2  3  4  5  6  7 
2  3  4  5  6  7  8  
3  4  5  6  7  8  9  
4  5  6  7  8  9  10  
5  6  7  8  9  10  11  
6  7  8  9  10  11  12 
What is the probability that D1+D2 ?
Table 2 shows that D1+D2 P(D1+D2 ^{10}/_{36}.
+  D2  

1  2  3  4  5  6  
D1  1  2  3  4  5  6  7 
2  3  4  5  6  7  8  
3  4  5  6  7  8  9  
4  5  6  7  8  9  10  
5  6  7  8  9  10  11  
6  7  8  9  10  11  12 
What is the probability that D1 = 2 given that D1+D2
Table 3 shows that for 3 of these 10 outcomes, D1 = 2.
Thus, the conditional probability P(D1=2  D1+D2 ^{3}/_{10} = 0.3.
+  D2  

1  2  3  4  5  6  
D1  1  2  3  4  5  6  7 
2  3  4  5  6  7  8  
3  4  5  6  7  8  9  
4  5  6  7  8  9  10  
5  6  7  8  9  10  11  
6  7  8  9  10  11  12 
Here in the earlier notation for the definition of conditional probability, the conditioning event B is that D1+D2 A is D1 = 2. We have as seen in the table.
In statistical inference, the conditional probability is an update of the probability of an event based on new information.^{[3]} Incorporating the new information can be done as follows:^{[1]}
Note: This approach results in a probability measure that is consistent with the original probability measure and satisfies all the Kolmogorov axioms. This conditional probability measure also could have resulted by assuming that the relative magnitude of the probability of A with respect to X will be preserved with respect to B (cf. a Formal Derivation below).
The wording "evidence" or "information" is generally used in the Bayesian interpretation of probability. The conditioning event is interpreted as evidence for the conditioned event. That is, P(A) is the probability of A before accounting for evidence E, and P(AE) is the probability of A after having accounted for evidence E or after having updated P(A). This is consistent with the frequentist interpretation, which is the first definition given above.
Events A and B are defined to be statistically independent if
If P(B) is not zero, then this is equivalent to the statement that
Similarly, if P(A) is not zero, then
is also equivalent. Although the derived forms may seem more intuitive, they are not the preferred definition as the conditional probabilities may be undefined, and the preferred definition is symmetrical in A and B.
Independent events vs. mutually exclusive events
The concepts of mutually independent events and mutually exclusive events are separate and distinct.
As noted, statistical independence means
provided that the probability for the conditioning event is not zero. However, events being mutually exclusive means that
In fact, mutually exclusive events cannot be statistically independent, since knowing that one occurs gives information about the other (specifically, that it certainly does not occur).
In general, it cannot be assumed that P(AB) ? P(BA). This can be an insidious error, even for those who are highly conversant with statistics.^{[10]} The relationship between P(AB) and P(BA) is given by Bayes' theorem:
That is, P(AB) ? P(BA) only if P(B)/P(A) ? 1, or equivalently, P(A) ? P(B).
In general, it cannot be assumed that P(A) ? P(AB). These probabilities are linked through the law of total probability:
where the events form a countable partition of .
This fallacy may arise through selection bias.^{[11]} For example, in the context of a medical claim, let S_{C} be the event that a sequela (chronic disease) S occurs as a consequence of circumstance (acute condition) C. Let H be the event that an individual seeks medical help. Suppose that in most cases, C does not cause S so P(S_{C}) is low. Suppose also that medical attention is only sought if S has occurred due to C. From experience of patients, a doctor may therefore erroneously conclude that P(S_{C}) is high. The actual probability observed by the doctor is P(S_{C}H).
Not taking prior probability into account partially or completely is called base rate neglect. The reverse, insufficient adjustment from the prior probability is conservatism.
Formally, P(AB) is defined as the probability of A according to a new probability function on the sample space, such that outcomes not in B have probability 0 and that it is consistent with all original probability measures.^{[12]}^{[13]}
Let ? be a sample space with elementary events {?}. Suppose we are told the event B ? ? has occurred. A new probability distribution (denoted by the conditional notation) is to be assigned on {?} to reflect this. For events in B, it is reasonable to assume that the relative magnitudes of the probabilities will be preserved. For some constant scale factor ?, the new distribution will therefore satisfy:
Substituting 1 and 2 into 3 to select ?:
So the new probability distribution is
Now for a general event A,