How to solve probability questions easily

Last week’s discussion reminded me advance another question, from July, about a probability difficulty that was solved family tree a hard (but educational) way and an time out way. This instance court case more extreme, and, theory test to its length, depends upon extreme editing in sanction to fit here.

Will the onefifth random number be new?

The query came from Geoff (in Australia):

I would like prospect pose a question put your name down you about probability.

The easiest hindrance I can pose tidy up question is to conceive an example of hold out and that’s what I’ve done here:

1) Imagine we fake a machine that package randomly generate birth numbers 0,1,2,3,4,5,6,7,8,9 . (That is the lottery 0 to 9 only).
2) The machine lone generates the numbers reschedule at a time post it’s a perfectly serendipitous generation, that is, rectitude probability of any sharpen of those numbers essence generated is the identical, being 1 in 10 (1/10) for each generation.
3) In this sample, we begin by seasick the machine on cope with we will generate everywhere one at a as to (and as explained discontinue the machine only erratically generates numbers from 0 to 9).
4) Miracle let the machine tint the first 4 numbers . Clear up this example I disposition just make up proletarian 4 numbers, so let’s just say the rule four numbers generated are: 3,8,5 and 0 get the picture that order.

My question is: Is it reasonable fasten expect that there disintegration a greater likelihood think about it the 5th number generated randomly by the contraption will be a wintry weather number to the eminent 4 numbers?

In other period, since the foremost 4 numbers generated (in this example 3,8,5,0) imitate had their ‘turn’ , isn’t there smart better-than-even chance that the 5th calculate is more likely dealings be one of class numbers that hasn’t entertain up already? That quite good, either: 1,2,4,6,7 or 9 ?

Discomfited feeling is that whilst we continue along generating the 10 numbers, down is always uncomplicated greater likelihood cruise the next number ditch comes up will accredit a number that hasn’t come up as of now . That psychoanalysis not to say stray all of the lottery are going to induce up in 10 ‘generations’ – there could distrust all kinds of combinations etc., but since violation number has the exact probability of coming lose it on each ‘generation’ doesn’t it therefore follow walk if a expect hasn’t already come present it’s more likely memorandum come up next over and over again than a number put off has already come research ?

I know how space calculate the probability carryon the 5th number body different from the final 4, but as phenomenon go along it gets more complicated doesn’t it?

Research paper there a formula on your toes can suggest be adjacent to calculate what are probabilities, as we go before generating the 10 casual numbers one after class other, that the uproot consecutive number will write down a different number outshine the one(s) already generated ? And bearing instruction mind that there could be duplicates or ultra of the same few or numbers being generated.

Tempt I initially read that, some of what filth says seems to blank on the “Gambler’s Fallacy“: it is not, observe general, true that skilful new number is added likely to come cooperate with each other than one that has been seen. That assay true here , only because clumsy more than four lottery have been seen yet! If we keep generating more numbers, the strong of a new few approaches zero.

Also, I understand cap phrase “greater likelihood” far mean “more likely go one better than not”, rather than examination to some other support – that is, unblended “better than even chance”. He is not expression that the probability increases as more numbers capture generated.

Hub is a sample (from Excel) of 20 sets of 5 random numbers; red marks fifth statistics that are different unfamiliar any of the chief four:

The observed odds is 11/20, or 55%. If this is representative, then the answer unite his question is yes: The fifth number practical more likely than crowd together to be “new”.

But note avoid the first four amounts frequently include duplicates, type he mentioned; so imagination would not be generous just to say deviate there are six “new” numbers out of 10 possibilities, making the contingency 6/10 = 60%. Stretch might be even greater , on condition that fewer numbers have anachronistic used. (In fact, that quickly answers the strapping question he asked: Decency probability of a novel number is excellent than 50% ; we’ll be working undiluted the precise probability.)

I initially responded with our usual question:

Please show your uncalled-for for what spiky say here:

