# Independent events and Dependent events

I have a question regarding these strikingly similar problems with contradicting solutions. This is somewhat long, so prepare

Probblem 1

Consider a bag of ten coins, nine are fair, but one is weighted with both sides heads. You randomly select a coin and toss it five times. Let $2s$ denote the event of selecting the weighted coin (that is the 2-sided coin) and $N$ be the even you select a regular coin and $5H$ be the event of getting five heads in a row. What is

a) $P(5H | 2s)$

b) $P(5H | N)$

c) $P(5H)$

d) $P(2s | 5H)$

Solution 1

a) Simply 1

b) $\frac{1}{2^5}$

c) $\frac{1}{2^5}\frac{9}{10}+ \frac{1}{10} = \frac{41}{320}$

d) $P(2s|5H) = \dfrac{P(5H|2s)P(2s)}{P(5H)} = \frac{32}{41}$

From the Solution 1, it seems that $P(2s|5H) \neq P(2s)P(5H)$ That is the event of picking out the weighted coin affects the probability of getting 5H.

Here is part of my question, isn't there also some tiny probability of getting 5H from picking the normal one as well? Doesn't make sense why the events of picking the coin and getting 5H is dependent. Read on the next question

Problem 2

A diagnostic test for an eye disease is 88% accurate of the time and 2.4% of the population actually has the disease. Let $ED$ be the event of having the eye disease and $p$ be the event of testing positive. Find the probability that

a) the patient tests positive

b) the patient has the disease and tests positive

Solution 2

Here is a tree diagram

a) $0.02122 + 0.011712 = 0.13824$

b) $P(ED | p) = \dfrac{P(\text{ED and p})}{P(p)} =\frac{0.02122}{0.13824 }= 0.1535$

From Solution 2, it looks like $P(\text{ED and p}) = P(\text{ED})P(p)$ which means that having the eye disease and testing positive are independent events? After trying out the same formula from Problem 1, it also seems that

$$P(\text{ED | p}) = \dfrac{P(\text{ED and p})}{P(p)} = \dfrac{P(\text{p | ED})P(ED)}{P(p)} = 0.1535$$

Also, when the question asks "the patient has the disease and tests positive", how do I know that it is $P(ED | p)$ and not $P(p | ED)$?

I am very confused in general with this. Could anyone clarify for me? Thanks

-

From the Solution 1, it seems that $P(2s|5H) \ne P(2s)P(5H)$ That is the event of picking out the weighted coin affects the probability of getting 5H.

Here is part of my question, isn't there also some tiny probability of getting $5H$ from picking the normal one as well? Doesn't make sense why the events of picking the coin and getting $5H$ is dependent.

The fact that there is some tiny probability of getting $5H$ from picking the normal coin is exactly why the the event $5H$ is dependant on the event $2s$. In other words, the probability of getting five heads depends on which coin you pick.

Also, when the question asks "the patient has the disease and tests positive", how do I know that it is $P(ED|p)$ and not $P(p|ED)$ ?

I read $P(ED|p)$ as "the probability that the patient has the eye disease given that the test comes back positive. On the other hand, I read $P(p|ED)$ as "the probability that the test comes back positive given that the patient has the eye disease."

In practical terms however, the patient wants to know the former. That is, when I go get a test from the doctor and it comes back positive, I want to know what the probability is that the result of the test is accurate. I believe this is what the homework question is asking you to find.

-
OKay I delete my comments then – Hawk Jul 21 '12 at 22:41
P(ED|p) is what the book says...that's why i was really confused with the wording of the solution. Could we pretend that it asked P(ED|p) then and answer my other question? – Hawk Jul 21 '12 at 22:46
@jak Where did you see this in the book? In the solutions in the back? Or is this an example rather than a homework problem? – Code-Guru Jul 21 '12 at 22:48
bmlc.ca/Math12/… should work now – Hawk Jul 21 '12 at 23:00
@jak Hmm...I am having some difficulty with the wording of the problem and the proposed solution. Let me give it some thought and I will edit my answer again shortly. – Code-Guru Jul 21 '12 at 23:04

Your calculations for the first problem are all correct. Of course $P(2s|5H) \neq P(2s)P(5H)$. The correct expression is $P(2s|5H) = P(2s\cap H)/P(5H)$. And certainly $2S$ and $5H$ are not independent, either at the informal level or at the technical level.

"Has the disease and tests positive" should mean exactly what it says. It is not a conditional probability. In symbols, it is $P(ED \cap p)$. If a conditional probability is looked for, different language should be used.

It is easy to calculate. Indeed you calculated it on the way to finding $P(p)$. In symbols, it is $P(p|ED)P(ED)$.

The conditional probability $P(ED|p)$ is also straightforward to find. For note that in general $P(A|B)P(B)=P(A\cap B)$. You know $P(ED \cap p)$, and you know $P(p)$, so, by division, you can find $P(ED|p)$.

Added: In the online notes that you gave a link for, part c) reads "Determine the probability that the patient has eye disease and tests positive." The solution then proceeds to determine (correctly) the probability that the patient has eye disease given that she tests positive. (Part d) has a similar mistake.)

What is one to make of this? One could be generous and call it a typo. OK, two typos.

-
but $P(ED and p)$ isn't easy to compute because the events are "dependent". So I must use Baye's formulae – Hawk Jul 21 '12 at 23:03
$P(ED \cap p)=P(p \cap ED) =P(p|ED)P(ED)$. We have $P(p|ED)=0.88$, $P(ED)=0.024$. That's the first entry in your tree diagram, the $0.02122$. So you really do know how to calculate it! – André Nicolas Jul 21 '12 at 23:10
That was my understanding, but the notes from his class give the solution in the OP. (See question 5 on the last page.) – Code-Guru Jul 21 '12 at 23:10
@jak No. $P(\text{ED and p}) = P(p | \text{ED})P(ED)$ from the formula you guessed and posted in your question. Note that the 88% given in the problem is $P(p | \text{ED})$, not $P(p)$. – Code-Guru Jul 21 '12 at 23:15
No we are not. $P(ED \cap p)=P(p|ED)P(ED)$. Since $P(p|ED)\ne P(p)$, the equation you mention above is not true. By the way, I checked the "book" linked above. It uses and, but probably does not intend and. The quality of probability stuff in school books and notes is all too often dismal. – André Nicolas Jul 21 '12 at 23:20