Why not subscribe?

Showing posts with label IRI Marketing Data Set. Show all posts
Showing posts with label IRI Marketing Data Set. Show all posts

Thursday, November 26, 2015

Benford's Law in Consumer Packaged Goods: More Categories, More Patterns

In our previous posts in this series, on package sizes and product sales, we found that Benford's Law (in which a first digit of 1 is more common than a first digit of 2, etc.) held for unit and dollar sales at the UPC-store-week level, but not when we aggregated further to the category-store-week level for two categories, beer and yogurt.

I've taken the earlier graphs for beer and yogurt and combined them so we have one graph for each category.  The Benford's Law expectation is shown in the dashed blue line.

As we noted before, the first digits of units (UPC-store-week units) and dollars (UPC-store-week dollars) show a good fit. A UPC is a unique product with a specific Universal Product Code on the label, so it's very low level.  When we aggregate up to category level, to sales of the entire product category, the fit isn't as good.



I looked at two other categories in the IRI Marketing Data Set [7] to see if this pattern generalizes.

For household cleaners, we see a reversal.  The UPC level has an excess of first digit 1s and 2s for units, which isn't surprising since these items tend to have low weekly movement. The dollars fit at the UPC level is good, but shows a bit of divergence.

The fit at the category level for both units and dollars is excellent.
For frozen pizza, we see a result that's similar to beer and yogurt: the fit at the UPC level is good, but at the aggregate level has divergence.

Does this mean anything?

There are some pretty graphs here, but do they mean anything?

The generalization from this analysis is that the degree of fit of actual data to Benford's Law is variable, and depends on the degree of aggregation.  Aggregating the data to a higher level may produce a better fit. We found this with product sizes and with household cleaners. Or, it may degrade the fit. We found this with beer, yogurt and frozen pizza sales.

The degrading of fit when aggregation occurs is different from the degrading of fit when mixing occurs. [If we have 10 observations of A and 10 observations of B, we have 10 observations of aggregated A+B, but 20 observations of mixed A B.] The effect of mixing is understood [e.g. 1, appendix 3] but I need to look at more literature to understand the aggregation effect. It's a bit surprising, since the sales of the entire category tend to be much higher than the sales of individual products, and "As a rule, the more orders of magnitude that the data evenly covers, the more accurately Benford's law applies." [8]  However, Benford's Law is more likely to apply when there are multiplicative fluctuations (numbers multiplied together) than additive fluctuations (numbers added together). [8]

Benford's Law is mostly a curiosity, but is cited as one way to test for fraud. Examples of this are claimed in financial statements [1], Iranian elections [2,3,4,5,6] and other cases.

But we have to apply caution here. What fits in one context (e.g. one company) may not fit in another -- as we see here with household cleaners showing the opposite pattern from the other three categories.

In addition, there's the obvious implication that using Benford's Law patterns to test for fraud only works until the fraudsters get smarter.


[1] Amiram, Dan, Bozanic, Zahn and Rouen, Ethan. Financial statement errors: evidence from the distributional properties of financial statement numbers.  Rev. Account Stud (2015) 20:1540-1593.

[2] Roukema, Boudewijn F.  Benford's law anomalies in the 2009 Iranian presidential election. (2009) Submitted to the Annals of Applied Statistics.
http://arxiv.org/PS_cache/arxiv/pdf/0906/0906.2789v1.pdf

[3] Gelman, Andrew. Unconvincing (to me) use of Benford’s law to demonstrate election fraud in Iran. Blog post, June 17, 2009. http://andrewgelman.com/2009/06/17/unconvincing_to/

[4] Gelman, Andrew. Combining findings at the Province and County Level from Iran's Election. Blog post, June 20, 2009. http://andrewgelman.com/2009/06/20/combining_findi/

[5] Gelman, Andrew. The Devil is in the Digits. Blog post, June 20, 2009. http://andrewgelman.com/2009/06/20/the_devil_is_in/

