Probability

Discussion in 'Homework Help' started by mo2015mo, Feb 12, 2014.

  1. mo2015mo

    Thread Starter Member

    May 9, 2013
    157
    1
    Hi my friends,,

    While i were studying probability course , i faced problems as written below

    first Q : Twelve dice are tossed . If event A={Each face appears twice}. What is the probability of A ??
    :confused: I tried to solve it by Bernoulli trials but how i don't know how i find the probability of event A. :confused:

    2nd Q : The average number of homes sold by a company is 2 homes per day.
    what is the probability that exactly 3 homes will be sold in 3 days ??

    Also i faced the same problem ,, I don't know the probability of home per day :confused:

    please help me and thanxks in advance
     
  2. WBahn

    Moderator

    Mar 31, 2012
    17,743
    4,790
    I remember when I first took prob/stats that the first thing that was driven home to me (and most everyone else in the class) was that I couldn't count.

    Most problems like this fall into one of two broad categories -- those where you want to count the number of things that satisfy what you are looking for and those where you want to count the number of things that don't satisfy what you are looking for.

    Also, within each category, there are multiple ways to skin that particular cat.

    For the first problem, consider the case where you roll the dice one at a time and evaluate whether you can still achieve Event A. What is important in determining whether you are still in the hunt?

    For example, you have already rolled seven dice and thus far you have seen two pairs. What are the chances that your eighth roll will rule out the possibility of achieving Event A?
     
    mo2015mo likes this.
  3. mo2015mo

    Thread Starter Member

    May 9, 2013
    157
    1
    Probability will be less than if event A does't happen or increasing if event A happens
     
  4. WBahn

    Moderator

    Mar 31, 2012
    17,743
    4,790
    Huh?

    Let's look at that example: You have already rolled seven dice and thus far you have seen two pairs. What are the chances that your eighth roll will rule out the possibility of achieving Event A?

    If I have rolled seven dice and have two pairs, then I have something like:

    A,A,B,B,C,D,E

    My next roll has even odds of being A,B,C,D,E, or F.

    If I roll an A or a B, then I am done because I now have three of something which means that there is no way that I can get to Event A. Thus, given this starting point, I have a 1/3 likelihood of ruling out Event A with my very next roll.
     
  5. mo2015mo

    Thread Starter Member

    May 9, 2013
    157
    1
    really i still don't understand anything :(:(
     
  6. davebee

    Well-Known Member

    Oct 22, 2008
    539
    46
    I'll give the first question a shot.

    Roll the first die and it has a 1 in 1, or 100% chance of showing any one face.

    Roll a second die, and it has a 1 in 6 chance of showing what the first shows, so the accumulated probability so far is 1 in 6.

    Roll the third die, and it has a 5 in 6 chance of showing a new face, for an accumulated probability of 1 in 6 times 5 in 6 = 5 in 36.

    Roll the fourth die, and it has a 1 in 6 chance of showing what the third die shows, for an accumulated probability of 1 in 6 times 5 in 36 = 5 in 216.

    Roll the fifth die, and it has a 4 in 6 chance of showing a new face, for an accumulated probability of 4 in 6 times 5 in 216 = 20 in 1296.

    Roll the sixth die, and it has a 1 in 6 chance of showing what the fifth die shows, for an accumulated probability of 1 in 6 times 20 in 1296 = 20 in 7776.

    Roll the seventh die, and it has a 3 in 6 chance of showing a new face, for an accumulated probability of 3 in 6 times 20 in 7776 = 60 in 46656.

    Roll the eighth die, and it has a 1 in 6 chance of showing what the seventh die shows, for an accumulated probability of 1 in 6 times 60 in 46656 = 60 in 279936.

    The rest would follow this same pattern.

    Does this look right?
     
    mo2015mo likes this.
  7. WBahn

    Moderator

    Mar 31, 2012
    17,743
    4,790
    Your reasoning starts going off the rails at this point. You are guaranteed to be good to go through the second toss. But you have two possible outcomes at this point:

    AA (i.e., you rolled the same face that you did the first time with a 1/6 probability)

    AB (i.e., you rolled a new face with a 5/6 probability)

    But neither outcome eliminates the possibility of achieving Event A.

    On the third roll, you have to treat each possible outcome of the second roll separately:

    AAA (1/6)(1/6) and THIS eliminates you from further contention for Event A
    AAB (1/6)(5/6) still in the hunt
    ABA (5/6)(2/6) still in the hunt (EDIT: Had the first probability wrong)
    ABC (5/6)(4/6) still in the hunt (EDIT: Had the first probability wrong)

    Notice that, at each throw, I can relabel the die so that the paired ones start at A and the singletons start after the paired ones. So I had two equivalent cases above, ABA (1/6)(1/6) and ABB (1/6)(1/6) which got combined into a single case, ABA (1/6)(2/6).

    At this point, we can recognize that the order in which the dice were thrown doesn't matter, so from this point on AAB and ABA are indistinguishable and can be combined, giving us:

    X (1/6)(1/6) Eliminated from further contention for Event A
    AAB (1/6)(7/6) still in the hunt
    ABC (1/6)(4/6) still in the hunt

    We can then proceed down this chain of reasoning. At each step we have to consider the separate cases of each possible number of pairs that have been seen thus far.

    With some care, you can see a pattern develop that will let you write an algorithm to get the answer. It can then be checked using a Monte Carlo simulation.

    Note that this is not the only way to tackle this problem.
     
    Last edited: Feb 15, 2014
    mo2015mo likes this.
  8. t_n_k

    AAC Fanatic!

    Mar 6, 2009
    5,448
    782
    WBahn,

    Thanks for the lucid explanation thus far.

    As a question without too much thinking on my part - suppose the probability of throwing a sequence of six different outcomes (die faces) in six throws is Pa. Is the probability of throwing exactly two occurrences of each different face in 12 successive throws (i.e. the problem at hand) then Pa*Pa?
     
    mo2015mo likes this.
  9. WBahn

    Moderator

    Mar 31, 2012
    17,743
    4,790
    No, because there are more paths to the desired outcome than captured by this analysis.

    For instance, you could throw three pairs in the first six throws and the other three pairs in the second.

    Let's reduce it to a simple-to-enumerate example of flipping a coin four times and seeing if your thesis holds up - or how/why it doesn't.

    The odds of getting exactly one of each face in two tosses is 50%, so multiplying those together yields 25%.

    How many are there, really? Using 0 for tails and 1 for heads, we have sixteen equally possible outcomes:

    0000
    0001
    0010
    0011 *
    0100
    0101 #
    0110 #
    0111
    1000
    1001 #
    1010 #
    1011
    1100 *
    1101
    1110
    1111

    The '#' signs show the outcomes that follow your thesis, namely that we get exactly one of each in the first two throws and exactly one of each in the second two throws. In that case, we have what you suggested, which is a 25% probability overall.

    But the '*' signs identify additional cases in which the final outcome is achieved but without going through the path you suggested. There are two of those, bringing the actual probability to 37.5%.
     
    mo2015mo likes this.
  10. mo2015mo

    Thread Starter Member

    May 9, 2013
    157
    1
    WBahn t_n_k davebee
    Thanks very very very much for you

    What about if we use Multinomial Bernoulli as
    (12!)/(2!)^6 * (1/36)^12 = 1.5795 * 10^(-12) :confused:
    Divide 12-trials to group of 2 and the probability of each one is (1/6)/(1/6) =1/36
     
  11. WBahn

    Moderator

    Mar 31, 2012
    17,743
    4,790
    Well, try it on the small problem of the four coins and see if it works. If it does, then you MAY have a solution. If it doesn't, then you KNOW that you don't.

    But remember, your method has to reflect ALL of the possible ways that you can achieve the desired event.
     
    mo2015mo likes this.
  12. davebee

    Well-Known Member

    Oct 22, 2008
    539
    46
    mo2015mo, I made an effort, but I think WBahn is right; my attempt is probably not correct.

    The binomial formula does reproduce the 4 coin case:

    P(k out of N) = N!/(k!(N-k)!) * (p^k) * (q^(N-k))

    N = the number of opportunities for event x to occur;
    k = the number of times that event x occurs or is stipulated to occur;
    p = the probability that event x will occur on any particular occasion; and
    q = the probability that event x will not occur on any particular occasion.

    For the 4 coin example, looking for the result that 2 heads appears,

    N = 4 (4 tosses of the coin total)
    k = 2 (asking for 2 heads to appear over the 4 tosses)
    p = 1/2 (possibility of any one toss being a head)
    q = 1/2 (possibility of any one toss not being a head)

    P(2 out of 4) = 4!/(2!(4-2)!) * (1/2^2) * (1/2^(4-2))
    P(2 out of 4) = 24/(2 * 2 ) * (1/4) * (1/4))
    6 * 1/16
    6/16 = 3/8 = 0.375

    The Multinomial Bernoulli formula looks like it is needed for cases where there are more than two outcomes of an event, but I don't understand how to specify 6 pairs of dice faces into the formula.

    I'm interested to see what the solution is; please keep us posted if you make some progress.
     
    mo2015mo likes this.
  13. jjw

    Member

    Dec 24, 2013
    173
    31
    12 dices-> Total number of cases N=6^12
    Case 112233445566 has 12!/(2^6) permutatations
    P= 12!/(2^6)/(6^12) ~ 0.003438

    I checked this with a Python simulation ( 10 million rounds ) and should be right.
     
    mo2015mo likes this.
  14. mo2015mo

    Thread Starter Member

    May 9, 2013
    157
    1
    P[4 toss coin]= 4!/{(2^2)*(0.25)^4 = 0.02343
    It doesn't equal to 37.5% by using multinomial Bernoulli
    the correct answer got by using Bernoulli as solved above by davebee
    But what are failure causes ??
    :confused: because multinomial Bernoulli takes each event prob. as Independent prob. ?
     
  15. mo2015mo

    Thread Starter Member

    May 9, 2013
    157
    1
    I'm confused too..
    I divided 12trials into 6 groups and assume probability of each event =(1/6)(1/6) = 1/36 = p{each face appears twice in 2 successive trials } and applied by multinomial Bernoulli
    I solved my problem as you used Bernoulli and the final answer is 0.296 :confused:
     
  16. mo2015mo

    Thread Starter Member

    May 9, 2013
    157
    1
    yes,, this is the correct answer
    bUt why you are used (1/6)^12 ... What a Python simulation ( 10 million rounds ) states??
     
  17. jjw

    Member

    Dec 24, 2013
    173
    31
    6^12 is the total number of all possible sequencies with twelve dices ( 6*6* ...*6 )

    The simulation was 10 million rounds, where one round is a result from throwing
    12 dices once, if success, sum=sum+1. Success meaning result is 1122333445566 in some order.
    p= sum/10million
     
  18. WBahn

    Moderator

    Mar 31, 2012
    17,743
    4,790
    Yes, this looks correct. You've identified the probability of achieving a prototypical Event A and then computed the number of permutations that the prototypical case can appear in.

    Doing the latter can be the tricky part and is where people start questioning their ability to count. ;)
     
  19. WBahn

    Moderator

    Mar 31, 2012
    17,743
    4,790
    The cause of the failure is being to restrictive on how to achieve the desired event.

    Which do you think would be harder to do:

    A) Roll twelve die and have six pairs of each face.

    B) Roll six die have exactly one of each face. And then do that two times in a row.

    One is a subset of the other. Do you agree that any time you achieve B, you have achieved A? But do you also see that it is possible to achieve A without achieving B? As long as there is one case that achieves A but that doesn't achieve B, then the probability of achieving B is less than the probability of achieving A.
     
  20. WBahn

    Moderator

    Mar 31, 2012
    17,743
    4,790
    So what is it that you are saying is the "correct answer"?

    I fully enumerated ALL the possible outcomes, all of which are equally likely. Of the sixteen possible outcomes, six of them were successful. That's 37.5%. If that's not the correct answer, then please explain what it missed?

    Let's go from here and see if we can generalize it (although jjw stole some of the thunder on this point).

    We can set up a prototypical success as

    0011

    The odds of achieving this EXACT outcome is (1/2)^4

    Now imagine numbering the coins #1 through #4. How many different ways are there to reorder them and get unique patterns?

    Well, there are 4! ways to reorder them, but many of those do not produce unique patterns. For instance, (#1)(#2)(#3)(#4) is the pattern we started with but it is indistinguishable from (#2)(#1)(#4)(#3).

    So I will let you ponder the question of how to count the number of unique ways that the outcome 0011 can be rearranged. Of course, we know the answer is six, but you want to try to find a mathematical basis for arriving at that number.
     
Loading...