## 2 Methodology
### Identification of Consumption Patterns  
The methodology continues with analyzing consumption patterns for each type of end-use. In this case, it is based on statistical data reported in the article [43], where the average consumption profiles of Spanish households were analyzed. The study introduces a stochastic simulation model that utilizes the Survey of Time Use data from the National Statistics Institute of Spain (INE) [44]. This model allows for estimating the average profile of household electricity consumption based on the number of family members and the day of the week. Determining consumption profiles is a complex challenge due to the variability in household sizes, home occupancy, and the types of appliances used. The study employs 'bottom-up' models where specific data on individual households and their consumption are collected, and then this information is aggregated to provide a broader picture. Based on data from the SET survey, which provides information on the occupational behavior of households, the activity performed by each family member every ten minutes is correlated with energy consumption, assessing which appliances are used. In conclusion, the average consumption profiles for different time slots are presented. This data provides a solid basis for estimating the usage probabilities for each end-use, such as cooking, oven, lighting, washing machine, dishwasher, dryer, TV, and others, throughout the day. To estimate the probability of use for each end-use throughout the day, the following steps were followed:  
1. For each graph related to appliance consumption, the maximum power value was identified and assigned a maximum usage relative frequency of 1 (100%). When there is no consumption, the power value is associated with a usage relative frequency of 0 (0%). In this way, a reference scale was created for each graph, which is useful for calculating relative frequencies for each time slot. 2. The day was divided into hourly time slots. For each time slot, the resulting relative frequency range was calculated. 3. The calculated range was taken as a reference to represent the variability in consumption. In fact, to introduce variability between different households, for each hour of the day and for each household, a random relative frequency value was generated within the calculated range. This allowed for the simulation of a more realistic and representative distribution of electricity consumption, reflecting the natural variability of consumer behavior based on home occupancy, the number of people present, and consumption variations related to whether the day is a weekday or holiday. 4. This process was repeated for all end uses mentioned in the article [45]. 5. To obtain the probability of usage for each hour h, the value of the relative frequency \(f_{h}\) for each hour must be divided by the sum of all relative frequencies over the 24 h of the day:\[P_{h}=\frac{f_{h}}{\sum_{h=1}^{24}f_{h}} \tag{8}\]  
This way, the total sum of the normalized probabilities will be 1, transforming the relative frequencies into a proper probability distribution. The relative frequency indicates how often a particular appliance is used each hour compared to daily usage. This metric helps to reflect the variability of consumption behavior across different households or appliances. By normalizing these relative frequencies, probabilities that are easier to compare across different time slots or appliances can be obtained. In the analysis of consumption patterns for the end uses described in the article, several appliances were considered, but estimates for heating, air conditioning, hot water, refrigerators, freezers, and standby were missing. Therefore, a different approach was adopted for these specific uses. To estimate the probability of usage for heating and air conditioning, the following exponential probability function is used:  
\[P=\left(1-\mathrm{e}^{-\alpha\Delta T}\right)\cdot F_{night} \tag{9}\]  
\(F_{night}\) is a factor that reduces the probability during nighttime hours.