Rhett Allain reports in Wired:
Starbucks recently announced a new drink size, the mini. Before the mini, there were only 3 drink sizes (and thus 3 data points). When you only have 3 data points, you can’t do much in the way of making a mathematical model. However, 4 data points might be just enough.
When life gives you lemons, make lemonade. But when life gives you data, make a model. One way to model real life things is to create a plot. If you want to see how variable y is related to variable x, plot y vs. x (where x and y could be just about any quantity). If these variables linearly related, you can fit a linear function to this data. Big deal, right? Yes, it’s a big deal. Once you have an equation that represents this data, you can estimate values of things that are yet to exist or may never exist. This is why we make graphs.
So here we are. Starbucks recently announced a new drink size, the mini. Before the mini, there were only 3 drink sizes (and thus 3 data points). When you only have 3 data points, you really can’t do much in the way of making a mathematical model. However, 4 data points might be just enough to have some fun. Just to be clear, the mini is just for frozen drinks and now you can get the following sizes: mini, tall, grande, and venti. Yes, there is the super large trenta—but that is for “iced” drinks like the iced coffee.
Bigger Sizes
Let’s make some graphs. Ok, for this first plot I am going to include both the mini and the trenta (even though you couldn’t get the same drink in both of these sizes). This is a plot of drink volume vs. “number” where mini will be “1” and trenta will be “5”.
What does this mean? Well, it looks like a quadratic function fits better than a linear function. You never want to just plot data—you really want this function to fit with it because then you can use it. So, let’s say Starbucks comes out with a new (and bigger) drink size. I would assume this would be drink size number 6 and we could call it the MEGA (although that’s not very trendy). How about a centi? I think that’s what they would call it. But how large would it be? Let’s take our fitting function and put in a value of 6. Boom. That’s a big drink at 41 oz. Get three of these centi drinks and you would have a gallon of coffee.
Price vs. Size
Price isn’t so easy. Different types of drinks cost different amounts. Also, it’s very possible that the price is location dependent (but I’m not certain). I went to the local Starbucks and looked at the menu. They don’t have the mini on the menu, but the price for the mini caramel frappuccino was 3.75. Here is a plot of price vs. volume.
With only 4 data points, it’s really difficult to pick between a linear fit and a quadratic fit. I decided to go with the simpler linear equation—because why not? Actually, I added a second linear fit that only uses the first three sizes (the orange line).
What does this plot mean? First, let’s look at the function that is created from all four data points. It tells us two things. First, it says that for every ounce of drink you pay 8.57 cents (that’s the slope of the line). Second, if you ordered a zero ounce drink it would still cost 2.95 (that’s the y-intercept). What is the 2.95 for? I was going to say it’s for the cup, but you can get a cup for free if you just ask for some water. Let’s say the 2.95 is for the service and the
atmosphere and the wifi (not really free wifi—it’s included with the drink).
Now let me compare the two linear fits. Notice that the venti drink falls a bit below the fit for the other three drink sizes? That tells you that you are getting a bargain. If the drink was priced along the orange line, it would cost 5.39 instead of 4.95.
What About Calories?
I didn’t have calorie information on the caramel frappuccino mini. However, Starbucks was kind enough to respond to an email request for data. So, here is a plot of calories (for a coffee frappuccino) vs. size. I included a 5th data point—0 calories for 0 ounces. That’s not a crazy addition, is it? I mean, I am drinking a zero ounce frappuccino right now and it’s zero calories.
This might look like a boring graph, but it is indeed useful. This shows that the calories in a drink is proportional to its volume. Although you would expect this, it’s still nice to see. Since the linear function has a slope around 15 calories per ounce, I could use this to estimate that a trenta coffee frappuccino would have 465 calories.
Homework
Don’t pretend like you thought there would be no homework. Of course there is homework. There are too many questions left unanswered.
OK, I admit that last question was a little off the wall. It’s still fun. If you need help with graphs in plotly, here is a quick video tutorial I made a while ago.
- What about cup height? Go to Starbucks and get a cup for each size. I suspect you could get an empty one if you asked. If you don’t want to get an actual cup, this site seems to have a correct scale drawing of the four drink sizes. Make a plot of something vs. cup height. That something could be volume, price, calories…you name it.
- Look at the Starbucks menu. Which item and what size would give you the best value for calorie per dollar?
- Do all the cups (including the trenta) have the same diameter at the top? It seems like they should so that they could all have the same lid.
- Measure the top and bottom diameter along with the cup height. Use conical frustrum volume equation to calculate the volume. How does this compare to the listed volume size?
- If you filled the mini cup with black ink jet toner, how much would it cost?
- Suppose your car gets 30 miles per gallon. How many trentas of gasoline would you need to drive 500 miles?
0 comments:
Post a Comment