Sep. 20th, 2000

alexpgp: (Default)
interpretation
new tales told by a stranger
tongue like a mirror

Cheers...
alexpgp: (Default)
Some folks at the office decided to throw caution to the winds a couple of weeks back and decided, on a whim, to each chip in some money and buy a bunch of lottery numbers. Out of the 25 tickets bought, one came in as a 3-of-6 winner, netting $10, for an overall loss of $15 associated with this bagatelle.

As I started to analyze the odds of coming up a 3-of-6 winner - yeah, okay, I'm strange - it suddenly occurred to me that the analysis I posted in my LiveJournal a couple of weeks ago, which painted the lottery as a pretty bad deal, was flawed (though not to the extent to where the deal looks good; it’s just not as bad as I made it out to be).

I've gone back and revised the analysis in that post, but for now, I’m going to explain what I did wrong. You, gentle reader, may find this amusing or boring or whatever; I’m just writing "out loud" to make sure I understand it. It's the engineer in me.

To make things easier on the gray cells, I'm going to consider a game where there are 10 lettered balls, and you pick 4 of them to win a prize. The first thing I have to realize is that there are

10 * 9 * 8 * 7 = 5040

ways of picking 4 letters from a starting population of 10 letters.

(The Long Explanation: I can pick any of 10 letters for the first letter. Whichever letter I pick, there are only 9 choices left for the second letter, so there are 90 different ways of picking two letters. At this point, for any of the 90 ways I picked the first two letters, I have 8 remaining choices ... and so on.)

However, for any given combination of winning letters, since order does not matter, it turns out there are a number of ways the letters can come up. For example, if the winning letters for a particular game are A-B-C-D, then I win whether the letters are picked in the order A-B-C-D or B-D-C-A or C-A-B-D or ... you get the idea. So what is that number?

There are 4 * 3 * 2 * 1 ways to arrange the four letters, which is to say that there are 24 ways that the winning letters could have been picked. (The proof is similar to The Long Explanation above, or one could write out all the possible combinations in this case.)

So, in other words, the odds of winning this game are not one in 5040, but 24 in 5040 (or one in 210). This is where I went astray in my analysis of the Texas lottery. After determining that there are

50 x 49 x 48 x 47 x 46 x 45 = 11,441,304,000

ways to pick 6 of 50 numbers, I neglected to note that there are

6 * 5 * 4 * 3 * 2 * 1 = 720

ways to arrange the 6 winning numbers. So the odds of winning the (old, 50-number) Texas lottery are not one in 11.4 billion, but more like one in about 15.9 million. That represents a definite improvement over what I initially claimed (almost three orders of magnitude), but it still is a sucker's game.

However, this post got started when I began to wonder about the odds of coming up a 3-of-6 winner in the Texas lottery, so let me continue my analysis. Let me take the next step and ask: What are the odds of getting 3-of-4 letters in my make-believe lottery?

To answer this question, I have to know how many ways there are to combine three winning letters with one loser. Since I know there are 24 ways to pick four winning letters, I'll try replacing the last letter in each of the 24 cases with a loser (6 choices), giving me 4 * 3 * 2 * 6 = 144 different 3-of-4 combinations.

If I stopped here, I might conclude that the odds of getting 3-of-4 are 144 in 5040, or one in 35, and I'd be wrong. This is because I haven't considered the case where the wrong letter is selected in the third position, or the second position, or the first position. In each case, there are 144 combinations. Therefore, there are 144 * 4 = 576 ways to get 3-of-4 letters. The odds are 576 in 5040, or about one in 8.75.

Next question: what are the odds of getting 2-of-4 letters?

If the mathematical pattern holds, the number of winning combinations should be 4 * 3 * 6 * 5 = 360. But this assumes the winners are picked first and the losers last (we can represent this as W-W-L-L, showing winners and losers from left to right). There are also the following possibilities: W-L-W-L (pick a winner, then a loser, a second winner, and a second loser), L-W-W-L, W-L-L-W, L-W-L-W, and L-L-W-W.

So the number of ways to get 2-of-4 letters is 6 * 360 = 2160. The odds are 2160 in 5040, or one in 2.33.

What about 1-of 4?

The number of "winners" is 4 * 6 * 5 * 4 = 480, assuming the winner is picked first. But the winner can be picked first, second, third, or fourth, so there are 4 * 480 = 1920 ways to win this way. The odds are 1920 in 5040, or one in 2.62. (That's right, it's easier to get 2-of-4 in this game than it is to get 1-of-4.)

What about the odds of my personal favorite, getting 0-of-4?

Well, to get none of the selected letters, I have to make sure the first selected letter is one of the 6 losers, the second is one of the 5 remaining losers, and so on. There are 6 * 5 * 4 * 3 = 360 ways that can happen, so the odds are 360 in 5040, or one in 14.

