Probability/Conditional Probability

From testwiki
Jump to navigation Jump to search

Template:Nav

Motivation

In the previous chapter, we have actually only dealt with Template:Colored em. To be more precise, in the problems encountered in the previous chapter, the sample space is defined initially, and all probabilities are assigned with respect to that initial sample space. However, in many situations, after defining the initial sample space for a random experiment, we may get some new information about the random experiment. Hence we may need to Template:Colored em the sample space based on those information. The probability based on this updated sample space is known as a Template:Colored em.

To illustrate how we get the new information and update the sample space correspondingly, consider the following example: Template:Colored example From the example above, we are able to calculate the (conditional) probability "reasonably" through some arguments (see (b)) when the sample points in the initial sample space are equally likely. Furthermore, we can notice that the condition should be an occurrence of an event, which involves the sample points in the sample space. When the condition does not involves the sample points at all, it is irrelevant to the random experiment. For example, if the condition is "the poker deck costs $10", then this is clearly not an event in the sample space and does not involve the sample points. Also, it is irrelevant from this experiment.

To motivate the definition of conditional probability, let us consider more precisely how we obtain the (conditional) probability in (b). In (b), we are given that an ace is drawn out from the poker deck beforehand. This means that ace can never be drawn in our draw. This corresponds to the occurrence of the event (with respect to original sample space) {not drawing that ace from the poker deck} (denoted by B) which consists of 51 sample points, resulting from excluding that ace from the original 52 sample points. Thus, we can regard the condition as the occurrence of event B. Now, under this condition, the sample space is updated to be the set B, that is, only points in B are regarded as legit sample points now.

Consider part (b) again. Let us denote by A the event {an ace is drawn from the deck} (with respect to the original sample space).

Now, only Template:Colored em of the points (whose also lie in the set B) in the set A are regarded as legit sample points. All other points in set A are no longer legit sample points anymore under this condition. In other words, only the points in Template:Colored em sets A and B (i.e., in set AB) are legit sample points in event A under this condition.

In the part (b) above, only the three aces remaining in the deck (in both sets A and B, and hence in set AB) are considered to be legit sample points. The other ace in set A (the ace that is drawn out in the condition) is Template:Colored em considered to be a legit sample point, since that ace is not in the deck at all!

To summarize, when we want to calculate the Template:Colored em of event A Template:Colored em, we do the following:

  1. We update the sample space to the set B.
  2. We only regard the sample points in set AB to be the (valid) sample points of event A.

In the above example, we encounter a special case where the sample points in the initial sample space (assumed to be finite) are equally likely (and hence the sample points in the updated sample space B should also be equally likely). In this case, using the result about combinatorial probability (in previous chapter), the conditional probability, denoted by (A|B), is given by (A|B)=|AB||B|=number of (valid) sample points in Anumber of sample points in updated sample space B. (Notice that "(A|B)" is just a notation ((|B) is a function, A is the "input"). Merely "A|B" means nothing. Particularly, "A|B" is Template:Colored em an event/set.)

When the sample points are Template:Colored em equally likely, we can apply a theorem in the previous chapter for constructing probability measure on the updated sample space B. (Here, we assume that B is countable.) Particularly, since we are only regarding the sample points in set AB as the (valid) sample points of event A, it Template:Colored em the (naive) "conditional probability" of A given the occurrence of event B should be given by (AB)=ωAB({ω}) according to that theorem (where is the probability measure in the Template:Colored em probability space (Ω,,)).

However, when we apply the original probability measure (in the original probability space) to every singleton event in the new sample space B, we face an issue: the sum of those probabilities are just ωB({ω})=(B), which is not 1 in general! But that theorem requires this probability to be 1! A natural remedy to this problem is to define a new probability measure (|B):[0,1], based on the original probability measure and the above (naive) "conditional probability" (AB), such that the sum must be 1. After noticing that 1=(B)(B), a natural choice of such probability measure is given by (A|B)=(AB)(B), for every A. The probability (B) can be interpreted as the Template:Colored em constant, and every (naive) "conditional probability" (as suggested previously) is scaled by a factor of 1(B). (It turns out that the probability measure (|B):[0,1] defined in this way also satisfies all the probability axioms. We will prove this later.)

When comparing this formula with the formula for the equally likely sample points case, the two formulas look quite similar actually. In fact, we can express the formula for the Template:Colored em in the same form as this formula (since the equally likely sample points case is actually just a special case for the theorem we are considering): |AB||B|=|AB|/|Ω||B|/|Ω|=(AB)(B).

