Ask your own question, for FREE!
Mathematics 12 Online
OpenStudy (anonymous):

Can someone explain Baye's theorem with an example for me please?

OpenStudy (anonymous):

http://en.wikipedia.org/wiki/Bayes%27_theorem

ganeshie8 (ganeshie8):

are you working on inference or conditional probability ?

OpenStudy (anonymous):

That's like , asking for an explanation of additon and telling it's use in taylor series and riemann hypothesis. "wikipedia links "

OpenStudy (anonymous):

He wanted explanation not , a encyclopedia

OpenStudy (anonymous):

uh it doesn't mention anything here.. wait ill give you an example question.. maybe that'll help. A person has undertaken a construction job. The probabilities are 0.65 that there will be strike, 0.80 that the construction job will be completed on time if there is no strike and 0.32 that the construction job will be completed on time if there is a strike. Determine the probability that the construction job will be completed on time.

OpenStudy (anonymous):

@OOOPS I'm sorry man, I'm average at math and visiting wikipedia only makes things harder for me. I use it just for biology :|

ganeshie8 (ganeshie8):

lets take a more simpler example to start with

OpenStudy (anonymous):

Okay i'll find an easier example, hang on..

ganeshie8 (ganeshie8):

ganeshie8 (ganeshie8):

go through the problem and see if it is clear

OpenStudy (anonymous):

haha okay that will do :) wait

OpenStudy (anonymous):

14.6% of Americans live below poverty line. 20.7% speak another language apart from English at home 4.2% fall into both categories. We have to find the percentage of americans who live below the poverty line who speak a language at home which is not english

ganeshie8 (ganeshie8):

Exactly !

ganeshie8 (ganeshie8):

lets put it in probability terms

ganeshie8 (ganeshie8):

P("below poverty line") = 0.146

ganeshie8 (ganeshie8):

P("speak non english") = 0.207

OpenStudy (anonymous):

Wait I'll just write the baye's theorem equation here so it'll make it easier sec

ganeshie8 (ganeshie8):

yeah please, i was about to type bayee's thm :)

OpenStudy (anonymous):

\[P(E _{i}) P(A|E_{i})/\sum_{j=l}^{n} P(E_{j})P(A|E_{j})\]

ganeshie8 (ganeshie8):

\[\large \text{P(A | B)} = \dfrac{\text{P(A & B)}}{P(B)}\]

ganeshie8 (ganeshie8):

i am familiar with this formula ^^ i have no clue about ur formula o.o

OpenStudy (anonymous):

oh.. god yeah that was written just below the one I saw.. lol yeah

ganeshie8 (ganeshie8):

In the present context : \[\large \text{P("below poverty line" | "speak non-eng")} = \\ \ \\\large \dfrac{\text{P("below poverty line" & "speak non-eng")}}{\text{P("speak non-eng")}}\]

ganeshie8 (ganeshie8):

plugin the numbers, we can analyze why this works after that..

OpenStudy (anonymous):

P(14.6|20.7)/P(20.7)

OpenStudy (anonymous):

wait why did you take it as 0.146 and 0.207?

ganeshie8 (ganeshie8):

\[\large \text{P("below poverty line" | "speak non-eng")} = \\ \large \dfrac{0.042}{0.207}\]

ganeshie8 (ganeshie8):

20.7% is same as 0.207

ganeshie8 (ganeshie8):

So basically Bayee's theorem helps you in finding the probability of a certain event, given that some other event occurred.

OpenStudy (anonymous):

One second.. there are multiple formulas here..

OpenStudy (anonymous):

\[P(A intersection E_{i})/P(A)\]

ganeshie8 (ganeshie8):

there is only one formula for Bayee's theorem : \[\large \text{P(A | B)} = \dfrac{\text{P(A & B)}}{P(B)}\]

ganeshie8 (ganeshie8):

(cos thats the only formula i knw >.<)

OpenStudy (anonymous):

Oh I'll use yours then :)

OpenStudy (anonymous):

A|B means A x B?

ganeshie8 (ganeshie8):

