Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Probability question!

  • 08-05-2008 12:49pm
    #1
    Closed Accounts Posts: 48


    studying statistics and this probability question came up, any ideas?


Comments

  • Registered Users, Registered Users 2 Posts: 1,595 ✭✭✭MathsManiac


    This looks like a question about Bayes' theorem. See:
    http://en.wikipedia.org/wiki/Bayes'_theorem

    However, I think there's a mistake in the question. I strongly suspect that the introduction to part (i) intended to say: "A piece of code is selected at random..."

    Do others agree?


  • Registered Users, Registered Users 2 Posts: 1,595 ✭✭✭MathsManiac


    If you accept my amendment to the question, then the answer to part (i) is that the probability of each is just the proportion of the code that each has written.

    To do part (ii), apply Bayes' theorem, taking, for example,
    A= this code was written by programmer A
    B= this code contains errors


  • Registered Users, Registered Users 2 Posts: 2,481 ✭✭✭Fremen



    Do others agree?

    Yep. The phrasing of part ii) seems to support this too.


  • Closed Accounts Posts: 48 qwertykeyboards


    yes i think your definitely right there the question is phrased wrong. part 1 is no problem its part 2 thats giving me grief. ive read up about this Baye theorem but cant fit a formula around the problem. do you know which formula works? thanks for your help.


  • Registered Users, Registered Users 2 Posts: 2,481 ✭✭✭Fremen


    Four expressions you'll need:

    What is the probability of finding an error in a randomly chosen piece of code?
    Call that P(E)
    What is the probability of finding an error in code written by A?
    call that P(E|A)
    similarly for B and C. Then you should have everything you need.

    Use P(E|A)P(A) = P(A|E)P(E)


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 1,595 ✭✭✭MathsManiac


    If you're still struggling, note that (using the labelling suggested by Fremen):
    P(E) must first be caluclated, using:
    P(E) = P(E|A)P(A) + P(E|B)P(B) + P(E|C)P(C)
    (or equivalently using a tree diagram)

    Then you can use the result Fremen mentioned or, to phrase it in the way that's usual when discussing Bayes' theorem:

    P(A|E) = P(E|A)P(A) / P(E)


  • Closed Accounts Posts: 134 ✭✭ramanujan


    there's always a load of mistakes in these business studiesy type college maths. Makes it hard on the students, know first hand from giving grinds.

    agree with the sentiments above.

    however imo question is very poorly choosen i mean, say a selection of code is chosen. whats stopping that section of code from being wirtten by more than one of the programmers.


  • Registered Users, Registered Users 2 Posts: 3,620 ✭✭✭Grudaire


    you're in DCU!!!

    ehm- for part two multiply across to get the percentage of total code each has with errors
    so .55*.02 gives .011 of total code is A's errors,
    then .0105 and .005
    then the prob of it being A's error is .011/(.011+.0105+.005)

    ...or use bayes theorem


  • Closed Accounts Posts: 48 qwertykeyboards


    thanks for all your help. got it sorted!

    cliste, yep i am in dcu doing quantitative finance. are u in F+AM or QF? this statistics exam is a load of arse isn't it!!?


  • Registered Users, Registered Users 2 Posts: 3,620 ✭✭✭Grudaire


    thanks for all your help. got it sorted!

    cliste, yep i am in dcu doing quantitative finance. are u in F+AM or QF? this statistics exam is a load of arse isn't it!!?

    F(&A)M alright, for all the teaching the old bat did, didn't think that exam was going to bee that hard:( I mean F*ck, Q2 grand, everything else though was way harder then last years.


  • Advertisement
Advertisement