My Halloween Candy in Graphs – 2012

Last year I decided the best way to have fun on Halloween was to make graphs.  It was so much fun, I decided to do it again this year.

When the night was over, we had a whole lot more leftover candy than last year.  Did we buy too much candy?  Did not enough Trick-or-Treaters visit this year?  Why didn’t we run out of candy like we did last year?

The basic premise was the same:

  • Buy candy
  • Count the candy before the night begins
  • Count the number of kids that trick-or-treat
  • Count the candy midway through the night
  • Note the time when the last piece of a specific candy is taken
  • Count the candy at the end of the night
  • Make graphs

Last Year’s Stats – 2011

  • 419 Treats, 379 Treats taken by Trick-or-Treaters
  • 189 Trick-or-Treaters
  • 2 Hours of Trick-or-Treating
  • 2.01 Treats taken per Trick-or-Treater

This Year’s Stats – 2012

  • 430 Treats, 307 Treats taken by Trick-or-Treaters
  • 216 Trick-or-Treaters
  • 1:45 Hours of Trick-of-Treating
  • 1.42 Treats taken per Trick-or-Treater

What a difference!  We bought about the same about of Treats as the year prior, yet we had a LOT more leftover candy, even though there were more Trick-or-Treaters.

Because of this, we only ran out of two types of candy: M&M’s Peanut and Skittles, and we ran out of those types in the final 15 minutes.

Here’s a graph showing the starting and ending percentages of the different candies:

Purple marks if it was taken LESS relative to other candies.
Orange marks if it was taken MORE relative to other candies.

Let’s also group the candy types together and see if there’s a trend:

Candy that was in Bar form (for example, Hershey’s and Snickers) was less popular than candy in Bit form (for example, M&Ms and Starburst).

Sugar-based candies (Skittles and Starburst) were more popular than Chocolate and Nut candies.  This is a departure from last year, when we had a bunch of Starburst left over!

In last year’s post I noted that trying to put all candies individually on a line chart would make it messy, and very hard to get any information out of the chart.  This year, I decided to use a Trellis chart to help alleviate that problem.

In this chart, each brand gets its own view.  However, for the candy types where I didn’t have a large starting amount, it’s hard to discern differences.  If we start each brand at 100% and work downwards from there, we can see trends of how quickly (or slowly) a particular type of candy was taken, and since we counted at the mid-point, we can see which types went faster earlier or later in the evening.


Here is where this gets REALLY geeky.

Last year I put together a basic line chart highlighting the inverse relationship between number of Trick-or-Treaters and the amount of pieces they took.  As it turns out, my formula for calculating that number was flawed.

Here’s last year’s chart:

What was flawed about it was the way I calculated the number of pieces per Trick-or-Treater.  Last year I took a full count of the candy at specific times:

  • At the start
  • During the middle
  • When a brand of candy ran out
  • At the end

Here’s a screenshot of my Excel sheet from last year.  Any cell with a gray background means an actual observation, and white cells represent a formula to approximate what the best-guess of the remaining amount was.

The problem was with the old formula.  Last year I had assumed that the amount between observation points should have been:

S = Second Observation Point
F = First Observation Point
RR = Number of 15 Minute Intervals Remaining until Second Observation Point
TR = Total Number of 15 Minute Intervals between First and Second Observation Point

S + ((F-S) * RR/TR) = Candy Remaining for a Given Interval

This is pretty similar to a standard depreciation formula as you move from Date A to Date B.

However, that assumes the same amount of Trick-or-Treaters in each 15-minute interval, which was NOT the case.  Given that I knew how many kids visited within each 15-minute interval, I could better refine the formula to approximate the number of pieces remaining within each time block.

S = Second Observation Point
F = First Observation Point
RTT = Number of Trick-or-Treaters remaining until Second Observation Point
TTT = Total Number of Trick-or-Treaters between First and Second Observation Point

S + ((F-S) * RTT/TTT) = Candy Remaining for a Given Interval.

This leads to a much more refined formula.  Here’s last year’s chart again, with the old and new formulas:

So now that we’ve established a new (and hopefully better) formula, we can compare this year to last year using the same methodology:

Interesting things to note:

  • For the most part, the amount of Trick-or-Treaters visiting in each 15 minute block was about the same, with the exception of 7:30.  We had a rush of kids at that point!
  • Because we didn’t run out of very many types of candy this year, it was much more difficult to get more specific numbers behind how many pieces each kid took.  However, it can be generally observed that on average, each kid took less than they took last year, especially towards the end of the night.
  • From this it’s easier to explain why we had so much more leftover candy than last year; each Trick-or-Treater took less on average.


This year we picked up seven different types of multi-pack bags.  In every instance, we received more candy than what was promised on the bag, which was a nice plus.

Favorites and Non-Favorites

Last year we saw that sugar-based candies where the least likely to be taken by the Trick-or-Treaters.  What about this year?

This is a relatively boring graph, in that there’s very little movement.  That in itself tells a story, though, in the fact that for the most part, kids were taking candy in roughly equal proportions.  Was this because we broke the three types out into three separate buckets?  Were kids just evenly grabbing from each?

Compared to last year, the increase of sugar candies compared to the average is the most interesting. What was the difference?  Did more kids take a liking to Skittles and Starburst?  Did we do a better job preventing the smaller Starburst packages from falling to the bottom of the bucket?  These are the mysteries of life that allude us all.
Just for kicks, here’s the graph comparing Bar candies to Bit candies:

Again, very little movement!

Intervals for Trick-or-Treating

We had 216 total Trick-or-Treaters.  I was able to track two things with each group:

  • How many kids in a group
  • What time that group arrived

There were 60 total groups of Trick-or-Treaters, with an average size of 3.6.

Here’s the distribution of groups:

This makes for interesting visualizations when you decide the time interval to split it by:

Planning for Next Halloween

  • Do we have too many types of candy?  I think that we do.  Next year, I want to simplify it by having only two or three choices.  This will also allow me to get better counts at more frequent intervals, resulting in more accurate calculations.  It will also create an actual choice for the Trick-or-Treater.  “Do I want Candy A or Candy B?”
  • Right now, with so many choices, most kids don’t think about it.  They take some candy, say thank you, and move onto the next house.  However, if you declare that they have a choice, it makes them think about what they might actually want to take.
  • What types of candy should we offer next year?
  • I wanted to also note the type of costumes Trick-or-Treaters had, and note trends, however with so many kids it was difficult to make effective observations and take notes.  I wonder what I can do next year to make capturing information easier?

Now, who wants to help me eat this leftover candy?

One thought on “My Halloween Candy in Graphs – 2012

  1. Cory, this is awesome! Great job, I look forward to seeing next year’s results! But just a thought, for a larger more comprehensive study ask people on the interwebs to do it too, then compare neighborhoods, cities, or even regions

Leave a Reply

Your email address will not be published. Required fields are marked *