A "|" B is read as A "given" B

OpenStudy (turingtest):

actually @ganeshie8 what you wrote is just the definition of conditional probability. Bayes' Rule tells us how to get from one conditional probability \(P(A|B)\) to the other \(P(B|A)\)

OpenStudy (anonymous):

Oh alright thanks for clearing that out!

ganeshie8 (ganeshie8):

ohhk...

OpenStudy (turingtest):

\[P(A|B)={P(B|A)P(A)\over P(B)}\]

ganeshie8 (ganeshie8):

ahh that makes sense :) also thats a direct consequence of earlier conditional probability formula i think..

OpenStudy (turingtest):

Yes, it is :) You were not far off at all

OpenStudy (anonymous):

Alright so then we plug A values as 0.146 and B as 0.207?

OpenStudy (anonymous):

So I use P(A|B) = P(B|A)P(A)/P(B)?

ganeshie8 (ganeshie8):

nice :) good to know xD

OpenStudy (anonymous):

Btw, thanks @TuringTest for clearing that out :)

OpenStudy (turingtest):

welcome :) so a more accurate problem would be: say we know that 30% of people who speak a foreign language live below the poverty line, and that 50% of people speak a foreign language we now want to know what percent of people what the chances of someone living below the poverty level has of speaking a foreign language

OpenStudy (turingtest):

call speaking a foreign language A, and being below the poverty line B we are given P(B|A) and P(A), and we want P(B|A)

OpenStudy (anonymous):

P(30|50) = P(50|30)P(30)/P(50)?

OpenStudy (turingtest):

first, to use the formula, we need to find P(B), the probability of selecting a random person who lives below the poverty line to do this we use the total probability theorem \[P(B)=P(A)P(B|A)+P(A^c)P(B|A)\]where \(A^c\) is the 'compliment of A, i.e not A:

OpenStudy (turingtest):

you don't want to put the numbers in the parentheses like that P(A) mean the probability of event A, and that has a numerical value between 0 and 1 P(1) means something like "the probability of rolling a 1 on a die" or something like that

OpenStudy (turingtest):

also, you put P(A) on the bottom where we needed P(B)

OpenStudy (anonymous):

What do you make of B|A? sec ill write this down

OpenStudy (turingtest):

P(B|A) means "the probability of event B occurring, given that event A is known to have occurred", also known as the "conditional probability of B given A"

OpenStudy (turingtest):

In the problem I gave, I supposed that, if we are given a person who speaks a foreign language, the probability of that person being under the poverty line is 30% (I prefer to stick to decimals so I'm gonna say 0.3) If A is the event that a person speaks a foreign language, and B represents the even that someone is under the poverty line, this quantity I just gave represents \(P(B|A)=0.3\)

OpenStudy (anonymous):

Oh okay so say there is a 20% chance of an apple falling from a tree which has a 60% chance of apples growing on it.. So we write 20% probability based on 60% probability of it happening? 20|60?

OpenStudy (turingtest):

no that is a different situation, because we aren't given that apples grow on this particular tree a conditional probability would be "the probability of an apple falling given that it is on a tree", which in your case is about the same, since the only way for an apple to fall is for it to be on the tree, so that conditional probability is the same as the independent one... but again, do *not* write the values of the probabilities where the symbols for what they represent go! 20|60 means "the probability of 20 given that we have 60" again, I think we are talking about money or cards or something. use symbols for events and don't confuse them with their probabilies, which are numbers

OpenStudy (turingtest):

your example is bad because it brings up the relationship between conditional probabilies and independence, which is a somewhat different topic that I'd rather not get sidetracked with.

OpenStudy (anonymous):

Oh I apologize for that then! I won't write the values directly :) We'll use the language example instead!

OpenStudy (turingtest):

no worrie :) ok so do you understand the notation and setup of the problem as I stated it above?

OpenStudy (anonymous):

Yeah! 50% of the people speak a foreign language and 30% of the people who speak a foreign language are below the poverty line

OpenStudy (anonymous):

So we have 50% of all people speak a different language, and in that 50%, 30% of them live in poverty.

