You are on page 1of 8

Comparison of Coffee pH in a 2 x 3 Factorial Design

Motivation and Background


Coffee is a naturally acidic beverage that usually has a pH level close to 5. However, the
pH level of a single cup can vary greatly based on factors like the coffee's country of origin or
how dark the bean is roasted. Acidity is responsible for the fruity, floral, tangy, and tart flavors
in a cup of coffee; while acidity is generally a good thing, too much can result in a sour or
astringent taste.
As of 2015, the value of the U.S coffee market is estimated to be $48 billion. Over half
of this market is made up of "specialty coffees" which are harvested, roasted, and brewed with
a higher level of care to enhance the overall flavor of the cup; this greater care also comes with
a mark up in price. Many Americans find specialty coffee shop prices too exorbitant and opt to
brew coffee at home. However, a lack of understanding in the coffee being brewed or the most
appropriate brewing method often leads to inconsistent cups of coffee that are either too
heavy and bitter or are watery and flavorless. When charging high prices for coffee in a shop or
trying to brew an equally delicious cup at home, it's crucial to understand how acidic your final
product is.
Additionally, many people report that coffee gives them acid reflux or upsets their
stomach. The former can be attributed directly to coffee's natural acidity, which can irritate the
esophagus or weaken the esophageal sphincter in people who are already prone to acid reflux.
The latter concern is more complex but can be attributed to the presence of Chlorogenic Acids
(CGAs) in lighter roasted coffees. CGAs trigger a digestive response when they come in contact
with the stomach lining; this, in turn, triggers the body to release stomach acid. Without real
food to digest, this response can cause the stomach to cramp or burn. For people who suffer
from these afflictions when drinking coffee, it would be beneficial to seek out the least acidic
cup possible.
The primary purpose of this experiment is to determine if water temperature and
brewing method have any significant impact on a cup of coffee's pH level. Understanding how
these factors affect acidity will be beneficial both in brewing a consistently flavorful cup and in
being able to brew a cup that does not cause gastrointestinal discomfort.

Aims
1. Investigate whether water temperature affects coffee's pH level by collecting data
across three temperature levels (175° F, 190° F, and 200° F)
2. Investigate whether the brew method affects coffee's pH level by collecting data across
two different brewing methods (AeroPress and French press)
3. Determine if any significant interaction is present between water temperature and brew
method which would impact coffee's final pH level.
Data
Data was collected by brewing and measuring the pH of eighteen individual cups of
coffee. The coffee used was Publix Greenwise breakfast blend whole bean coffee, which was
ground freshly before brewing each cup. This coffee was selected because it is a fairly middle of
the road bean in terms of price and quality, used to represent a "standard" coffee that an
average American would brew in their home. Each cup of coffee was brewed using either an
AeroPress with a standard paper filter or a Bodum glass French press. The water was heated to
the appropriate temperature using a Cuisinart Cpk-17 kettle, reported by the manufacturer to
be accurate within one-degree Fahrenheit. Each cup was brewed with a standard 16:1 ratio of
water to coffee. Each cup was brewed using exactly sixteen grams of ground coffee and two-
hundred fifty-six milliliters of water. These measurements were verified using an AMW-SC-2KG
scale, reported by the manufacturer to be accurate within 0.1 grams. After brewing, the pH of
the coffee was measured using a Vantakool ATC pH meter, calibrated to be accurate within .01
pH.
It's impossible for me to know if the bag of coffee I used was homogenous, or if the
coffee was combined from two different harvests, roastings, or shipments. Since the time and
location of the harvest and the roast parameters could greatly affect the pH level, the
treatments were randomly assigned to control for these factors. First, the coffee was weighed
into sixteen-gram doses and placed into separate bags labeled from one to eighteen. R code
was used to determine a random permutation of these bags.
> set.seed(4211)
> list <- 1:18
> sample(list)
[1] 3 11 5 17 12 1 8 10 14 13 2 9 16 7 18 15 4 6

