# Influence of Particulate Matter and Carbon Dioxide on Students' Emotions in a Smart Classroom
## 2 Materials and Methods
### Data Analysis  
This study was conducted in a natural classroom setting where environmental changes occurred naturally without experimental manipulation, capturing real classroom conditions. After excluding missing data, 29,137 valid records were obtained for every type of PM and 24,732 for CO\({}_{2}\), ensuring data quality and consistency in the analysis.  
The choice of a 10 min interval for measuring indoor parameters aligns with prior research in similar contexts. Studies such as [36] highlighted that a 10 min interval is optimal for capturing periodic variations in indoor temperature while avoiding an excess of data that could complicate analysis without adding significant value. Similarly, [37] used a 10 min interval to analyze thermal comfort and indoor air quality in an educational center, and [38] employed 15 min intervals to monitor environmental parameters in residential buildings, ensuring frequent updates. These methodological decisions demonstrate that  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Sensor** & **Manufacturer** & **Variable** & **Unit** & **Accuracy** \\ \hline SCD30 & \begin{tabular}{c} \begin{tabular}{c} Sensirion \\ (Stafa, Switzerland) \\ \end{tabular} \\ \end{tabular} & Temperature & \({}^{\circ}\)C & \(\pm\)(0.4 \({}^{\circ}\)C + 0.023 \(\times\) (T [\({}^{\circ}\)C]—25\({}^{\circ}\)C)) \\ \hline SCD30 & \begin{tabular}{c} Sensirion \\ \end{tabular} & \begin{tabular}{c} Concentration of \\ carbon dioxide \\ \end{tabular} & ppm & \(\pm\)(30 ppm + 3\% MV) \({}^{\text{b}}\) \\ \hline PMS5003 & \
\begin{tabular}{c} Plantower (Shenzhen, China) \\ \end{tabular} &
\begin{tabular}{c} Concentration of PM \\ (PM\({}_{1}\), PM\({}_{2.5}\), PM\({}_{10}\)) \\ \end{tabular} & \(\upmu\)g/m\({}^{3}\) & \(\pm\)10\% between 100–500 \(\upmu\)g/m\({}^{3}\) \\ \hline \hline \end{tabular}
\end{table}
Table 2: Technical specifications of environmental sensors \({}^{\text{a}}\).  
Figure 1: ACTUA Kit device for environmental factors monitoring.  
a 10 min interval is sufficient to capture significant changes in parameters of interest, especially in a controlled environment like a classroom.  
In contrast, emotion recognition requires a more detailed temporal approach due to the dynamic and rapidly changing nature of emotions. Emotional data were recorded every 10 s, an interval that captured quick and subtle changes in emotional expressions, providing high temporal resolution suitable for analyzing the relationship between emotions and environmental factors. While studies such as [39] used one-minute intervals, the choice of a 10 s interval reflects the need to more accurately capture emotional fluctuations.  
To address the asynchrony between environmental and emotional data, the forward fill technique was adopted. This choice is grounded in the need to seamlessly fill temporal gaps in environmental data by leveraging the most recent available information. Employing this technique allows for maintaining a continuous and uniform temporal sequence, thereby facilitating the joint analysis of environmental and emotional data without compromising temporal coherence. Furthermore, aligning the data in this manner provides a solid foundation for investigating potential relationships between environmental factors and recorded emotions.  
In addition, correlation and regression analyses were conducted to explore the relationships between environmental factors and emotional responses. To capture potential nonlinear associations, it was necessary to transform the variables into quadratic terms. This decision was motivated by the recognition that linear relationships may not fully capture the complexity of interactions between environmental variables and emotional states. By including quadratic terms, we aimed to account for potential curvature in the relationships, allowing for a more comprehensive analysis of the data and yielding insights into the nuanced dynamics between environmental factors and emotions.  
The graphics were created using Python with the libraries matplotlib and seaborn.