File:Conditional probability illustration.webm So, now we have developed a reasonable and natural formula to calculate the conditional probability (A|B) when the outcomes are equally likely (applicable to finite sample space), and the outcomes are not equally likely (only for countable sample space). It is thus natural to also use the same formula when the sample space is uncountable. This motivates the following definition of conditional probability:

Definition

Template:Colored definition Template:Colored remark Template:Colored example Template:Colored example Template:Colored example Template:Colored example Template:Colored example Template:Colored remark Template:Colored example Template:Colored example Template:Colored example Template:Colored example Template:Colored remark The following is a generalization to the formula (AB)=(A|B)(B). It is useful when we calculate the probability of the occurrence of multiple events together, by considering the events "one by one". Template:Colored proposition

Proof. With the assumptions, we have by definition (E1)(E2|E1)(E3|E1E2)(En|E1En1)= def (E1)(E2E1)(E1)(E3E1E2)(E1E2)(EnE1En1)(E1En1).

Template:Colored remark Template:Colored example Two important theorems related to conditional probability, namely law of total probability and Bayes' theorem, will be discussed in the following section.

Law of total probability and Bayes' theorem

Sometimes, it is not an easy task to assign a suitable unconditional probability to an event. For instance, suppose Amy will perform a COVID-19 test, and the result is either positive or negative (impossible to have invalid results). Let P={Amy tests positive at the COVID-19 test}. What should be (P)? It is actually quite difficult to answer directly, since this probability is without any condition. In particular, it is unknown that whether Amy gets infected by COVID-19 or not, and clearly the infection will affect the probability assignment quite significantly.

On the other hand, it may be easier to assign/calculate related conditional/unconditional probabilities. Now, let I={Amy gets infected by COVID-19}. The Template:Colored em probability (P|I), called Template:Colored em, may be known based on the research on the COVID-19 test. Also, the Template:Colored em probability (Pc|Ic), called Template:Colored em, may also be known based on the research. Besides, the probability (I) may be obtained according to studies on COVID-19 infection for Amy's place of living. Since (P)=(PI)+(PIc), by the definition of conditional probability, we have (P)=(P|I)(I)+(P|Ic)(Ic). Since the conditional probability satisfies the probability axioms, we have the relation (P|Ic)=1(Pc|Ic), and thus the value of (P|Ic) can be obtained. The remaining terms in the expression can also be obtained, as suggested by above. Thus, we can finally obtain the value of (P).

This shows that conditional probabilities can be quite helpful for calculating unconditional probabilities, especially when we condition appropriately so that the conditional probabilities, and the probability of the condition are known in some ways.

The following theorem is an important theorem that relates unconditional probabilities and conditional probabilities, as in above discussion. Template:Colored theorem

Proof. Here we only prove the finite case. The proof for countably infinite case is similar and thus left as an exercise.

Under the assumptions, B1,B2,,Bn are pairwise disjoint, and thus AB1,AB2,,ABn are also pairwise disjoint (by observing that (AB1)(AB2)=A(B1B2)=A=, and other intersections have similar results). Also, since (B1),(B2),,(Bn)>0, the conditional probabilities (|B1),(|B2),,(|Bn) are defined. Moreover, since AB1B2Bn, we can observe that A=(AB1)(AB2)(ABn) (through Venn diagram, informally). It follows that (A)=((AB1)(AB2)(ABn))=(AB1)+(AB2)++(ABn)(finite additivity)=(A|B1)(B1)+(A|B2)(B2)++(A|Bn)(Bn).(definition)

Template:Colored exercise Now, suppose Amy has performed a COVID-19 test, and the result is positive! So now Amy is worrying about whether she really gets infected by COVID-19, or it is just a Template:Colored em. Therefore, she would like to know the conditional probability (I|P) (the conditional probability for getting infected given testing positive). Notice that the conditional probability (P|I) may be known (based on some research). However, it does not equal the conditional probability (I|P) generally. (These two probabilities are referring to two different things.) So, now we are interested in knowing that whether there is formula that relates these two probabilities, which have somewhat "similar" expressions. See the following exercise for deriving the relationship between (A|B) and (B|A): Template:Colored exercise The following theorem is the generalization of the above result. Template:Colored theorem

Proof.