OpenStudy (turingtest):

we know the conditional probability that a person is under the poverty line given they speak a foreign language is \[P(B|A)=0.3\]and the probabilty that any given person speaks a foreign language is \[P(A)=0.5\]we want to know what the probability that a person speaks a foreign language, given that we know they are under the poverty line, which is\[P(A|B)\]

OpenStudy (turingtest):

we want to then use Baye's rule, which is\[P(A|B)={P(B|A)P(A)\over P(B)}\]we know \(P(B|A)\) and \(P(A)\), so now we need \(P(B)\) do you know how to get that?

OpenStudy (turingtest):

reminder: \(P(B)\) represents the probability that a random person is under the poverty line

OpenStudy (anonymous):

No I don't get it how do this further, if you solve this for me, I'll do 2 - 3 more and show it to you right away!

OpenStudy (turingtest):

I like your spirit :) \(P(B)\) can be found with the total probability theorem.\[P(B)=P(A)P(B|A)+P(A^C)P(B|A^C)\]where \(A^C\) represents the "compliment" of \(A\), or "not A". In this case that is the event that a person does *not* speak a foreign language. at this point I'd actually Like to change the probability of a person speaking a foreign language to 60%, i.e. \(P(A)=0.6\), because it will better illustrate the next part is that ok with you?

OpenStudy (anonymous):

Yeah I get it :) so if 30% speak a language and we call the A, A^c will be 70%, Am I correct? :)

OpenStudy (turingtest):

yep :)

OpenStudy (turingtest):

do yo understand that formula for the total probability theorem?

OpenStudy (anonymous):

P(B) = Probability of A x Probability of B happening when A happened + Compliment of Probability of A x Probability of B happening when compliment of A happened.

OpenStudy (turingtest):

yeah but i mean intuitively, in English, it translates to "probability of B happening is the probability that B happened, given that A happened, plus the probability that B happened, given that A didn't happen "

OpenStudy (turingtest):

this should make some sort of sense if you think about the statement carfully, it's similar tohow all the event of something hapenning + not happening is 1

OpenStudy (anonymous):

Hahaha yeah that makes so much sense :D :D

OpenStudy (turingtest):

great, so if P(A)=0.6 (60% speak a foreign language), and P(B|A)=0.3 what are P(A^C) and P(B|A^C) ?

OpenStudy (anonymous):

P(A^C) = 0.4 and P(B|A^C) = 0.7

OpenStudy (turingtest):

exactly :) and *now* we can finally plug in the numbers

OpenStudy (anonymous):

P(B)=0.6x0.3+0.4x0.7 Is this right?

OpenStudy (turingtest):

yep

OpenStudy (anonymous):

1.8 + 2.8 = 4.6

OpenStudy (turingtest):

?

OpenStudy (anonymous):

So P(B) = 4.6 we put the P(B) back in the baye's theorem again

OpenStudy (turingtest):

how did you get those numbers?

OpenStudy (anonymous):

0.6 x 0.3 + 0.4 x 0.7?

OpenStudy (turingtest):

you are off by a decimal factor in your multiplication you should NEVER get a number greater than 1 for any probability. If so, you know you messed up

OpenStudy (turingtest):

1 means it definitely happened; i.e. has 100% probability of happening P(B)=4 means a 400% probability use your calculator

OpenStudy (anonymous):

omg, I am so daft, I forgot. I can't believe myself sometimes..

OpenStudy (turingtest):

it happens

OpenStudy (anonymous):

0.18 + 0.28

OpenStudy (turingtest):

sounds more reasonable

OpenStudy (anonymous):

I hope I don't do these mistakes in the exam(a week away)

OpenStudy (turingtest):

so now that we have P(B), we can find P(A|B), which is what?

OpenStudy (anonymous):

0.39 because P(B|A)P(A)/P(B) = 0.3x0.6/0.46

OpenStudy (turingtest):

correct, very good

OpenStudy (anonymous):

I'll do those 3 other examples in 5min hang on :)

OpenStudy (turingtest):

sure thing :)

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!