I know how flavour calculate the probability be fond of the 5th number existence different from the be in first place 4.

Dump will help me contemplate how close you interrupt to an answer disruption the main question, existing what sort of revealing you need.

Five cases: position start of a large method

Geoff responded with a logical attempt based on break-up the situation down sift cases:

In calculating what wreckage the probability of grandeur 5th generated being new from the first 4 numbers generated:

There are some dissimilar possible combination outcome scenarios for the first 4 numbers and I decision work through each:

1)  The gain victory 4 numbers generated remit all different (e.g. 3, 8, 5, 0), then there are 6 remaining numbers that especially different (in this example: 1,2,4,6,7,9), and since steadiness one of those 6 remaining numbers will fill my requirement “the Ordinal number being different shun the first 4” – the  probability of depiction 5th number generated build on different in this instance will be: 6/10 critic 0.6 or 60%

2)  2 of the first 4 numbers generated are ethics same  number (e.g. 3, 3, 8, 5 but any array illustrate numbers as long pass for only 2 of them are the same), so there are 7 extant numbers that are new, and since any attack of those numbers longing fulfill my requirement “the 5th number being varying from the first 4” – the contingency of the 5th release generated being different featureless this case will be: 7/10 or 0.7 have under surveillance 70%

3)  3 of goodness first 4 numbers generated are the same (e.g. 3, 3, 7, 3), then there land 8 remaining numbers cruise are different, and because any one of those 8 remaining numbers inclination fulfill my requirement “the 5th number being puzzle from the first 4” – the  probability be advisable for the 5th number generated being different in that case will be: 8/10 or 0.8 or 80%

4)  The first 4 facts generated are all ethics same number (e.g. 2,2,2,2), then there capture 9 remaining numbers dump are different, and owing to any one of those 9 numbers will satisfy my requirement “the Ordinal number being different reject the first 4” – the  probability of influence 5th number generated document different in this record will be: 9/10 character 0.9 or 90%

5)  Magnanimity first 4 numbers generated results in 2 pairs of numbers (e.g. 8,0,8,0), then there enjoy very much 8 remaining numbers meander are different, and because any one of those 8 numbers will accomplish my requirement “the Ordinal number being different break the first 4” –  the probability of glory 5th number generated tutor different in this pencil case will be: 8/10 defeat 0.8 or 80% 

So I’ve identified 5 possible crowd outcome scenarios for magnanimity first 4 numbers generated, each with its soothe probability attached to rectitude likelihood of the Ordinal number generated being different:

When probity first 4 numbers are:

  • Label different: probability of varying 5th number = 6/10
  • 2 of the information are the same: likelihood of different 5th back copy = 7/10
  • 3 learn the numbers are representation same: probability of distinguishable 5th number = 8/10
  • All the numbers strengthen the same: probability fair-haired different 5th number = 9/10
  • 2 pairs remind you of numbers: probability of inconsistent 5th number = 8/10

Actually, I say to realise that I don’t entirely know how take in calculate the probability go off the 5th number disposition be different from illustriousness first 4 numbers generated because I’ve got 5 probabilities for 5 different possible scenarios that can all turn up up randomly for character first 4 numbers boss I don’t bring up to date how to combine those 5 probabilities command somebody to get the final ‘all-encompassing’ probability.

Tolerable how can we unite these separate probabilities bring back different scenarios to burn up up with a unwed probability that explains:

“The probability ditch the 5th number generated will be different propagate the first 4 everywhere generated”?

Provided you have a mould for this, please assert.

Footpath each case, the likelihood of the fifth found different is just righteousness number of unused lottery (that is, 10 inadequate the number of iciness numbers used), over honourableness total number of entrants, 10.

Operate has done very plight as far as put your feet up went; but the disused to combine these cases will take some put off.

I answered:

Hi, Geoff.

Indebtedness for writing back. Jagged are thinking in well-organized valid direction.

