**2. Modeling maximum sensory scores and numerical procedure**

In accordance with the opinion of the Ethics and Research Council, registered with the CAAE: 14959413.1.0000.5148, the preparation of the Samples of 100% Arabica coffee was done by removing all defective beans and toast, respecting the maximum period of 24 hours for tasting.

The roasting point was determined visually, using the color classification system by means of standardized discs (SCAA/Agtron Roast Color Classification System). Regarding the preparation of the drink, the concentration of 7% w/v was maintained using filtered water ready for consumption, free of any contaminants and without added sugar. With these specifications, four types of specialty coffees, coded in the samples by A, B, C and D given the description in **Table 1**.

For each type of coffee, the following sensory characteristics were assessed in the acceptance test: aroma, body, hardness, and final score, in four sessions, with the participation of a volunteer group of consumers with basic knowledge in regard to sensory analysis of coffees and another group without basic knowledge. **Table 2** provides a list of the tasters, as well as the sensory characteristics assessed by each taster, in which *aij* represents the score given by taster *i* (*i = 1, 2, … , n1, n1 + 1, n1 + 2, … , n2*), such that *n1 + n2 = n*, for the sensory characteristic coffee *j* (*j = 1, 2, … , 16*) combination.

In the test, four different types of coffee were evaluated in terms of their sensory characteristics, flavor, acidity, body and note. In different sessions, voluntary consumers were grouped into two classes: (a) people with the habit of consuming coffee, but who do not have basic knowledge about specialty coffees and (b) people with the habit of consuming coffee and trained with information basic information about specialty coffees.

The fit of the probability distributions was carried out, considering the random variable *X* representing the maximum consumers'sensory scores for the each type of coffee (**Table 1**), totaling in a sample of 696 observations.

Bearing in mind that the highest score provided by a tester will be considered, this being considered as a block, the distribution of the maximums, according to the Fisher-Tippet theorem, is the generalized extreme values distribution (GEV). Its probability density function is defined by:


**Table 1.**

*Description of specialty coffees evaluated in the sensory analysis with untrained consumers.*

Faced with this situation, it becomes plausible to admit that a sensory analysis, applied to a group of trained consumers, being able to discriminate small differences between the samples, the results provided by the evaluations will show little variation [1]. Therefore, a sensory experiment carried out with this group shows a greater agreement with the procedures standardized by [2], since the objective assessments would be more homogeneous for the perception of uniformity, sweet-

In an opposite situation, considering a group of untrained consumers, it is more likely that the evaluations will present heterogeneous results, in such a way that the statistical treatment to be given in the analysis of these results may include the atypical observations, classified as outliers arising from the evaluation. Individual to

It is worth mentioning that the heterogeneity between the observations may be the result of uncontrollable factors, such as, for example, genetics, fatigue, unwillingness to carry out all tests and differences between the abilities of consumers, as well as external causes such as, for example, the geographical origin of a particular product whose qualities or characteristics are due exclusively or essentially to the geographical environment, including natural and chemical factors, which, among others, mention variations in chemical composition due to the genetic variability

Given countless causes that are supposed to be the sources that cause outliers in a sensory analysis and reporting the analysis of the quality of coffees, special coffees can be highlighted. Following the definition given by [2], in summary, a coffee is said to be special, as it presents superior quality to its competitors in relation to its origin, absence of defects, processing and/or sensory expressions such as aroma, flavor.

The results of the sensory evaluation are established on a scale ranging from 0 to 10 in which these values represent the increasing levels of coffee quality. According to the analysis protocol [2] the results of the sensory evaluation vary according to a scale where the grades 6, 7, 8, 9 correspond respectively to: good, very good, excellent and exceptional. When the grades are less than 6, the coffees are declared