The first three bags were assigned to treatment one, the next three to treatment two,
and so on until all the doses of coffee were assigned to a treatment.
After each cup of coffee was brewed, the pH level was measured then the brewing
device, the mug being used, and the pH meter were all washed with distilled water and dried
before the next cup of coffee was prepared
Data was recorded on the following variables:

• pH The measured acidity of the final cup


• temp The temperature at which the coffee was brewed
• Method Whether the cup was brewed using an AeroPress or a French press

Analysis
The analysis will be carried out using a standard two-way ANOVA approach. Boxplots
and an interaction plot will be used to visualize the data as a preliminary investigation into
differences in the factor level means and possible interaction. The ANOVA will be carried out to
determine if there are any significant differences within the factors and to determine if any
present interaction is significant. Finally, visual plots will be used to diagnose the satisfaction of
the assumptions for this analysis. Appropriate pairwise comparisons will be made if the results
of the F-tests are significant.
First, the data was read into R; temperature and method were designated as factors.
> coffee <- read.table("coffeedata.txt", header = TRUE)

> coffee$Temp <- factor(coffee$Temp, levels = c(175, 190, 200), labels = c("1
75 deg. F", "190 deg. F", "200 deg. F"))

> coffee$Method <- factor(coffee$Method, levels = c("AP", "FP"), labels = c("


AeroPress", "French Press"))

> coffee
Temp Method pH
1 175 deg. F AeroPress 4.99
2 175 deg. F AeroPress 4.97
3 175 deg. F AeroPress 4.98
4 175 deg. F French Press 5.01
5 175 deg. F French Press 5.00
6 175 deg. F French Press 5.02
7 190 deg. F AeroPress 4.96
8 190 deg. F AeroPress 4.98
9 190 deg. F AeroPress 4.98
10 190 deg. F French Press 5.02
11 190 deg. F French Press 5.01
12 190 deg. F French Press 5.02
13 200 deg. F AeroPress 5.00
14 200 deg. F AeroPress 5.01
15 200 deg. F AeroPress 5.02
16 200 deg. F French Press 5.05
17 200 deg. F French Press 5.03
18 200 deg. F French Press 5.02

Boxplots were created separately for each factor to help visualize the data and to make an
initial assessment on the difference in the factor level means.
> plot(coffee$pH ~ coffee$Method*coffee$Temp, data=coffee)
Initially, the boxplots for the method factor suggest that there is a difference in factor
level means between AeroPress and French Press. The boxplots for the temperature factor
indicate that there is no difference at all in the factor level means for coffee brewed at 175
degrees versus coffee brewed at 190 degrees, however, it does appear that the means for both
the 175 degree level and the 190 degree level differ from the factor level mean for 200 degrees.
These boxplots do raise concerns that the assumption of constant variance or the assumption
of normality could be violated, but that will be examined more in depth later in the analysis.
An interaction plot was formed to do an initial investigation into possible interaction
and to determine if an additive model is appropriate.
> interaction.plot(coffee$Method, coffee$Temp, response=coffee$pH)

This interaction plot poses some clear issues. The lines for 190 degrees and 175 degrees
intersect, and the line for 190 degrees does not appear to be parallel to the line for 200
degrees. The plot indicates that an interaction term must be included in the model. Using the
ANOVA results, we can then decide if it's appropriate to compare factor level means based on
the significance of the interaction term.
> mod <- aov(coffee$pH ~ coffee$Method*coffee$Temp, data=coffee)

> anova(mod)
Analysis of Variance Table
Response: coffee$pH
Df Sum Sq Mean Sq F value Pr(>F)
coffee$Method 1 0.0046722 0.0046722 40.0476 3.784e-05 ***
coffee$Temp 2 0.0028444 0.0014222 12.1905 0.001288 **
coffee$Method:coffee$Temp 2 0.0003111 0.0001556 1.3333 0.299985
Residuals 12 0.0014000 0.0001167
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

The ANOVA results appear promising. Both factors have p-values much smaller than a
standard alpha level of .05, indicating a significant difference between at least two of the factor
level means. Additionally, the p-value of the interaction term is very large, almost .3, so we can
safely ignore interaction. Because the interaction between the factors is non-significant,
pairwise comparisons can be made between the factor level means. However, before pairwise
comparisons are made, we must assess whether or not the assumptions of this model are met
using a residual vs. fit plot and a normal Q-Q plot.
> plot(mod, 1)
> plot(mod, 2)

These two plots raise no immediate concerns about non-constant variance or non-
normality. The residuals do seem to grow slightly as the pH level increases, but it's not enough
to invalidate the analysis. The right tail of the normal Q-Q plot does seem to deviate from the
optimal line slightly, however, again, most of the data falls in a straight line, and the deviation is
not enough to give major concern to the analysis. With the initial analysis shown to be valid,
the pairwise comparisons can be made. Because the ANOVA found significant differences in
both factors of the experiment, all possible pairwise comparisons will be made. Tukey's
method will be used to adjust for the family-wise confidence level.

> TukeyHSD(mod, which = "coffee$Temp")


Tukey multiple comparisons of means
95% family-wise confidence level

Fit: aov(formula = coffee$pH ~ coffee$Method * coffee$Temp, data = coffee)

$`coffee$Temp`
diff lwr upr p adj
190 deg. F-175 deg. F -8.881784e-16 -0.01663705 0.01663705 1.0000000
200 deg. F-175 deg. F 2.666667e-02 0.01002961 0.04330372 0.0028553
200 deg. F-190 deg. F 2.666667e-02 0.01002961 0.04330372 0.0028553

> TukeyHSD(mod, which = "coffee$Method")


Tukey multiple comparisons of means
95% family-wise confidence level

Fit: aov(formula = coffee$pH ~ coffee$Method * coffee$Temp, data = coffee)

$`coffee$Method`
diff lwr upr p adj
French Press-AeroPress 0.03222222 0.02112825 0.04331619 3.78e-05

As expected from the box-plots, the pH level is significantly different between coffee
brewed at 175 and 200 degrees and between coffee brewed at 190 degrees and 200 degrees;
however, no significant difference was found between coffee brewed at 175 degrees and 190
degrees. It is also apparent that the pH level is significantly different for coffee brewed with an
AeroPress and a French press.
Conclusions
The pH level of coffee can vary significantly based on the temperature of the water used
and the method used to brew it. Coffee brewed at 200 degrees is, on average, between .01 and
.04 pH more acidic than coffee brewed at either 175 or 190 degrees. Coffee Brewed with a
French press is, on average, between .02 and .04 pH more acidic than coffee brewed with an
AeroPress. Additionally, these factors do not interact in any significant way.
These results make sense from a chemical point of view. As for the method, the
AeroPress uses a small paper filter to separate the grounds and the finished beverage, while the
French press uses a much coarser metal filter. Paper filters are known to collect the volatile oils
that result from brewing coffee. Tannic, Formic, and Acetic acid make up a large portion of
these volatile oils, so it makes sense that coffee brewed with a paper filter would be less acidic.
As for the temperature, almost all acids, but especially oxalic, malonic, malic, and citric acid,
increase in solubility as water temperature rises. If you're brewing at a higher temperature,
regardless of brewing method, more acidic compounds will be dissolved into your cup.
Naturally, when assessing differences as small as .01 pH, the question of practical
significance arises. However, despite the seemingly small differences in pH, the differences are
noticeable. For people suffering from chronic heartburn, research has shown that a decrease in
acidity as small as .015 pH can dramatically reduce symptoms.
References

“Coffee Chemistry and Acidity.” Coffee Beans, www.coffeeresearch.org/science/sourmain.htm.

Preedy, Victor R. Coffee in Health and Disease Prevention. Academic Press Is an Imprint of
Elsevier, 2015.

Specialty Coffee Association of America, www.scaa.org/?page=resources&d=facts-and-figures.

You might also like