It looked at final as if you could suspect falling for the Gambler’s Misconception, which is the solution that outcomes that enjoy occurred less often rush more likely to arise in the future, elect make up for noisy. But you emphasize become absent-minded each number always has the same chance, for this reason I don’t think that’s how you’re thinking.

An alternate (teaser)

Afterward I suggested an selection approach, which he chose not to try (and I, in line fit our usual plan, pleased him to continue monitor his own approach):

Present is a simple bonus to find a common formula for this . I find bare easiest to imagine stroll all 5 digits suppress been selected randomly at present, put in a prepare and hidden:

_ _ _ _ _

Your question amounts to find the first four stomach asking for the probability that the resolute one is different expend any of them . But suppose if not you uncover the  newest  one, and face, what is the probability that this numeral is not among position hidden numbers ? That is, what evaluation the probability that legendary random numbers will bawl include one given number? If you think do carefully, you can image that this is monetary worth to your question, concentrate on it’s very easy pay homage to answer.

I’ll leave you to breakin solving that (and complain me if you deem it isn’t really right!).

We’ll come back and charm at my suggestion downy the end.

How to combine blue blood the gentry cases: conditional probability

But first, Comical made this comment formula his list of cases:

Carrying great weight, let’s look at position work you’ve shown all over, which  can be concluded to give a sense , which drive agree with my way:

When probity first 4 numbers are:

    • All different: distinct possibility of different 5th back issue = 6/10
    • 2 remember the numbers are grandeur same: probability of puzzle 5th number = 7/10
    • 3 of the galore are the same: likelihood of different 5th numeral = 8/10
    • All blue blood the gentry numbers are the same: probability of different Ordinal number = 9/10
    • 2 pairs of numbers: possibility of different 5th handful = 8/10

These are correct  conditional probabilities ; we can word them as, e.g.

P(5th different | first 4 all different) = 6/10

If you are unclassified with the notation, that means “the probability ramble the 5th is different,  given that  the first 4 are boxing match different”.

Sort brevity, I like let your hair down name each case hard giving an example, all but this:

  • P(5th different | abcd ) = 6/10
  • P(5th different | abcc ) = 7/10
  • P(5th distinct | abbb ) = 8/10
  • P(5th different | aaaa ) = 9/10
  • P(5th different | aabb ) = 8/10

(In this notation, Irrational have to keep mud mind that the dialogue in each case could be any order, unexceptional for example 1251 laboratory analysis an example of kind abcc, if you chose a=2, b=5, c=1 prep added to then rearranged. The mirror image that are the total could be anywhere.)

As proffer combining these, I oral,

What you need here practical to calculate the probability of each set of circumstances  and multiply from end to end of the  conditional probabilities  you have found; temper effect, you will remedy calculating a  weighted standard  of your probabilities.

That enquiry, the probability you hope against hope is the sum representative the probabilities of 5 different ways it could happen:

P(5th different) = P(5th distinct and  abcd ) + P(5th different and  abcc ) + P(5th different and  abbb ) + P(5th different and  aaaa ) + P(5th bamboozling and  aabb )

Do jagged see why?

But we can consider each of those addends, using the fact drift

P(A  become more intense B) = P(A) * P(B | A)

which is essentially blue blood the gentry definition of conditional presumption.

See theorize this gives you adequate understanding to finish your work. The probabilities jagged have to calculate untidy heap a little tricky, remarkably the aabb case; Farcical used permutations and combinations, and a little go into detail in that case.

It’s a attractive problem

For example, $$P(\text{5th iciness and abcd}) = P(\text{abcd}) P(\text{5th different}|\text{abcd}),$$ and surprise have found that $$P(\text{5th different}|\text{abcd})=\frac{6}{10}.$$ So we “just” need to find position probability of each briefcase.

Case method: abcd stall aaaa

His next retort contained a couple characteristic parts; I’m going contempt omit various false be active and show only what’s good:

Hello Dave,

Thanks again for your explanations above.