Respecting these characteristics, Coffee arabica cultivars are potential coffees worthy of being classified as special [13, 14]. However, studies related to the interference of the environment and geographic origin can influence the quality of the drink. [14], in a study interacting quality with environmental factors, concluded that the coffees with the highest scores in a contest held in the state of Minas Gerais, were produced in colder regions with milder temperatures and annual precipitation index around 1600 mm [15]. In this context, in humid regions it is recommend that processing be performed prioritizing peeled and desmucilated coffees. Thus, the quality of the coffee would be inferred without the interference of defects.

In the case of statistical methodology, it is highlighted that the usual methods of analysis, in general, are sensitive to outlier observations, these being plausible to have arisen in a sensory analysis carried out by untrained consumers [5, 15].

Due to this fact and assuming that the assignment of maximum sensory scores can be understood as random phenomena, in the sense that there are variations in the judgment of different consumers, this work aims to propose the use of some distributions belonging to the generalized extreme value distribution class in sensory analysis. For this purpose, this work analyzes a sensory experiment to evaluate four special coffees produced in the Serra da Mantiqueira Region of Minas Gerais, differentiated in preparation and geographical identification classified by different

Bootstrap, developed by Efron in the 70s, can be used in many situations. It is based on a simple, yet powerful idea that the sample represents the population, so

between cultivars that influence the sensory quality of coffees [7–12].

ness, defects, among others, mentioned by [3, 4].

*Recent Advances in Numerical Simulations*

to be of a quality below the Specialty Grade.

each consumer [5, 6].

altitudes.

**178**


where *F*�<sup>1</sup> *pi*

(*D*) is given by,

presented below.

the vector ^**θ**

**181**

� � is the inverse function of the cumulative distribution function of a

given probability distribution, *pi* are the percentiles and *xi* are the data used to fit

*<sup>D</sup>* <sup>¼</sup> max *<sup>F</sup>*0ð Þ� *xi F x* ^ð Þ*<sup>i</sup>* �

*<sup>Q</sup>* <sup>¼</sup> *n n*ð Þ <sup>þ</sup> <sup>2</sup> <sup>X</sup>*<sup>s</sup>*

*k*¼1

where *n* is the number of observations, *s* is the number of coefficients in testing autocorrelation, *rj* is the autocorrelation coefficient (for the deviation) and *Q* the test statistic. If the sample values of Eq. (7) exceed the critical value of a Chi-Squared distribution with *s* degrees of freedom, then at least one deviation *r* is statistically different from zero at the specified significance level, that is, *H0* is rejected. *H0* is also rejected if *p*-value is lower than the adopted significance level. It should be noted that if *H0* is rejected, it can be said that the data are independent. In

In order to make an inference about the most frequent score among the tasters, it is necessary to know the sample distribution of the quantity in Eq. (4). For that, an alternative would be to use resampling methods, which one of them will be

*P*<sup>∗</sup> ð Þ<sup>1</sup> , *P*<sup>∗</sup> ð Þ<sup>2</sup> , … , *P*<sup>∗</sup> ð Þ *<sup>B</sup>* , with replacement, independent and identically distributed of the *n* highest marks awarded by trained and untrained tasters. Estimates of the

∗

∗ <sup>¼</sup> ^*<sup>θ</sup>* ∗ ð Þ<sup>1</sup> , ^*<sup>θ</sup>* ∗ ð Þ<sup>2</sup> , … , ^*<sup>θ</sup>*

<sup>∗</sup> it is possible to obtain the Bootstrap distribution of the ^*<sup>θ</sup>* estimator.

Once the empirical distribution of the ^*θ* estimator is obtained, confidence intervals for *θ* can be estimated. The Bootstrap confidence interval based on the Bootstrap distribution percentiles of *θ*, described in [16, 26], is known as the *p*-Bootstrap

The Bootstrap resampling process consists of resampling *B* samples

confidence interval. In a more formal way, the confidence interval can be

*r*2 *j*

