Page 1 of 2 12 LastLast
Results 1 to 15 of 17

Math Help - Stats problems - Probability

  1. #1
    Junior Member
    Joined
    Nov 2008
    Posts
    68

    Thumbs down Stats problems - Probability

    Hi, I've just started doing stats as at a-level I took all mechanics modules (stupid I know) and I'm having trouble getting my head around how to tackle questions of a probability nature. We use notation like P(AnB) etc, I'd be happy if anyone could show me how the solutions to these problems are worked out formally:

    a) A student is to answer 7 out of 10 questions in an examination. How many choices are there? How many choices are there if at least 3 of the first 5 questions have to be answered? [Hint: split the exam into the first 5 and last 5 questions] I gather here we have to use the 'a choose b notation' but dont know where to start :S

    b) A four character computer password is generated by choosing each character randomly from 26 letters (a,b,c,...,z) and ten digits (0,1,....,9). No password can contain only digits, and no password can contain the same character repeated four times. How many valid passwords are there?

    c) A drug test for athletes is 95% effective in detecting a steroid when it is actually present. However, it also yields a false positive result for 1% of 'clean' athletes tested. If 0.5% of athletes use the steroid, what is the probability that an athlete who tests positive did actually use the drug?

    I'm not asking for one person to do all the questions here, but it would be great if someone would be kind enough to do so. I'm trying to build up a collection of perfectly answered questions to help me gain a firm graps of the foundations of such questions, so any help would be vastly appreciated. thank you
    Last edited by mr fantastic; February 6th 2009 at 10:53 AM. Reason: Put back the questions that were edited out by the OP
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Member
    Joined
    Oct 2008
    From
    Singapore
    Posts
    160
    a) Should be done like that.
    (3c5*4c5)+(4c5*3c5)+(5c5*2c5)
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Junior Member
    Joined
    Nov 2008
    Posts
    68
    Those c's stand for permutations dont they?
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Member
    Joined
    Oct 2008
    From
    Singapore
    Posts
    160
    C stands for choose or rather combinations.

    Here are 2 useful sites for you to figure the rest of the problems.

    3. Permutations (Ordered Arrangements)

    4. Combinations (Unordered Selections)

    Hope it helps.
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Junior Member
    Joined
    Nov 2008
    Posts
    68
    I got 110 for part a) I hope this is right
    Follow Math Help Forum on Facebook and Google+

  6. #6
    MHF Contributor
    Grandad's Avatar
    Joined
    Dec 2008
    From
    South Coast of England
    Posts
    2,570
    Thanks
    1

    Probability

    Hello mitch_nufc
    Quote Originally Posted by mitch_nufc View Post
    a) A student is to answer 7 out of 10 questions in an examination. How many choices are there? How many choices are there if at least 3 of the first 5 questions have to be answered? [Hint: split the exam into the first 5 and last 5 questions]
    Quote Originally Posted by mitch_nufc View Post
    I gather here we have to use the 'a choose b notation' but dont know where to start :S
    This is a question about Combinatorics, often referred to as Perms and Coms: Permutations and Combinations. Here's a quick example to illustrate the difference between the two.

    From a committee of 5 people, a chairman and secretary are to be appointed. In how many ways can this be done?

    This is an example of a permutation because it involves choosing items in a certain order. In other words, the choice A followed by B, is different from the choice B followed by A. Why? Because in one case A is the chairman and B the secretary; and in the other, B is the chairman and A the secretary.

    So, the solution to this is as follows:

    There are 5 ways of choosing the chairman. When a choice has been made, there are then 4 ways of choosing a secretary. There are thus 20 possible permutations altogether. (If you want to check this out, call the people A, B, C, D and E, and list all the possible pairs. It doesn't take long to write out all 20 possibilities.)

    We could write this solution, using the following notation:

    ^5P_2 = 5 \times 4 = \frac{5 \times 4 \times 3 \times 2 \times 1}{3 \times 2 \times 1} = \frac{5!}{2!}

    where, obviously, ^5P_2 stands for the number of ways of choosing and arranging, 2 items from a list of 5; and 5! is 5 factorial = 5 \times 4 \times 3 \times 2 \times 1.

    The general formula when you have to choose, and arrange, r items from n is:

    ^nP_r = \frac{n!}{(n-r)!}

    That was a permutation. Now let's vary the question a little to show you what a combination is.

    From a committee of 5, 2 representatives are to be chosen to attend a conference. How many ways are there of doing this?

    Do you see the difference? Here, the order doesn't matter, because each person is fulfilling the same role. In other words, the choice (A, B) is now the same as the choice (B, A): the order is unimportant.

    So, now there are just 10 pairs, not 20, as before, because each pair will appear twice in the original set of permutations. The answer could be written

    ^5C_2 = \frac{5 \times 4}{2 \times 1} = \frac{5!}{3!2!}

    where, obviously, ^5C_2 stands for the number of ways of choosing 2 items from 5, where the order doesn't matter.

    We won't always divide the 'arrangements' answer by 2, though. It just depends how much duplication you get; in other words, how many times any given group of items appears in the arrangements. Look at this example:

    A girl's mother allows her to take only 3 of her 10 pairs of shoes on holiday. How many ways are there of choosing which selection of shoes to take?

    Answer: if she chooses them in order (for example, if she's going to wear pair A on day 1, pair B on day 2, and pair C on day 3), then there are 10 \times 9 \times 8 possible arrangements. But this isn't what the question asks. We don't want to count (A, B, C) as a different selection from (A, C, B). So we need to divide this answer by the number of times each group of 3 is duplicated, to get the correct answer. How many is this? Answer 3 \times 2 \times 1 = 6 times.

    So the correct answer is \frac{10 \times 9 \times 8}{3 \times 2 \times 1} = 120

    This can be written

    ^{10}C_3 = \frac{10!}{7!3!}

    These examples illustrate the general rule that, if you want to select r items from n, where the order is unimportant, the number of selections is

    ^nC_r = \frac{n}{r!(n-r)!}

    This, the number of combinations of r items from n, is sometimes written \begin{pmatrix}n\\r\end{pmatrix}

    So, let's solve your first problem. The first is simply a matter of choosing 7 from 10, where the order doesn't matter. So it's ^{10}C_7 = 120 ways.

    The second is a bit more complicated. You can choose

    • 3 from the first 5, and then 4 from the remaining 5. This can be done in ^5C_3 \times ^5C_4 = 50 ways. Or:
    • 4 from the first 5, and then 3 from the remaining 5. ^5C_4 \times ^5C_3 = 50 ways. Or:
    • 5 from the first 5, and then 2 from the remaining 5. ^5C_5 \times ^5C_2 = 10

    All these are different selections. So you add them up to get the final total. Answer 110 ways.

    Quote Originally Posted by mitch_nufc View Post
    b) A four character computer password is generated by choosing each character randomly from 26 letters (a,b,c,...,z) and ten digits (0,1,....,9). No password can contain only digits, and no password can contain the same character repeated four times. How many valid passwords are there?
    This is best done by working out how many choices are possible if there are no restrictions; then working out how many are illegal, and subtracting to get the final answer.

    So, if there are no restrictions, we want to choose, in order, 4 items from 36, with repetitions being allowed. Each position then, can be chosen in 36 ways, the total being, therefore, 36^4 = 1679616.

    How many of these contain only digits? Using similar reasoning, the answer is 10^4 = 10000. So that brings our total down to 1669616.

    Now we must eliminate all passwords consisting of a single character, repeated 4 times. We have already eliminated all instances of any digit being repeated four times, because we have eliminated all instances of only digits being chosen. So there are just 26 other cases to rule out: aaaa, bbbb, ..., zzzz.

    So the final total is 1669590.

    You're going to need a lot more practice on this type of thing before you tackle part (c).

    Grandad
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Junior Member
    Joined
    Nov 2008
    Posts
    68
    SORRY! I see the error in my ways now It feels great learning even though part c) looks hideous I'm gunna give it a good go!

    Wow, thank you for the amount of help Grandad. I got the same solutions after trying for question 1

    However, Question 2 I got 1049880 combinations, i got this by:

    No. of ways a password can be made using only numbers = 10P4 = 5040
    No. of ways a password can be made using only letters from the alphabet = 26P4 = 358800
    Total number of passwords that can be made = 36P4 = 1413720
    The total number of passwords inculde the passwords made using only letters and the passwords made using only numbers.
    So, number of valid passwords are 1413720 - (5040+358800) = 1413720 - 363840 = 1049880
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Junior Member
    Joined
    Nov 2008
    Posts
    68
    For part the question regarding the drugs test I got 5/6 using bayes theorem, Is this right anyone? I'd really appreciate any clarification
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Flow Master
    mr fantastic's Avatar
    Joined
    Dec 2007
    From
    Zeitgeist
    Posts
    16,948
    Thanks
    5
    Quote Originally Posted by mitch_nufc View Post
    [snip]
    c) A drug test for athletes is 95% effective in detecting a steroid when it is actually present. However, it also yields a false positive result for 1% of 'clean' athletes tested. If 0.5% of athletes use the steroid, what is the probability that an athlete who tests positive did actually use the drug?

    I'm not asking for one person to do all the questions here, but it would be great if someone would be kind enough to do so. I'm trying to build up a collection of perfectly answered questions to help me gain a firm graps of the foundations of such questions, so any help would be vastly appreciated. thank you
    Pr(+ve | steroid) = 0.95

    Pr(+ve | no steroid) = 0.01

    Pr(steroid) = 0.005, Pr(no steroid) = 0.995

    Calculate Pr(steroid | +ve) = .....

    Note:

    Pr( steroid and +ve) = Pr( +ve | steroid) Pr(steroid) = ...

    Pr(+ve) = Pr( +ve | steroid) Pr(steroid) + Pr( +ve | no steroid) Pr(no steroid) = ....


    If your answer agrees with the above formulae when the data is sbstituted then your answer is correct.
    Follow Math Help Forum on Facebook and Google+

  10. #10
    MHF Contributor
    Grandad's Avatar
    Joined
    Dec 2008
    From
    South Coast of England
    Posts
    2,570
    Thanks
    1

    Perms and coms

    Hello mitch_nufc
    Quote Originally Posted by mitch_nufc View Post
    However, Question 2 I got 1049880 combinations, i got this by:

    No. of ways a password can be made using only numbers = 10P4 = 5040
    No. of ways a password can be made using only letters from the alphabet = 26P4 = 358800
    Total number of passwords that can be made = 36P4 = 1413720
    The total number of passwords inculde the passwords made using only letters and the passwords made using only numbers.
    So, number of valid passwords are 1413720 - (5040+358800) = 1413720 - 363840 = 1049880
    I still think my solution is correct. Which bit don't you agree with?

    Grandad

    Follow Math Help Forum on Facebook and Google+

  11. #11
    Junior Member
    Joined
    Dec 2008
    Posts
    52
    arggh, I answered this in the other thread you posted about it, but now that has been deleted because you posted the same thing twice!

    grr...anyway, I'll post it again for you:

    c) 95% of the 0.5% of athletes who cheat are caught, so that is 0.475% of the total people being caught, plus 1% of the 99.5% who don't cheat are also caught, add another 0.995%, total = 0.475% + 0.995% = 1.47%

    so 1.47% of all people are shown to have the drug, and 0.475% (not 0.475% of 1.47%, of the total) are guilty as shown above, so the answer is 0.475/1.47 = 32%

    Not anywhere as difficult as was made out......
    Follow Math Help Forum on Facebook and Google+

  12. #12
    Junior Member
    Joined
    Nov 2008
    Posts
    68
    I disagree with Mr fantastics theory.

    We use Bayes theorem to solve it. Let A = postive result, B1 = athlete uses steriod, B2 = athlete does not use steriod.

    =>

    P(B1)=0.05 and P(B2)=0.95, similarilary P(A|B1)=0.95 (a conditional event) means the result is positive given the athlete uses the steroid and P(A|B2)=0.01.

    Now to obtain P(B1|A) we apply Bayes theorem
    =[P(B1)P(A|B1)]/{P(B1)P(A|B1+P...
    =[0.05x0.95]/{0.05x0.95+0.95x0.01}
    =0.05/0.06
    =5/6

    I'm pretty sure this is right
    Follow Math Help Forum on Facebook and Google+

  13. #13
    Junior Member
    Joined
    Dec 2008
    Posts
    52
    Quote Originally Posted by mitch_nufc View Post
    I disagree with Mr fantastics theory.

    We use Bayes theorem to solve it. Let A = postive result, B1 = athlete uses steriod, B2 = athlete does not use steriod.

    =>

    P(B1)=0.05 and P(B2)=0.95, similarilary P(A|B1)=0.95 (a conditional event) means the result is positive given the athlete uses the steroid and P(A|B2)=0.01.

    Now to obtain P(B1|A) we apply Bayes theorem
    =[P(B1)P(A|B1)]/{P(B1)P(A|B1+P...
    =[0.05x0.95]/{0.05x0.95+0.95x0.01}
    =0.05/0.06
    =5/6

    I'm pretty sure this is right
    My above post proves this wrong. It is not necessary to use any theorems...as long as you know that 1% of 99.5% were tested positive, and 95% of 0.5% were, you can work out easily that 1.47% of all were tested positive, and 32% of these were guilty as 95% of 0.5% is 0.475%, which is 32% of 1.47%.
    Follow Math Help Forum on Facebook and Google+

  14. #14
    Flow Master
    mr fantastic's Avatar
    Joined
    Dec 2007
    From
    Zeitgeist
    Posts
    16,948
    Thanks
    5
    Quote Originally Posted by mitch_nufc View Post
    I disagree with Mr fantastics theory.

    We use Bayes theorem to solve it. Let A = postive result, B1 = athlete uses steriod, B2 = athlete does not use steriod.

    =>

    P(B1)=0.05 Mr F says: If this is meant to be Pr(steroid) then it's wrong. The correct value is 0.005.

    and P(B2)=0.95, Mr F says: If this is meant to be Pr(no steroid) then it's wrong. The correct value is 0.995.

    similarilary P(A|B1)=0.95 (a conditional event) means the result is positive given the athlete uses the steroid and P(A|B2)=0.01.

    Now to obtain P(B1|A) we apply Bayes theorem
    =[P(B1)P(A|B1)]/{P(B1)P(A|B1+P...
    =[0.05x0.95]/{0.05x0.95+0.95x0.01}
    =0.05/0.06
    =5/6

    I'm pretty sure this is right
    Hmmm .... Pretty sure .... Bet your answer against my answer for $1,000,000 pretty sure? Bet your life pretty sure? You might want to examine the above red bits I posted.

    Anyway, that's fine. Do it your way with your numbers. I'm certainly not going to force the correct answer of 0.32313 down anyone's throat.

    Quote Originally Posted by mr fantastic View Post
    Pr(+ve | steroid) = 0.95

    Pr(+ve | no steroid) = 0.01

    Pr(steroid) = 0.005, Pr(no steroid) = 0.995

    Calculate Pr(steroid | +ve) = .....

    Note:

    Pr( steroid and +ve) = Pr( +ve | steroid) Pr(steroid) = ...

    Pr(+ve) = Pr( +ve | steroid) Pr(steroid) + Pr( +ve | no steroid) Pr(no steroid) = ....

    [snip]
    If you fix up your data mistakes, you will probably find that your answer agrees with mine (assuming you don't make any more arithmetic errors).

    But I do worry that you would think my work is wrong, since it's essentially the same as yours (but a lot clearer). I just didn't bother saying that I used Bayes Theorem.

    By the way, do enough of these where the a priori probability of the event is small and you will come to expect answers (like the one I got) that usually surprise the untrained person .... That's why testing positive for something like aids is not necessarily cause for extreme worry .... You just get another test .....
    Follow Math Help Forum on Facebook and Google+

  15. #15
    Junior Member
    Joined
    Nov 2008
    Posts
    68
    Thanks, I done the corrections you suggested and i got exactly 1/3, would this be right?
    Follow Math Help Forum on Facebook and Google+

Page 1 of 2 12 LastLast

Similar Math Help Forum Discussions

  1. A few intro to stats problems..
    Posted in the Statistics Forum
    Replies: 3
    Last Post: November 11th 2009, 05:18 PM
  2. Multiple choice problems - stats
    Posted in the Advanced Statistics Forum
    Replies: 5
    Last Post: January 11th 2009, 08:13 PM
  3. Stats/Probability problems
    Posted in the Advanced Statistics Forum
    Replies: 2
    Last Post: June 11th 2008, 03:20 AM
  4. 3 Stats problems... need help
    Posted in the Advanced Statistics Forum
    Replies: 8
    Last Post: September 24th 2007, 06:00 PM
  5. Two stats problems
    Posted in the Statistics Forum
    Replies: 2
    Last Post: May 28th 2007, 01:55 PM

Search Tags


/mathhelpforum @mathhelpforum