Finite case: Under the assumptions, we have by law of total probability (A)=(A|B1)(B1)+(A|B2)(B2)++(A|Bn)(Bn). On the other hand, by the definition of conditional probability, (ABi)=(A|Bi)(Bi). Since (Bi|A)=(ABi)(A) by the definition of conditional probability, the result follows.

Countably infinite case: Under the assumptions, we have by law of total probability (A)=(A|B1)(B1)+(A|B2)(B2)+. On the other hand, by the definition of conditional probability, (ABi)=(A|Bi)(Bi). Since (Bi|A)=(ABi)(A) by the definition of conditional probability, the result follows.

Template:Colored example Template:Colored example Template:Colored example The following is a famous problem. Template:Colored example Template:Colored remark Template:Colored example Template:Colored example Template:Colored example

Independence

From the previous discussion, we know that the conditional probability of event A given the occurrence of event B can be interpreted as the probability of A where the sample space is updated to event B. In general, through this update, the probability of A should be affected. But what if the probability is somehow the same as the one before the update?

If this is the case, then the occurrence of a particular event B does not affect the probability of event A actually. Symbolically, it means (A|B)=(A). If this holds, then we have (B|A)=(A|B)(B)(A)=(A)(B)(A)=(B). This means the occurrence of event A also does not affect the probability of event B. This result matches with our intuitive interpretation of the independence of two events, so it seems that it is quite reasonable to define the independence of events A and B as follows: Template:Quote However, this definition has some slight issues. If (A)=0 or (B)=0, then some of the conditional probabilities involved may be Template:Colored em. So, for some events, we may not be able to tell whether they are independent or not using this "definition". To deal with this, we consider an alternative definition, that is equivalent to the above when (A)0 and (B)0. To motivate that definition, we can see that (A|B)=(A) or (B|A)=(B)(AB)=(A)(B), when both (A) and (B) are nonzero. This results in the following definition: Template:Colored definition Template:Colored remark But what if there are more than two events involved? Intuitively, we may consider the following as the general "definition" of independence: Template:Quote But we will get some strange results by using this as the "definition": Template:Colored example From this example, merely requiring (E1E2En)=(E1)(E2)(En) cannot ensure all Template:Colored em of events involved are independent. So, this suggests us another definition: Template:Quote However, we will again get some strange results by using this as the "definition": Template:Colored example The above examples suggest us that we actually need Template:Colored em requirements

  1. (ABC)=(A)(B)(C). (This ensures (C|AB)=(C),(A|BC)=(A) and (B|AC)=(B). That is, if we condition on the intersection of two events, the probability of another one is not affected.)
  2. All the pairs of events A,B,C are independent. (That is, (AB)=(A)(B),(BC)(B)(C) and (AC)=(A)(C).

in the definition of independence of events A,B,C for the definition to "make sense".

Similarly, the independence of four events A,B,C,D should require

  1. (ABCD)=(A)(B)(C)(D).
  2. All the triples of events are independent.
  • In other words, we need the probability of intersection of any three and any two events to be able to "split as product of probabilities of single events" as in above.

This leads us to the following general definition: Template:Colored definition Template:Colored remark Template:Colored example Template:Colored example Template:Colored example In general, we have the following result. Template:Colored proposition

Proof. Assume that the events E1,E2,,En are independent. Then, we have (i=1nEi)=i=1n(Ei). Now, suppose we replace E1 by E1c, and we want to prove that the independence still holds: (E1ci=2nEi)=(i=2nEi)(E1i=2nEi)(a property)=i=2n(Ei)(E1)i=2n(Ei)(independence of E1,E2,,En)=i=2n(Ei)(1(E1))=i=2n(Ei)(E1c). Thus, E1c,E2,,En are still independent. By symmetry, we can instead replace an event other than E1 by its respective complement, and the independence still holds.

Notice that we can split the process of replacing Template:Colored em of the events into multiple steps, where we replace one event in every step (that is, we replace the events one by one). Now, we can apply the above argument in each step to ensure that the resulting events are still independent. Thus, after all steps, and we finish the replacement, the independence still holds.

Template:Colored example Template:Colored remark Template:Colored example Template:Colored exercise Template:Colored exercise Template:Colored example

Conditional independence

Template:Colored em independence is a conditional version of independence, and has the following definition which is similar to that of independence. Template:Colored definition Template:Colored remark Template:Colored example Template:Nav

Template:BookCat