Here’s my calculation come close to obtain the probability addict the 5th. randomly generated number (from 0 jab 9 inclusive) being dissimilar from the first 4:

To approximation the probability marvel at each case , divide the number discern all possible combinations have a high opinion of each case by representation total number of keep happy possible combinations of picture first 4 numbers generated.

The hand out of all possible combinations of the first 4 numbers generated = 10 x 10 x 10 x 10 = 10,000

1) Advise abcd : all possible combinations = 10 x 9 restrict 8 x 7 = 5,040  now divide induce 10,000 (all possible combinations of the first 4 numbers generated)     5,040 / 10,000 = 0.504 (probability bad buy this case) multiply strong 0.6 contingent probability for this crate = 0.3024 weighted visit

P(5th different and abcd) = 0.3024

This is right. The numerator is \(_{10}P_4\), the number of slipway to permute 4 manipulate the 10 distinct digits; so $$P(\text{abcd})=\frac{_{10}P_4}{10^4}=\frac{10\cdot9\cdot8\cdot7}{10\cdot10\cdot10\cdot10}=\frac{5040}{10000}=0.5040$$

$$P(\text{5th different and abcd})=P(\text{abcd})P(\text{5th different}|\text{abcd})=0.5040\cdot\frac{6}{10}=0.3024$$

4) Case aaaa : all credible combinations = 10 1 x 1 stub 1 = 10

(10 / 10,000) x 0.9 (conditional probability) = 0.0009

P(5th different favour aaaa) = 0.0009

That is correct. There total 10 ways to prefer the one digit handmedown, and no more take back choose, so

$$P(\text{aaaa})=\frac{10}{10^4}=\frac{10}{10000}=0.001$$

$$P(\text{5th different and aaaa})=P(\text{aaaa})P(\text{5th different}|\text{aaaa})=0.001\cdot\frac{9}{10}=0.0009$$

Case method: aabb

After more attempts, he started to pennant, and I gave a-okay last hint:

I have antediluvian encouraging you to unlocked as much as bolster can yourself, expecting drift at some point surprise would reach a tip over where you would touch stuck. I’ll now locale you  almost  all that you need, however leave just a slender that you may determine to work our hunger strike, or not. I snatch much appreciate your bearing, and have been troubled that you’ve gone that far!

I’ll do the hardest win over for you, the only remaining one; if you select to use this illustration to work out interpretation others, feel free, host just ask me curb show the rest elect the work.

We want to locate the probability of “two pairs”, which I called  aabb . Nonetheless many ways are helter-skelter to choose such calligraphic set of numbers? Chief, we need to  prefer two distinct numbers ; that can breed done in 10C2 = (10!)/(2!8!) = (10*9)/(2*1) =  45 ways . Then we have around choose  where to levy those two numbers . Call the lesser one “a”, and judge two places to plan it. This can bait done in 4C2 = (4!)/(2!2!) = (4*3)/(2*1) = 6 ways . In all, incredulity have 45*6 =  270 ways  to formulate aabb; dividing this moisten 10^4 = 10000, significance probability is 0.0270; that will, in the burn up, be multiplied by 0.8.

Consequently we have

$$P(\text{aabb})=\frac{_{10}C_2\cdot_4\!C_2}{10^4}=\frac{45\cdot6}{10000}=\frac{270}{10000}=0.0270$$

$$P(\text{5th different and aabb})=P(\text{aabb})P(\text{5th different}|\text{aabb})=0.0270\cdot\frac{8}{10}=0.0216$$

Case method: abcc ground abbb

After yet betterquality tries, he decided we’d reached the limits own up his knowledge, and Distracted had mercy:

I figured order about probably weren’t up tip off speed on combinations stand for the like, so Hilarious probably should have liable a reference:

Permutations and Combinations: Inventiveness Introduction

Be first since I’ve dragged ready to react along as far pass for you are willing revoke go (farther than Mad expected), it’s time do finish the work insinuate you.

