?

Log in

No account? Create an account
I am a gigantic nerd - The Mad Schemes of Dr. Tectonic [entries|archive|friends|userinfo]
Beemer

[ userinfo | livejournal userinfo ]
[ archive | journal archive ]

I am a gigantic nerd [Jun. 27th, 2008|09:34 pm]
Beemer
Lifto forwarded an email from his mom to a mailing list I'm on asking for help figuring out how much money her company (or whatever) will spend on a promotion that involves a Plinko board. And I just spent about an hour and a half figuring it out. Because I can, dammit. And because I'm sort of compulsive about that kind of challenge.

Here's the basic setup (I'll put the answer behind the cut, in case people want to think about it themselves).

Here are some pictures of Plinko boards. You drop a chip in at the top, it bounces around and falls into a slot at the bottom. They want to do one with 7 slots: $5 $10 $25 BP $25 $10 $5. BP means "Birthday Present", and if you get that, you get to go again and double your money. (But only one doubling -- after that, BP is just a re-roll.)

If they have 2100 people play this game, how much will it probably cost?

So the first thing I'll note is that the pictures show 8 slots at the bottom, not 7. I'm ignoring that. The technique is the same.

It turns out that there are a couple simplifying assumptions about this problem that make it a whole lot simpler than it might look. The first is that the edges of the board don't actually matter. If the layout of the prize slots is symmetric, then the chip reflecting off the wall is isomorphic to it wrapping around to the other side. So we can pretend it's a cylinder.

Second, the players can drop the chips in from any point at the top, and absent any actual data about where people like to drop chips for psychological reasons, we should assume that all starting positions are equally likely.

So, unless the pegs are seriously different from one part of the board to another, the actual dynamics of the drop are irrelevant, because whatever kind distribution they generate, it's cloned across all the possible starting positions, making all the ending positions equally likely as well. Which means it's basically just rolling a 7-sided die.

Thus, p = 1/7 for each slot, and with the doubling on BP that gives us the following outcomes:

 x     p(x)
$05  @ 6/21
$10  @ 7/21
$20  @ 1/21
$25  @ 6/21
$50  @ 1/21


The average payout per play is $(30+70+20+150+50)/21 = $15.24. Multiply that by 2100 players and you get $32,000 for the total.

But in terms of budgeting, they'll be happier if they look at the distribution a little bit, too. The plays are IID, so by the Central Limit Theorem, it'll converge to a gaussian. I ought to have been able to figure out what the variance is from pure theory, but math was hating me tonight, so I just simulated 10,000 sets of 2100 plays and determined that sigma is pretty close to 500. (Anybody know what the right number is, and why?)

So it'll probably cost them around $32,000, give or take $500, but there's a 1 in 50 chance it could cost as much as $33,000. Depending on how their budgets work, it might be important to budget $33k instead of $32k. This is something I've been doing a lot of at work: trying to communicate to people that the right way to respond to uncertainty is find out what the range of likely outcomes is and come up with a plan that will work wherever reality actually ends up.

Of course, they also need to figure out how much padding they need to cope with the uncertainty in the number of players, but I figured that was something they already knew about, being that this is a promotion to get people to come into their store or whatever.

They were originally thinking about letting players double indefinitely with the BP, but didn't know how much that would cost. The fun bit is that I realized you can actually figure that out really easily if you modify it just a little. If you change BP to "get an extra chip", then it's equivalent to playing with a six-slot board and adding an extra player with probability 1/7 every time someone plays. And you can figure out how many extra players you'll get because it's a geometric series: sum_k (1/n^k) = 1/(1-n) = 7/6 for n = 7. So your 2100 players become 2450 playing for $5, $10, or $25 (p = 1/3 for each), and you get a mean of $32,666 and a sigma of about $425.

Whee! Math is fun!
LinkReply

Comments:
From: detailbear
2008-06-28 01:43 pm (UTC)

Accounting assumption alerts

A couple of problems I found simulating this in Excel.

1. the chip reflecting off the wall is isomorphic to it wrapping around to the other side. Not quite true. In reality, no chip can move from one side to the other; all chips in an end slot will be moved to the inside. It's almost equivalent (in that .5 + .5 = 1) and would not make a difference, except for ...

2. we should assume that all starting positions are equally likely. As a social exercise, we can't assume that. As Dan pointed out, the average person doesn't make the assumption that all slots are equal, and therefore we can't take the easy route and calculate probabilities of outcomes. We have to simulate the expected payoff of each starting slot (including the difference caused by alert 1), then simulate various behaviours to discover upper and lower limits to the total winnings.

3. The distribution is affected by the number of rows of pegs on the plinko board. I've used the 9 rows plus the last virtual row from the slot edges for a total of 10. I'd have to simulate a range of number of rows to discover if that made a difference to the final distributions.

So, I built a spread sheet that calculated the probability of a chip ending up in any slot when it started in a particular slot. Odd numbered peg rows moved a chip L/R at .5 each. Even numbered rows did that for all slots except the end ones, which moved 100% toward the center. For example, raw distribution for slot 1 is:

0.451171875 0.322265625 0.161132813 0.053710938 0.010742188 0.000976563 0.00

For the BP slot, I then took the distribution for that slot, and spread it out over the other slots in the ratios like (slot 1/all slots except BP). Here's the final distribution for slot 1:

0.476780186 0.340557276 0.170278638 BP 0.011351909 0.001031992 0.00

Then I took the payoff for that slot and multiplied it by the probability of landing in that slot. The results:

10.34055728 12.56921373 15.79238329 17.44818653 15.79238329 12.56921373 10.34055728

Now we can run scenarios on 2100 drops with any assumptions of player's initial choice preferences that we want.

Maximum payout will be when all chips start in the BP slot: 36641.19
Minimum payout will be when all chips start in the $5 slot: 21715.17
If all slots are chosen equally, the payout would be 28455.75

So, the company would budget $36,000 conservatively and about $32000 on something approaching a bell curve distribution.

I'll send you my spreadsheet so you can check my math.


Edited at 2008-06-28 01:50 pm (UTC)
(Reply) (Thread)
[User Picture]From: dr_tectonic
2008-06-28 03:02 pm (UTC)

Re: Accounting assumption alerts

I agree that people aren't likely to pick all starting slots with equal probability, but without data on what they do pick, I don't think you can legitimately assume anything else.

Given that the number of starting positions is small, though, you're right, it's easy enough to do the problem several times, once for each possible starting position, and at least get upper and lower bounds on the effects of behavior. That's a good point, and a very helpful elaboration of the analysis for planning purposes.

I haven't checked it in detail, but your results look right to me. If everything's starting in the same position, the random walk should give you a gaussian centered on the starting slot, and that appears to be what you've got.

Kudos!

Edited at 2008-06-28 03:03 pm (UTC)
(Reply) (Parent) (Thread)
From: detailbear
2008-06-29 02:15 am (UTC)

Re: Accounting assumption alerts

Thank you. I remember doing economic problems like this.
(Reply) (Parent) (Thread)