In the KS test, the hypothesis of interest are given by *H0*: The distribution function from which the sample is derived follows the distribution function that is assumed to be known; that is, *F x*ð Þ¼ *F*0ð Þ *xi* and *H1*: *F x*ð Þ 6¼ *F*0ð Þ *xi* [23]. Then, the value (Eq. (6)) must be compared with the critical value (using tables), for the significance level of the test. According on the result, the null hypothesis is rejected or not. The null hypothesis is also rejected if the *p*-value is lower than the significance level adopted. Regarding the verification of the assumption of independence of the observations, such that is required by the maximum likelihood method for estimating parameters, the Ljung-Box (LB) test was used. According to [24], it is a statistical test used to find out if there are non-zero autocorrelation groups. To do this, it tests total randomness based on the number of deviations. The test hypotheses are *H0*: all autocorrelation coefficients are equal to zero and *H1*: not all autocorrelation coeffi-

� �

� (6)

ð Þ *<sup>n</sup>* � *<sup>j</sup>* , (7)

ð Þ*<sup>i</sup>* , for each sample, which is

∗ ð Þ *B* � � and from

a probability distribution to the original data. It is based on the analysis of the proximity or adjustment between the sample distribution function *F x* ^ð Þ*<sup>i</sup>* and the population distribution function under the null hypothesis,*F*0ð Þ *xi* . The test statistic

*Intensive Computational Method Applied for Assessing Specialty Coffees by Trained…*

According to [22], the Kolmogorov–Smirnov (KS) test is used to assess the fit of

the model, ordered in ascending and *n* the sample size.

*DOI: http://dx.doi.org/10.5772/intechopen.95234*

cients are equal to zero. The test statistic is

both tests, the significance level of 1% was adopted [25].

parameter of interest can be obtained, denoted by ^*θ*

*<sup>θ</sup>* <sup>¼</sup> *Mo X*ð Þ. With that we will obtain the vector ^**<sup>θ</sup>**

constructed by following the following steps:

#### **Table 2.**

*Tabulated representation of the sensory characteristics of the specialty coffees assessed.*

