How do you calculate the odds of this happening?

Today I was assembling a machine. There were forty pins in one subassembly. They were the size of cigarette butts.
Eight of the pins were slightly longer than the rest. Not visibly longer, maybe .010”.They fit into the bores what were cut deeper, properly installed all pins are flush with the top of the hole.
I didn’t know there were two lengths of pins on disassembly so they where all dumped into a random pile.
All pins fit fine until pin number fifteen. This is where the difference was found as I put a long pin in a shallow hole. I had put two long pins in two deep holes and twelve short pins in short holes before making the first matching error.
What are the odds of getting that far without putting a short pin in a deep hole or visa versa?
There was a pattern to the long and short holes. Not being aware of the difference I was just picking a hole at random to install a pin.
Likewise, the pins were picked up out of a pile with no knowledge that there where two sizes.

There were 14 choices you could make. Each choice is of two possibilities. Assuming random distribution of holes and random distribution of pegs, the odds were 1 in 2^14 that every choice you made would be correct, or 1 in 16,384.

However, it seems that the odds weren’t even. There were more short holes and more short pegs than long holes and long pegs. But unless we know the exact distribution of pegs and holes you were choosing from out of the 40 we can’t say. But suppose there were 12 short holes and 12 short pegs, and 2 long holes and 2 long pegs. What are the odds that you would get the 2 long pegs in the correct long holes? The odds that you would get the first long peg in a long hole are 2 in 14. The odds you’d get the second are 1 in 13. So given those assumptions the odds were 1 in 91.

I think the OP’s scenario has 8 long pegs and 32 short ones, so the odds aren’t 50/50.

There might be a nice, neat calculation, but it would go something like this in my layman’s method: 32/40 * 31/39 * 30/38 … 20/28 * 8/27 * 7/26 (assuming the two long pins are last).

In short, the odds are not as bad as one might think, since most of the choices have 75-80% chance of succeeding individually. Still, it’s pretty unlikely.

“pretty unlikely”
The other question I had was if there are terms for odds.
1 in 100 is unlikely.
1 in 1000 is extremely unlikely.
1 in 10000000 is inconcievable. ?

One in a million events happen to six thousand people every day.

Strictly speaking, events *which happen to one person per million people per day *happen to 6000 people every day. You need to put the time qualifier on the the probablility, or else you can do better than that:

Sit down and deal yourself a bridge hand (13 cards) at random. The odds of getting the hand you got, in the order you got them, was one in 3,954,242,643,911,239,680,000 – and yet, there you go! (You only need 4 cards to get to one in a million). And every single person on earth can do this trick as often as they want to – much more than once per day.

It’s not strictly correct, but it captures the basic idea well enough.

Or to one poor sap 6,000 times.

I guess this is part of what I don’t understand.
I can do a oiam ( one in a million) operation one time and get the oiam result. Is it also true that I could do it a million times and not get the oiam result?

Timewinder says that 4 cards will get you a one in a million result. S/he is probably right - this is hardly my field.

So the point is that if you deal yourself four cards, the odds that those cards would have been dealt in that order are about 1/1,000,000, no matter what the cards turn out to be.

If you decide in advance what result you want, and keep dealing 4 card hands until you get it then yes, I suspect that it would easily be possible that you could deal a million hands and not get your desired result.

IIRC, if you take (bignum) trials, each of which has a 1/(bignum) chance of success, then there’s a 1/e chance that you won’t get a single success, where e = 2.718281828… is the base of the natural logarithm (“bignum”, of course, is an arbitrary very large number).

Here’s a rough approximation of the odds of your original problem:

Assume instead of having only 40 pins you have a huge pile with thousands of pins. But they still have the same distribution. 80% short and 20% long.

If there are 12 short holes and 2 long holes the chances that you will randomly pick the right pin all 14 times are:

(0.8 ^ 12) * (0.2 ^ 2) = 0.00274877906944

or

about 1 in 364

Of course, you’re not picking from a huge pile. The odds of picking a long or a short pin fluctuate a little as your small set of 40 dwindles. But that variation won’t have a huge effect on the odds. The exact result will be pretty close to my approximation.

While I find it hard to believe that you inserted them at random (most people would insert with some pattern like right to left or something, at least), I calculated the exact probability…a close approximation is 1/334.

40 pins in a pile
8 Long
32 Short
you had to select the following pattern: 2 Long, followed by 12 Short (as you can see in my calculation, the actual order of the pegs is irrelevant, since no matter what the actual sequence is, the calculation would be the same)

Probability = (87323130292827262524232221)/(4039383736353433323130292827)
=0.0029937057800834888

So if I did that every day for a year, I would get that far only one day each year (assuming I forget every day that there were two sizes of pins).
I wondered also about the randomness of hole picking. I would have followed a line as a result of training under a German journeymen, but I am sure I skipped around some just to break up the boring task since he was no where in sight.

Why isn’t it strictly correct?

As TimeWinder said, you need to specify the timescale you’re looking at.