I've covered all the bases. If I did all of this right, when I add up all the possibilities (24 + 576 + 2160 +1920 + 360), the sum should equal 5040. It does.

So there is a complicating factor any time we're looking for a combination of winners and losers. First, we must set up an expression that tells us how many ways there are to win for a particular sequence of winners and losers, and then we have to figure out how many permutations of winners and losers there can be.

Aside: There is a math concept called "factorial" that denotes an expression equal to the integer it is applied to, times that integer minus one, times that integer minus two, and so on down to one. The shorthand for factorial is an exclamation mark, as in 10! (which equals 10 * 9 * 8 * 7 * 6 * 5 * 4 * 3 * 2 * 1, or 3,628,800).

It turns out the expression for figuring out how many different ways to combine winners and losers, where W is the number of winners, L is the number of users, and P is the combined number of winners and losers is:

P! / (W! * L!)

Therefore, there are

6 * 5 * 4 * 3 * 2 * 1/ (3 * 2 * 1 * 3 * 2 * 1)

ways to combine 3 winners and 3 losers among six picks. If you do the math, you find the answer is 20.

The number of ways any particular combination of 3 winners and 3 losers comes up is:

6 * 5 * 4 * 47 * 46 * 45 = 11,674,800

Multiplying the two yields 233,496,000, which is the total number of ways to get 3 winners and 3 losers out of the 11,441,304,000 possible combinations of 6 numbers out of 50. (Still with me? We're almost finished!) Therefore, the odds of getting 3-of-6 in the old Texas lottery were 233,496,000 in 11,441,304,000, or about one in 50.

My colleagues, it turns out, beat the odds. This time.

And still lost money.

Cheers...
alexpgp: (Default)
breakfast adventure
a steak, egg, and cheese bagel
at walt disney world

Cheers...
alexpgp: (Default)
Up a little later than usual today, owing to last night's obsessive analysis. I don't understand why I get like that sometimes, but the behavior does come in handy on occasion. I plan to channel that kind of approach to finalizing my presentation over the next 5 hours, so I can face the rest of this year's ATA conference with a clear conscience.

Food was near the top of my list after the usual morning routine. The hotel breakfast buffet runs $16.95, and while I'm sure it's complete and offers everything I'd expect for that price (e.g., beluga caviar), I felt I had to pass. At the risk of completely clogging my arteries, I set out to visit McDonald's again. Yesterday, when I went the first time, I was too busy looking for a place to eat on the outbound trip and too busy dodging raindrops coming back to look around carefully at all. This morning, I made a beeline for the Golden Arches, but took it a bit easy coming back to the hotel. I'd have stopped to smell some roses, but there weren't any in evidence. So I did the next best thing, just looked around.

The folks who make Lego building blocks maintain a store right next to the McDonald's. There's a semi-enclosed playground outside where kids can find individual areas in which to play, build, or whatever with Lego blocks (under the watchful eye of parent or guardian, ask the signs). I'll let you guess what they have inside the store. :^)

There are also a number of large Lego sculptures scattered around: a sea-monster out in the lake, some cartoon figures. There are even life-sized Lego-block people scattered around, including a tourist loaded down with a Lego-block kid on his back, a Lego-block photo camera around his neck, and an old-style, Lego-block videocam on his shoulder. My favorite one of these, however, is the plumb-tuckered-out Lego-block tourist situated on a bench, with head hanging low and one leg kind of angled out. There's something of a disconnect when you first see such a figure; it's a nice disconnect, though, similar to the feeling you get when you hear a funny joke. Mr. "Tired" must be pretty popular, I saw people sit down to be photographed next to him; upon closer inspection, I found he sports some lipstick on his cheek, too.

Out in the water, hardly noticeable, there is a duck made out of Lego blocks standing a little out in the water, with wings outspread. In fact, it is the immobility of the wings that makes the bird noticeable in the first place. Somebody at Lego has my kind of sense of humor. As I watched, I saw one of the real local birds waddle past the plastic one with hardly a glance. No disconnect there, I suppose.

On the way back to the hotel, I passed an open-air stage with bench seating. There was nobody there, nor was there any indication that there would be any performance there anytime soon, but the speakers off to each side of the stage were playing the "Heigh-ho! Heigh-ho! It's off to work we go" song from Snow White. I noticed I was walking in cadence to the beat, so I stopped and looked around. With some obvious exceptions (an obese woman who couldn't move her legs that fast if she wanted to, a young boy who had to move his legs faster to keep up with mom and dad) most folks were walking to the same cadence. This is obviously evidence of some conspiracy, but a full investigation will have to wait until later.

Cheers...

Profile

alexpgp: (Default)
alexpgp

January 2018

S M T W T F S
  1 2 3456
7 8910111213
14 15 16 17181920
21222324252627
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 14th, 2025 09:18 pm
Powered by Dreamwidth Studios