Jump to content


- - - - -

implementation of Bayes law(probabilities)


2 replies to this topic

#1 dionys

    New Member

  • Members
  • Pip
  • 6 posts

Posted 17 October 2004 - 12:52 PM

Hi guys
i know that i post a problem without my own answer but this problem is
very difficult for me and i'm very comfused.
The exercise says that we must implement the Bayes' Law to solve the exercise.My problem is that i cant distinguish and write down the events ):

Problem:In my kitchen i put my 10 forks in the left drawer and my 10 knifes in the right drawer.
before my room mate change something:
k=knife,f=forks
left drawer : (10f,0k)
right drawer: (0f,10k))

When my room-mate came he took 2 forks from the left drawer and he put them in the right drawer.

after my room mate's alteration:
left drawer : (8f,0k)
right drawer: (2f,10k)


After this action he chooses one piece(knife or fork) from the right drawer and he puts the piece in the left drawer.

left drawer : (9f,0k) or (8f,1k)
right drawer: (1f,10k) or (2f,9k)

After all these changes i come and choose one piece from 1 of the 2 drawers.
IF Is given that i hold a knife,what is the probability that i opened the left drawer?

#2 UnknownStranger

    Valued Member

  • Members
  • PipPipPip
  • 139 posts

Posted 17 October 2004 - 06:05 PM

Ok, my guess is on:

Left drawer: 0.1
Right drawer: 0.9

Explanation follows...
M.E.
-----
"Human stupidity is something you can rely on." -- M.A.
"I didn't design life." -- J.G.
"It's almost finished..." -- EHD

#3 UnknownStranger

    Valued Member

  • Members
  • PipPipPip
  • 139 posts

Posted 17 October 2004 - 06:14 PM

Well, I don't have much experience with causality, but anyway, here's what I think:


K ... got knife

D1 ... from Drawer 1
D2 ... from Drawer 2


P( D1 | K ) = ( P( D1 ) * P( K | D1 ) ) / P( K )
P( D2 | K ) = ( P( D2 ) * P( K | D2 ) ) / P( K )


P( D1 ) = 0.5
P( D2 ) = 0.5
P( K ) = 0.5

So...

P( D1 | K ) = P( K | D1 )
and
P( D2 | K ) = P( K | D2 )

Now...


mK ... Mate took knife
mF ... Mate took fork

P( K | D1 ) = P( mK ) * (1 / 9) + P( mF ) * (0 / 9) (law of total probability)
P( K | D2 ) = P( mK ) * (9 / 11) + P( mF ) * (10 / 11) (law of total probability)

P( mK ) = 10 / 12
P( mF ) = 2 / 12

==>

P( D1 | K ) = P( K | D1 ) = 0.925...
P( D2 | K ) = P( K | D2 ) = 0.833...

==>

P( D1 | K ) = 0.1
P( D2 | K ) = 0.9
M.E.
-----
"Human stupidity is something you can rely on." -- M.A.
"I didn't design life." -- J.G.
"It's almost finished..." -- EHD





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users