*3.2. Study Design*

To achieve the research objective and carry out the tasks presented in this article, the researcher had to apply a number of statistical measures and methods. Subsequent research tasks were subordinated to research questions.

Step 1. Monitoring the evolution of RES consumption in European households required:


Step 2. Identification of European household types in terms of RES consumption. This task required:


The use of Ward's method cluster analysis provided an answer to the question about the optimal number of country (state)groups [71,72]. A plot of clustering distances by clustering step indicated that the first clear spike was at the level 23.45. The dendrogram was cut at this level, yielding six clusters of households (Figures 1 and 2). Ward's method for determining the optimal number of clusters is also used by other researchers [73].

**Figure 1.** Results binding distance according to binding steps. Source: own elaboration based on data from [7].

**Figure 2.** Results of the hierarchical grouping of similarities between the EU countries in final energy consumption from renewable energy sources in households' sector in 2019 using the Ward's method.Source: own elaboration based on data from [7].

Then, the k-means method was used to group countries. K-means cluster is widely described in the literature on the subject [74–77]. The algorithm for the k-means method is presented in Theorem 1.

**Theorem 1.** *The algorithm for the k-means method*

$$J = \sum\_{i=1}^{k} \sum\_{dtcDi}^{k} \text{sim}(c\_id\_t) \tag{1}$$

The research algorithm of the *k*-means method consists of several stages, presented in the publication [78]. More about the *k*-means algorithm on the example of country grouping in the article [78,79].

Step 3. Examining trends of changes in RES use among households in Poland and neighboring countries. This task required the use of a directional trend indicator. A linear trend is a special case of linear regression, where the explanatory variable X is the time variable t [80]. A trend model belongs to a special class of econometric models in which the variability of the explained variable is described by a specific explanatory variable, namely time. In general, these models do not explain the mechanism of development of the considered explanatory variable but illustrate the development of this variable over time. In this case, therefore, a time series is considered, that is, data that are time-stratified.

**Theorem 2.** *A formula of linear trend function.*

$$Y = a \cdot t + b \tag{2}$$

*where: a—trend slope:*

$$a = \frac{\sum (t\_i - \overline{X}) \* \left(\mathbf{Y}\_i - \overline{Y}\right)}{\sum \left(t\_i - \overline{t}\right)^2}$$

*b—trend intercept:*

$$b = \overline{Y} - a \ast \overline{t}$$

*ti,Yivaluesof thevariablestand*

  *t*,*Y—meansof variablestandY.*

*When a > 0 we are dealing with a growing trend. The greater the a, the faster the value of Y increases over time.*

*When a < 0, there is a downward trend. The smaller the a, the faster the Y value decreases over time.*
