# Whole Bean Coffee Degradation Over Time

Whole bean coffee will go stale within 14 days - on average. The graph below shows the quick 1.5 standard deviation drop in quality within the first 14 days (marked in red). _{*See note below for details}

Staling in the context of coffee has a commonly agreed on definition - the loss of volatile aromatic compounds and the oxidation of surface oils on the roasted coffee beans. The loss of aromatics affects the flavor profile because: 1) they are both part of the same degradation process and 2) the majority of what you taste in coffee is flavors from volatile aromatics through retronasal olfactory sensation.

This graph was created using data from Analytical Flavor Systems where we build quality control and flavor profiling tools for craft beverage producers. *Perceived Quality* is a non-hedonic assessment of a product's quality. This time series is taken from a degradation study.

Ground coffee, on the other hand, will stale within minutes. 70 cc of ambient air is enough to render one pound of coffee stale. On average, this process takes seven minutes.

Interestingly, the degradation curve looks about the same!

# Data Analysis Minutia (notes)

This time series model was segmented using daily *Perceived Quality* means from a random selection of 15,000 coffee reviews. All coffees included are whole bean, freshly ground, third wave coffee brewed in a Chemex with a bleached filter.

Certain other brewing methods, particularly methods optimized for older coffee such a Nel, may show a different degradation curve.

The *staling point* was selected by a parametric statistical change point analysis, which searches for shifts in the mean and variance of a time series. This time series was modeled for change point analysis using a Poisson distribution as we're searching for the average number of coffees that go stale within a specific time-point, and the model was set to find *at most one change*.

Does roast duration have any effect on how long it takes for coffee to go stale? Additionally, does this graph start at harvest time, or at roasting time? If the latter, does waiting longer before roasting prolong coffee's longevity? – Nick Udell – 2015-05-13T10:54:14.613

Level of roast (a function of roast duration & temperature) has a minute effect on coffee degradation; If the coffee is over-roasted and surface oils appear, the coffee will go stale faster - alternatively, if the coffee is burnt, it might not truly stale at all (no oils to oxidize). This graph shows degradation post-roast. Coffee can be "aged" or stored 6+ months in proper conditions before roasting with little to no decrease in quality. – JayCo – 2015-05-13T14:32:43.550

@daniel I'm around and happy to answer questions; the graph shows observed

perceived qualitydegradation over time - not intensity or level of flavor. I've defined staling ("going off") as a 1.5 decrease in standard deviation. The artifact around day 50 is a real effect, and not an over-fitting of the model. As the coffee oils oxidize they taste progressively worse, until they too begin loosing the most offensive volatile notes, which leads to an increase in hedonic perception around that time. – JayCo – 2015-08-07T15:19:25.910@daniel furthermore, staling (particularly in the context of coffee) has a commonly agreed on definition - the loss of volatile aromatic compounds and the oxidation of surface oils on the roasted coffee beans. Claiming that a loss of aromatics doesn't effect the flavor is incorrect: 1) they are both part of the same degradation process, and 2) the majority of what you taste in coffee is volatile aromatics through retronasal olfactory sensation. – JayCo – 2015-08-07T15:24:10.910

@daniel and finally; your assumption on our dataset for this answer is incorrect. I'm the lead data-scientist (ML & AI) for a company building quality control and flavor profiling tools for coffee roasters, green sourcers, and baristas.... we have a lot of flavor profile data :) – JayCo – 2015-08-07T15:27:31.153

@fredley I'll change the graph to a open license today - sorry, this fell off my radar until now. – JayCo – 2015-08-07T15:28:35.380

1@JayCo: Thanks for getting back. First, I think much of this belongs in your answer instead of comments. What do you mean by "a 1.5 decrease in standard deviation?" The standard deviation for a data set is fixed. – daniel – 2015-08-07T15:34:11.263

@daniel Ah, I see! The mean of the time series has decreased by 1.5 SD from its peak. That's a good edit. – JayCo – 2015-08-07T17:07:44.667

@JayCo: The mean is also fixed. It is used to calculate the standard deviation. I think it would be helpful if you would explain in simple language how the picture was made (in you answer, not in comments). – daniel – 2015-08-08T05:16:47.543

@daniel The mean and variance can shift over time - (in a time series). Modeling changes in production means and variance is half the field of statistical quality control.... – JayCo – 2015-08-09T16:48:59.063

@fredley The graph has been updated to meet CC3 specifications. Thanks! – JayCo – 2015-08-09T16:49:38.650

Yes, the means/variance change for each sample point if you are taking averages. But for those points the SD dropping just corresponds to a close agreement in quality reviews and a narrowing of the (gray) variance. When you say that most of the drop occurs within 14 days, that makes sense visually. If you say that the drop occurs within 1.5 SD of the origin, fine (I can't judge, it's your data). Then the SD is that of the overall distribution, which is fixed and does not drop. – daniel – 2015-08-10T19:38:51.693

The answer is much improved but there are aspects of it that seem opaque. You got quality ratings at various times (1 to 7). But then below you say you are looking for "the average number of coffees that go stale within a specific time-point." That would surely be a different curve, beginning at 0, rising over 14 days and then tapering off. The curve you show appears to give the average rating for a given time-point. – daniel – 2015-08-10T19:39:22.370

And finally, what is "retronasal olfactory sensation?" Can you put that into English? Same for "hedonic?" These people were tasting coffee and rating it, right? – daniel – 2015-08-11T03:14:56.873

To amplify the point about the Poisson model, the language in your last paragraph seems to go with a curve other than the one you show. A curve showing the number of cups going stale in a time interval would not contain the quality rating. Instead the vertical axis would show the number of cups. – daniel – 2015-08-11T03:20:52.527

Right on most points, but the graph shown is the meaningful one; the results from the parametric statistical change point analysis is simply plotted on a graph of PQ degradation over time. – JayCo – 2015-08-11T15:37:00.030

@JayCo: Then why not edit your post accordingly? Not every reader will look at these details but since you have cast this as a science-based venture it might be good get the details right. – daniel – 2015-08-13T06:12:48.777

Interesting graph. Could you add some pointers to get to know more? – Eric Platon – 2015-02-18T13:56:00.787

How do you mean? About the background data, or about coffee degradation in general? – JayCo – 2015-02-18T15:34:39.727

1Both,as available :-) This is also for backing the answer. – Eric Platon – 2015-02-18T16:24:50.750

1Could you make the equation / reference available for this graph? It would be an interesting example in rate equations for undergraduate students that I teach. – drN – 2015-02-19T08:59:15.803

@JayCo The license on this graph is not compatible with the cc by-sa 3.0 license used by Stack Exchange. Could you make a version that is available under a compatible license? If not, I will have to remove it from the post.

– fredley – 2015-02-20T16:51:14.947@fredley, yes, give me a few hours? – JayCo – 2015-02-20T23:23:12.600