[6] Beber, Beermd and Scacco, Alexandra. The Devil is in the Digits: Evidence That Iran's Election was Rigged.  Washington Post, June 20, 2009 http://www.washingtonpost.com/wp-dyn/content/article/2009/06/20/AR2009062000004.html?hpid=opinionsbox1

[7] Bronnenberg, B. J., Kruger, M. W., & Mela, C. F. (2008). Database Paper—The IRI Marketing Data Set.Marketing Science, 27(4), 745–748. http://doi.org/10.1287/mksc.1080.0450
[8] Wikipedia, Benford's Law. Retrieved November 29, 2015. https://en.wikipedia.org/wiki/Benford%27s_law 

Monday, November 23, 2015

Benford's Law and Unit and Dollar Product Sales

In my previous post, we looked at whether package sizes followed Benford's Law. We found that for individual categories (such as beer, or yogurt) the first digit of package sizes did not follow Benford's Law, but when we aggregated across products we did get a decent fit, especially considering we weren't quite expecting one.

Today we'll look at an area where we would expect to see Benford's Law apply -- the unit and dollar sales of items.  Once again, we'll use the IRI Marketing Data Set [1], but we'll just use two categories, beer and yogurt, so we don't show an overwhelming number of graphs. (Also because I have only looked at these two categories so far.)

Dollar sales in a week for a product (individual UPC, Universal Product Code) in a supermarket is easy to understand. Units is a bit trickier but corresponds to buying a package: for beer, a 6 pack, a 12 pack and a 24 pack are each one unit.

At the level of UPC - store - week (how many units are sold in this store this week for each product) there is a good fit for both yogurt and beer:



The number of observations is 112 million for beer and 141 million for yogurt.

Aggregation doesn't always help!

We expected that if we aggregated across products do look at category - store - week (e.g. total units of yogurt, across all products, sold in a store in a week) we would get a similar, maybe even a better fit.

But that turns out not to be the case.  The fit for beer on both dollars and units is poor -- basically except for a first digit of 1 being the most common, the rest of the distribution is flat.

Yogurt is better, but still substantially different from the Benford's Law expectation.




The number of observations is lower, because we've aggregated, but still high: 719 thousand for beer and 754 thousand for yogurt. With these sample sizes, significance tests are beside the point.

As to why Benford's Law fits at the UPC-store-week level but not at the category-store-week level, we haven't figured that out yet.  But maybe that's not really a consistent pattern.  We look at more categories in our next post:  http://www.truncatedthoughts.com/2015/11/benfords-law-in-consumer-packaged-goods.html 

[1] Bronnenberg, B. J., Kruger, M. W., & Mela, C. F. (2008). Database Paper—The IRI Marketing Data Set.Marketing Science, 27(4), 745–748. http://doi.org/10.1287/mksc.1080.0450

Saturday, November 21, 2015

Benford's Law and Package Sizes

I'm putting this up quickly because Andrew Gelman has a nice blog post about Benford's Law.

My intent has been to write this up for formally, but that's been my intention for a while. I generated this data in 2008.  So it's obviously not tops on my bucket list.

The question here is whether the distribution of package sizes (for packages you'd find in a grocery store) follow Benford's Law.

What is Benford's Law?



Benford's law, also called the First-Digit Law, is a phenomenological law about the frequency distribution of leading digits in many (but not all) real-life sets of numerical data. That law states that in many naturally occurring collections of numbers the small digits occur disproportionately often as leading significant digits.[1] For example, in sets which obey the law the number 1 would appear as the most significant digit about 30% of the time, while larger digits would occur in that position less frequently: 9 would appear less than 5% of the time. If all digits were distributed uniformly, they would each occur about 11.1% of the time.[2] Benford's law also concerns the expected distribution for digits beyond the first, which approach a uniform distribution.
It has been shown that this result applies to a wide variety of data sets, including electricity bills, street addresses, stock prices, population numbers, death rates, lengths of rivers, physical and mathematical constants,
and a nice graph of the expected distribution:

Does this fit products you'd find in a grocery store?

Products come in different sizes, and often product sizes are standardized for either historical or logistical reasons.  For example, you'd typically find bottles of beer in a 6 pack, 12 pack, or 24 pack. No 7 packs!

This makes it unlikely that individual categories follow Benford's Law, and in fact the individual categories do not show much of a fit. (the Benford's Law expectation is the thick blue line).

