## 4 Results
### Results of the Sensor Network over the Sleep Metrics
#### 4.2.1 Paired Hypothesis Tests Analysis  
The first step was to determine if the metrics were significantly different with the use of the sensor network. To compare the results of each metric, it was necessary to know if the sample differences (with the sensor network--without the sensor network) came from a normal distribution for deciding the corresponding hypothesis test. For differences that came from a normal distribution, the appropriate test is the Paired \(t\)-test otherwise, we have to use the Wilcoxon test.  
We plotted a Histogram and a Q-Q plot to verify whether the metrics are normally distributed. Figure 4 shows the histogram and Q-Q plots for the metrics differences (with the sensor network--without the sensor network).  
It is not clear whether the metrics follow a normal distribution using the graphic method. In this case, we performed a statistical normality test to take more evidence. The most common normality tests are Shapiro-Wilk and Kolmogorov-Smirnov, Shapiro-Wilk is used when the sample size is equal to 50 or lower. The Kolmogorov-Smirnov test is used when the sample size is larger than 50. Because the sample size is larger than 50 we used the Kolmogorov-Smirnov test to prove if the metrics differences follow a normal distribution. The null hypothesis H0 for the Kolmogorov-Smirnov test is that the metrics follow a normal distribution. If the \(p\)-value of the Kolmogorov-Smirnov test is lower than 0.05 the H0 is rejected, otherwise, the data are normally distributed. Table 9 shows the \(p\)-value of the Kolmogorov-Smirnov test for the nine studied metrics' differences and whether those follow a normal distribution.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline  & \multicolumn{3}{c}{**Without Sensor Network**} \\ \hline
**Metric** & **Mean** & **Median** & **St. Dev.** \\ \hline DS & 13.11 & 12.5 & 4.04 \\ HR & 81.14 & 82.5 & 14.459 \\ BF & 16.78 & 17 & 2.766 \\ T & 37.319 & 37.3 & 0.2604 \\ REMS & 19.64 & 20 & 2.153 \\ OS & 93.94 & 94 & 3.132 \\ HRV & 9.92 & 10 & 2.662 \\ S & 8.47 & 8 & 3.81 \\ TST & 5.77 & 6 & 0.737 \\ \hline \hline  & \multicolumn{3}{c}{**With Sensor Network**} \\ \hline
**Metric** & **Mean** & **Median** & **St. Dev.** \\ \hline DS & 15.24 & 15 & 3.137 \\ HR & 75.82 & 75 & 10.166 \\ BF & 14.59 & 15 & 1.837 \\ T & 36.812 & 36.8 & 0.2653 \\ REMS & 22.53 & 22 & 1.66 \\ OS & 95.23 & 95 & 2.304 \\ HRV & 15.98 & 16.5 & 2.902 \\ S & 5.62 & 6 & 2.943 \\ TST & 7.2 & 7 & 0.816 \\ \hline \hline  & \multicolumn{3}{c}{} \\ \end{tabular}
\end{table}
Table 8: Statistical description of the metrics gathering without and with the sensor network.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Metric** & \(p\)**-Value** & **Normal Distribution** & **Appropriate Test** \\ \hline DS & 0.001 & No & Wilcoxon \\ HR & 0.135 & Yes & \(t\)-test \\ BF & 0.077 & Yes & \(t\)-test \\ T & 0.021 & No & Wilcoxon \\ REMS & 0.001 & No & Wilcoxon \\ OS & 0.012 & No & Wilcoxon \\ HRV & 0.108 & Yes & \(t\)-test \\ S & 0.000 & No & [PERSON] \\ TST & 0.000 & No & [PERSON] \\ \hline \hline  & \multicolumn{3}{c}{} \\ \end{tabular}
\end{table}
Table 9: Results of Kolmogorov–Smirnov test metrics samples differences (With the sensor network—without the sensor network).  
means that the correspondent metric is higher with the use of the sensor network, and SN < MNS means that the metric is lower with the use of the network.  
It is possible to show that the nine metrics are different in a statistically significant way with the use of the sensor network.