Poked

This was supposed to be the post analyzing the survey results.Then I thought: if I’m writing that, I may as well show examples of some basic Bayesian analysis, like using likelihood ratios. And if I’m doing analysis, I may as well give some more background on data science and also show how the results depend on assumptions. And if the results depend on assumptions, I may as well fit a full consequential model with continuous interdependent parameters and the appropriate prior.

Bottom line: I spent the week reading a textbook on data analysis and didn’t write anything. Instead, this short post is a sequel to Conned, part of an emerging series tentatively called “what it’s like being a crazy person who nitpicks random numbers he sees”.

So, a crazy person walks into a new poke restaurant. First, he notices that this restaurant, like the last 7 poke restaurants he went to, isn’t called Pokestop. This is puzzling, because the perfect name for a poke restaurant exists, and it’s Pokestop.

Then, the crazy person notices a Number:

poke-200k

 

200,000! That’s even more than the number of trees we could save by paying our electricity bills online!

The crazy person flips the menu, and gets so caught up in the math that he somehow orders a grotesque monstrosity made of surimi (I learned that it’s just a fancy word for imitation crab sticks), mango, seaweed, and Hawaiian salt (I learned that it’s just a fancy word for salt).

poke-menu

As the astonished cook reaches for the salted mango, the crazy person starts doing mental math.

200,000 combinations and we have 6 categories, so the average number of items in each category must be the 6th root of 200,000, or the cube root of the square root of 200,000. The square root of every even power of 10 is easy, i.e. √10,000 = 100. We’ll break 200,000 into 10,000*20. 20 is between 16 and 25 so the square root of 20 is ~4.5. This means that √200,000 ≈ 100*4.5 = 450. OK, I need the cube root of 450. Do I remember any cubes? 103=1,000, that’s too much. 83=29=512, bingo! The sixth root of 200,000 is the cube root of 450 is just below 8, so there should be 7-8 combinations on (geometric) average in each category. (The actual answer turns out to be 7.65).

That’s how I do math quickly in my head. I remember a few basic facts (like powers of 2 up to 1,024) and a few basic rules (like ( a m ) n =  a mn). I can get an approximate answer in my head to almost any calculation including roots, logarithms and exponents faster than I can pull out my phone. I taught a workshop training my MBA classmates to do this before consulting interviews. One Chinese girl was so impressed by this workshop that she dated me for a month even though she’s a straight 10 and I’m a 6.5 if I get a good haircut.

Anyway, back to poke: 200,000 options is obviously way too low. The average number is close to 7 or 8, but several of the categories allow you to pick more than one item. For example, you can create 16 combinations of toppings by choosing to include or exclude any of the four toppings available. As for add-ins, being able to pick 6 out of 13 involves the combination function, and the combination function has factorials in it so you know it means business. By the time my bowl was done, I estimated that Koshe Poke are underselling themselves by at least two orders of magnitude. It turns out they’re off by a factor of 3,500:

poke calc.png

710 million! You can try a different combination of poke each day without repeating yourself for almost 2 million years. Sometime around 1,509,464 AD, you’ll stumble upon a combination as horrible as surimi-mango-salt-seaweed and you’ll finally understand what it’s like to be me, a crazy person living in a world of crazy numbers.

poke-710m

 

8 thoughts on “Poked

  1. And that’s not even considering the possibility of paying extra for more protein or crispies. That’d give you another 2^8/8*2^12/(12c2) which takes the number of combinations to 1,410,695,430,144.

    A poke place just opened near me. They’re called poke shop which I think is as close as you could get without worrying about trademark.

    Liked by 2 people

    1. You’re also under counting it because you don’t have to pick 6 add ins. Instead of 1716 combinations for the add ins, you have 13C6 + 13C5 + 13C4 + 13C3 + 13C2 + 13C1 + 13C0 = 4096

      Over all there are 7 * 8 * 4096 * 7 * 16 * 79 = just over 2 billion combinations without paying any more money.

      Paying more money as Maggie rightly suggests gives 7 * 2^8 * 2^13 * 7 * 2^4 * 2^12 = about 6 and three quarters trillion.

      Another half to four orders of magnitude off depending on the criteria on top of what you found. Also, continuing to nit pick, 200,000 combinations isn’t enough to guarantee uniqueness (but you appear to have demonstrated that one can achieve it if one tries). 700 million is likely enough to guarantee uniqueness (depends on how many people eat Pokémon, I suppose every meat eater in that universe) but 6 trillion is.

      Liked by 1 person

  2. A way to tell the difference between a pure mathematician and an applied mathematician.
    Applied mathematician: It can’t be 200,000! that would mean 7-8 options per category, and there’s way more than that!
    Pure Mathematician: It can’t be 200,000! The first choice has three options and 200,000 doesn’t divide by 3!

    Liked by 3 people

  3. Interestingly, it wouldn’t take very long to get a duplicate order (assuming no communication, of course in real life the same person orders a dish multiple times).

    Leaving aside a few small technicalities (maybe half the people just get all 4/4 toppings, maybe some people decide to get extra food) this is the 710,341,632 “birthday” problem.

    https://en.wikipedia.org/wiki/Birthday_problem#The_generalized_birthday_problem

    You know, where instead of days of the year we have choices of poke. It would take sqrt(2ln2710,341,632)=31381 orders to have a 50-50 chance of a duplicate. These guys open 60 hours a week, and there are ~50 weeks in a year (maybe they go on break). So that’s 3000 hours a year. Well, if they make a dish every 5-6 minutes while open they get a duplicate in a year. I would guess they make food 3x as fast so more likely 4 months.

    So probably they will make the same dish twice by chance pretty soon.

    Liked by 1 person

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s