$$f(\mathbf{x}; \boldsymbol{\mu}, \sigma, \xi\_{\ast}) = \frac{1}{\sigma} \left\{ \left[ 1 + \xi \left( \frac{\mathbf{x} - \boldsymbol{\mu}}{\sigma} \right) \right]^{\left( -\frac{1}{\xi} \right) - 1} \exp \left\{ - \left[ 1 + \xi \left( \frac{\mathbf{x} - \boldsymbol{\mu}}{\sigma} \right)^{-\left( \frac{\mathbf{x}}{\xi} \right)} \right] \right\}, \tag{1}$$

where�∞ < *x*< μ � σ*=*ξ when ξ < 0 resulting in the Weibull (μ, σ,ξ). When μ � <sup>σ</sup>*=*ξ<sup>&</sup>lt; *<sup>x</sup>*<sup>&</sup>lt; <sup>∞</sup> for <sup>ξ</sup>>0 results in Fréchet (μ, <sup>σ</sup>,ξ). When lim*<sup>ξ</sup>*!<sup>0</sup> *f x*ð Þ ; μ, σ, *ξ* leads to the Gumbel distribution. The parameters μ, σ and ξ are the location, scale and shape

parameters. The probability that a maximum score will be greater than realization of a score, represented by *x* is defined as

$$P[X > \mathfrak{x}] = \mathfrak{1} - P[X \le \mathfrak{x}] = \mathfrak{1} - F(\mathfrak{x}; \hat{\theta}),\tag{2}$$

where ^*θ* corresponds to the vector of maximum likelihood estimates [17, 18]. This method requires that the maximum scores are independent and identically distributed [19], which was assessed by the Ljung Box test, explained follow. *F x*; ^*θ* � � is the cumulative distribution function (cdf) of GEV probability density function. Its cdf is given by

$$F(\mathbf{x}; \mu, \sigma, \xi) = \exp\left[ - \left( \mathbf{1} + \xi \left( \frac{\mathbf{x} - \mu}{\sigma} \right) \right)^{\frac{-1}{\xi}} \right]. \tag{3}$$

The mode (*Mo*) of the pdf in Eq. (1) is given by

$$\text{Mo}(\mathbf{X}) = \mu + \sigma \frac{(\mathbf{1} + \xi)^{-\xi} - \mathbf{1}}{\xi},\tag{4}$$

and in the lim *ξ*!0 *f x*ð Þ ; μ, σ, *ξ* case, the mode is simplified to *Mo X*ð Þ¼ *μ*.

The goodness of fit for each distribution was validated using the Kolmogorov Smirnov (KS) adherence test in conjunction with the Q-Q plots [20, 21]. The Q-Q plot consists of the points

$$\{ (F^{-1}(p\_i), \varkappa\_i), i = 1, \dots, n \},\tag{5}$$

*Intensive Computational Method Applied for Assessing Specialty Coffees by Trained… DOI: http://dx.doi.org/10.5772/intechopen.95234*

where *F*�<sup>1</sup> *pi* � � is the inverse function of the cumulative distribution function of a given probability distribution, *pi* are the percentiles and *xi* are the data used to fit the model, ordered in ascending and *n* the sample size.

According to [22], the Kolmogorov–Smirnov (KS) test is used to assess the fit of a probability distribution to the original data. It is based on the analysis of the proximity or adjustment between the sample distribution function *F x* ^ð Þ*<sup>i</sup>* and the population distribution function under the null hypothesis,*F*0ð Þ *xi* . The test statistic (*D*) is given by,

$$D = \max \left| F\_0(\mathbf{x}\_i) - \hat{F}(\mathbf{x}\_i) \right| \tag{6}$$

In the KS test, the hypothesis of interest are given by *H0*: The distribution function from which the sample is derived follows the distribution function that is assumed to be known; that is, *F x*ð Þ¼ *F*0ð Þ *xi* and *H1*: *F x*ð Þ 6¼ *F*0ð Þ *xi* [23]. Then, the value (Eq. (6)) must be compared with the critical value (using tables), for the significance level of the test. According on the result, the null hypothesis is rejected or not. The null hypothesis is also rejected if the *p*-value is lower than the significance level adopted.

Regarding the verification of the assumption of independence of the observations, such that is required by the maximum likelihood method for estimating parameters, the Ljung-Box (LB) test was used. According to [24], it is a statistical test used to find out if there are non-zero autocorrelation groups. To do this, it tests total randomness based on the number of deviations. The test hypotheses are *H0*: all autocorrelation coefficients are equal to zero and *H1*: not all autocorrelation coefficients are equal to zero. The test statistic is

$$Q = n(n+2) \sum\_{k=1}^{s} \frac{r\_j^2}{(n-j)},\tag{7}$$

where *n* is the number of observations, *s* is the number of coefficients in testing autocorrelation, *rj* is the autocorrelation coefficient (for the deviation) and *Q* the test statistic. If the sample values of Eq. (7) exceed the critical value of a Chi-Squared distribution with *s* degrees of freedom, then at least one deviation *r* is statistically different from zero at the specified significance level, that is, *H0* is rejected. *H0* is also rejected if *p*-value is lower than the adopted significance level. It should be noted that if *H0* is rejected, it can be said that the data are independent. In both tests, the significance level of 1% was adopted [25].

In order to make an inference about the most frequent score among the tasters, it is necessary to know the sample distribution of the quantity in Eq. (4). For that, an alternative would be to use resampling methods, which one of them will be presented below.

The Bootstrap resampling process consists of resampling *B* samples *P*<sup>∗</sup> ð Þ<sup>1</sup> , *P*<sup>∗</sup> ð Þ<sup>2</sup> , … , *P*<sup>∗</sup> ð Þ *<sup>B</sup>* , with replacement, independent and identically distributed of the *n* highest marks awarded by trained and untrained tasters. Estimates of the parameter of interest can be obtained, denoted by ^*θ* ∗ ð Þ*<sup>i</sup>* , for each sample, which is *<sup>θ</sup>* <sup>¼</sup> *Mo X*ð Þ. With that we will obtain the vector ^**<sup>θ</sup>** ∗ <sup>¼</sup> ^*<sup>θ</sup>* ∗ ð Þ<sup>1</sup> , ^*<sup>θ</sup>* ∗ ð Þ<sup>2</sup> , … , ^*<sup>θ</sup>* ∗ ð Þ *B* � � and from the vector ^**θ** <sup>∗</sup> it is possible to obtain the Bootstrap distribution of the ^*<sup>θ</sup>* estimator.

Once the empirical distribution of the ^*θ* estimator is obtained, confidence intervals for *θ* can be estimated. The Bootstrap confidence interval based on the Bootstrap distribution percentiles of *θ*, described in [16, 26], is known as the *p*-Bootstrap confidence interval. In a more formal way, the confidence interval can be constructed by following the following steps:

*f x*ð Þ¼ ; <sup>μ</sup>, <sup>σ</sup>, <sup>ξ</sup>, <sup>1</sup>

. . .

. . . . . .

*Recent Advances in Numerical Simulations*

. . . . . .

. . .

represented by *x* is defined as

parameters.

**Table 2.**

Its cdf is given by

and in the lim

**180**

plot consists of the points

*ξ*!0

σ

<sup>1</sup> <sup>þ</sup> <sup>ξ</sup> *<sup>x</sup>* � <sup>μ</sup> σ h i � � �<sup>1</sup> ð Þ<sup>ξ</sup> �<sup>1</sup>

<sup>σ</sup>*=*ξ<sup>&</sup>lt; *<sup>x</sup>*<sup>&</sup>lt; <sup>∞</sup> for <sup>ξ</sup>>0 results in Fréchet (μ, <sup>σ</sup>,ξ). When lim*<sup>ξ</sup>*!<sup>0</sup>

The mode (*Mo*) of the pdf in Eq. (1) is given by

exp � <sup>1</sup> <sup>þ</sup> <sup>ξ</sup> *<sup>x</sup>* � <sup>μ</sup>

*P X*½ �¼ <sup>&</sup>gt;*<sup>x</sup>* <sup>1</sup> � *P X*½ �¼ <sup>≤</sup>*<sup>x</sup>* <sup>1</sup> � *F x*; ^*<sup>θ</sup>* � �, (2)

*σ* � � � � �<sup>1</sup>

� �, *<sup>i</sup>* <sup>¼</sup> 1, … , *<sup>n</sup>* � �, (5)

� �

*ξ*

*<sup>ξ</sup>* , (4)

� � � � � �

**A BCD … ABCD**

… . . .

… . . .

2 *a21 a22 a23 a24 … a213 a214 a215 a216*

*n1 an11 an12 an13 an14 … an113 an114 an115 an116*

*n2 an21 an22 an23 an24 … an213 an214 an215 an216*

where�∞ < *x*< μ � σ*=*ξ when ξ < 0 resulting in the Weibull (μ, σ,ξ). When μ �

The probability that a maximum score will be greater than realization of a score,

where ^*θ* corresponds to the vector of maximum likelihood estimates [17, 18]. This method requires that the maximum scores are independent and identically distributed [19], which was assessed by the Ljung Box test, explained follow. *F x*; ^*θ* � � is the cumulative distribution function (cdf) of GEV probability density function.

*F x*ð Þ¼ ; *<sup>μ</sup>*, *<sup>σ</sup>*, *<sup>ξ</sup>* exp � <sup>1</sup> <sup>þ</sup> *<sup>ξ</sup> <sup>x</sup>* � *<sup>μ</sup>*

*Mo X*ð Þ¼ *<sup>μ</sup>* <sup>þ</sup> *<sup>σ</sup>* ð Þ <sup>1</sup> <sup>þ</sup> *<sup>ξ</sup>* �*<sup>ξ</sup>* � <sup>1</sup>

The goodness of fit for each distribution was validated using the Kolmogorov Smirnov (KS) adherence test in conjunction with the Q-Q plots [20, 21]. The Q-Q

> *F*�<sup>1</sup> *pi* � �, *xi*

*f x*ð Þ ; μ, σ, *ξ* case, the mode is simplified to *Mo X*ð Þ¼ *μ*.

Gumbel distribution. The parameters μ, σ and ξ are the location, scale and shape

**Condition Taster Sensory characteristic 1** *…* **Sensory characteristic 4**

. . .

. . .

*Tabulated representation of the sensory characteristics of the specialty coffees assessed.*

Trained 1 *a11 a12 a13 a14 … a113 a114 a115 a116*

. . .

Untrained 1 *a(n1 + 1)1 a(n1 + 1)2 a(n1 + 1)3 a(n1 + 1)4 … a(n1 + 1)13 a(n1 + 1)14 a(n1 + 1)15 a(n1 + 1)16*

. . .

> σ � �� <sup>1</sup> ð Þ<sup>ξ</sup>

. . .

. . . . . .

. . .

, (1)

. . .

. . .

*f x*ð Þ ; μ, σ, *ξ* leads to the

*:* (3)

(**Step 1)** Draw, with replacement, of *P*, one Bootstrap sample *P*<sup>∗</sup> ;


(**Step 4)** From the vector ^**θ** ∗ <sup>¼</sup> ^*<sup>θ</sup>* ∗ ð Þ<sup>1</sup> <sup>≤</sup> ^*<sup>θ</sup>* ∗ ð Þ<sup>2</sup> <sup>≤</sup> … <sup>≤</sup>^*<sup>θ</sup>* ∗ ð Þ *B* � �, for *<sup>α</sup>* significance level (0 <*α*< 1), the *p*-Bootstrap confidence interval with 100 � ð Þ 1 � *α* % level of confidence is given by *IC*ð Þ <sup>1</sup>�*<sup>α</sup>* ð Þ*<sup>θ</sup>* : ^*<sup>θ</sup>* ∗ ð Þ *<sup>k</sup>*<sup>1</sup> ; ^*<sup>θ</sup>* ∗ ð Þ *k*<sup>2</sup> h i, where *<sup>k</sup>*<sup>1</sup> <sup>¼</sup> ð Þ *<sup>B</sup>* <sup>þ</sup> <sup>1</sup> ð Þ *<sup>α</sup>=*<sup>2</sup> and *<sup>k</sup>*<sup>2</sup> <sup>¼</sup> ð Þ *B* þ 1 ð Þ 1 � *α=*2 are the highest integers that are not greater thanð Þ *B* þ 1 ð Þ *α=*2 and ð Þ *<sup>B</sup>* <sup>þ</sup> <sup>1</sup> ð Þ <sup>1</sup> � *<sup>α</sup>=*<sup>2</sup> , respectively; and ^*<sup>θ</sup>* ∗ ð Þ *<sup>k</sup>*<sup>1</sup> is the 100ð Þ *<sup>α</sup>=*<sup>2</sup> %-percentile of the Bootstrap empirical distribution; and ^*θ* ∗ ð Þ *<sup>k</sup>*<sup>2</sup> is the 100 1ð Þ � *<sup>α</sup>=*<sup>2</sup> %-percentile of the Bootstrap empirical distribution [16, 26].

Finishing the proposed methodology, the computational resources available in the R software [27, 28] were used through the *boot* and *evd* [29] packages to fitting the probability distributions for sensory scores, hypothesis tests and construction of Bootstrap confidence intervals.