But when we combine the results across categories, we do get a pretty good fit. The Unweighted Average counts each product category equally (so the fact that there are a lot more beers than razors doesn't affect the results). The Grand Total just looks across products, so beer counts a lot more than razors. The total number products tabulated is 134,484 (387 for razors, 10,417 for beer).


The fit is clearly not perfect: there are two many 5s and too few 2s for example. The 5's are easy to see: where the volume equivalent is pounds, an 8 ounce or 9 ounce package will have a first digit of 5. A 1, 10, or 11 ounce package will have a  first digit of 6.

How this was done:


To look at this issue, we used the product data from the IRI Marketing Data Set [1]. This contains data from 31 large consumer product goods categories. IRI keeps standardized size data, called a volume equivalent for the category. This might be 1 pound, 288 ounces, or some other unit appropriate to the category.  For example, the volume equivalent for beer is 288 ounces, so a 6 pack of 12 ounce bottles (72 ounces) would have a volume equivalent of .25, and a first digit of 2.

This may be different from the various measurements that might be found on the package, which might be 18 ounces, 1 pound 2 ounces, 4 packages, 8 servings, 510.3 grams, or all of the above.

We excluded deodorant and toothbrushes because the volume equivalent is 1 package, so 100% show up as 1. We excluded cigarettes for similar reasons (the volume equivalent is 1 carton, so 1 pack is .1 of a carton; 93% of the items are either cartons or packs.

We are not weighting by sales volume, so unusual sizes that may have been sold only briefly in a few stores are weighted just as heavily as the standard items in the category.





[1] Bronnenberg, B. J., Kruger, M. W., & Mela, C. F. (2008). Database Paper—The IRI Marketing Data Set. Marketing Science, 27(4), 745–748. http://doi.org/10.1287/mksc.1080.0450

Tuesday, July 14, 2009

IRI Marketing Data Set: one year anniversary.

A year ago, Information Resources, Inc. released a large set of data on consumer packaged goods in the United States for academic research use. This is described in an earlier post:

http://mikekr.blogspot.com/search/label/IRI%20Academic%20Data%20Set

More information about ordering this data set is here:
http://us.infores.com/academic 
UPDATE FEB 2013: NEW LINK IS NOW http://www.symphonyiri.com/Insights/Academics/tabid/178/Default.aspx
The best description of the data set is in the Marketing Science paper (July-Aug 2009) available on that site by Bronnenberg, Kruger and Mela.

One year report:

1. We've shipped 89 data sets to approximately 160 individual researchers. This has included many universities outside the U.S.

2. There are at least two publications in press which use this data set. There were at least two presentations at the Marketing Science conference that used the data set. It's good to see it getting used.

3. We've released a 6th year of data, extending the set.

I admit that at times coordinating this has been a real pain, although it has also provided amusement. And one grateful graduate student sent me a silk tie from Thailand!

Thursday, August 28, 2008

The IRI Marketing Data Set

For obvious reasons, I don't talk about work on this blog. This is an exception.

IRI has just released an extensive set of data for academic use. This is 5 years of store scanner data and panel data for 30 large categories, and some TNS advertising data on two categories.

This is such a large data set (over 50 gigabytes) that we are delivering it on a USB drive.

More information about this data set can found at the IRI web site.
UPDATE: Link is now http://www.symphonyiri.com/Insights/Academics/tabid/178/Default.aspx

This site contains a high level description of the data set (Bronnenberg, Kruger and Mela, 2008, published in the July-August issue of Marketing Science), and a document containing terms of use for the dataset.

We've set up a Google Groups site to support the data set. This group is available to those who've signed the terms of use and received the data set.

This is the first database submission that Marketing Science has accepted. Eric Bradlow has an editorial about this in the same issue.