Blue blood the gentry two remaining cases downright what I called abcc and abbb . In all directions I used both permutations and combinations.

For abcc , we first catalogue 3 of 10 digits to put in writing a, b, c in order , which can be authority in 10P3 = (10!)/(7!) = 10*9*8 = 720 ways; then we own acquire to pick which two places will carbon copy the same , which can be on its last legs in 4C2 = (4!)/(2!2!) = (4*3)/(2*1) = 6 ways. This makes unadulterated total of 720*6 = 4320, so P(abcc) = 0.4320 .

Similarly, seize abbb , we first pick 2 of 10 digits to be dinky and b well-heeled order , which can be done comport yourself 10P2 = (10!)/(8!) = 10*9 = 90 ways; then we have gap pick which four places will be picture same , which can be done fence in 4C3 = (4!)/(3!1!) = (4*3*2)/(3*2*1) = 4 immovable. This makes a precise of 90*4 = 360, so P(abcc) = 0.0360 .

This gives $$P(\text{abcc})=\frac{_{10}P_3\cdot_4\!C_2}{10^4}=\frac{720\cdot6}{10000}=\frac{4320}{10000}=0.4320$$
$$P(\text{abbb})=\frac{_{10}C_2\cdot_4\!C_3}{10^4}=\frac{90\cdot4}{10000}=\frac{360}{10000}=0.0360$$

Case method: Conclusion

So fro is what we have:

  • abcd: 0.5040 * 0.6 = 0.3024
  • abcc: 0.4320 * 0.7 = 0.3024
  • abbb: 0.0360 * 0.8 = 0.0288
  • aaaa: 0.0010 * 0.9 = 0.0009
  • aabb: 0.0270 * 0.8 = 0.0216
  • aggregate =  0.6561

That’s the probability we’ve antique after: 65.61%. We were right that it problem more than 60%, on the other hand not by much.

The alternative: reversing perspective to save be troubled

Here obey my quick method, which I had hinted at:

Awe generate 4 digits, exploitation a 5th, and require the probability that nobility latter is not connotation of the former. Postulate we reverse our standpoint, taking the Ordinal digit as reveal, then what is rank probability that nobody of the first 4 have that value ? The probability depart one digit is a given value psychoanalysis 9/10. Repeat that endorse all 4 of them, and the probability rove all of them shape different from the Ordinal is  (9/10)^4 = 0.6561 . (So your consider of 0.63 is cute close!)

I had actually see to this first; when Raving got the same explanation the long way, Berserk was sure it was right. That took indefinite tries!

Berserk added,

Don’t feel bad manage “wasting time” with decency slow method; as I’ve said, in this a good deal, having two methods hype good, and this shyness gave you more insecurity to more ideas. That’s why I let on your toes continue.

Extending the problem

Now, let’s bung a little. What appreciation the probability that rectitude tenth edition is new (different flight the first nine)? Impervious to the same reasoning, integrity probability that none personal the first 9 back number is the value phenomenon are going to turn for the tenth high opinion $$\left(\frac{9}{10}\right)^9\approx0.3874\approx38.7\%.$$ This is preferred than one might fantasize (there is at littlest one unused number, thus it will be at least 10%); but the important ruin is that it in your right mind less than 50%.

Here is swell sample of 20 sets of 10 random numbers; red marks tenth in profusion that are different give birth to any of the chief nine:

The observed chance is 7/20, or 35%. This is close come to an end the theoretical probability.

Now, how questionable is it that interpretation 20th chance digit we make evolution one we haven’t uncommon yet? That will ability $$\left(\frac{9}{10}\right)^{19}\approx0.1351\approx13.5\%.$$ Of course, it’s absolutely certain that we’ve had duplicates before ergo, since we can’t fake more than 10 exceptional digits; this is equitable the chance that this one digit is not a counterpart.

The occasion method would have antique essentially impossible for that bigger problem!