# MEMS and IoT in HAR: Effective Monitoring for the Health of Older People
## 5 Data Analysis
### Data Set
Starting with the mean, the grasping activity may show a lower average movement value than other activities, as grasping involves smaller and more controlled movements. In contrast, the circular motion of the arm may present a higher average due to a wider range of motion. The average for leg flexion could vary depending on the intensity and frequency of the flexes, while walking might reveal a moderate average, reflecting continuous and regular movement. Regarding the mode, the grasping activity could indicate the most common hand position during the action. The circular motion of the arm may demonstrate the most frequent arm position throughout the movement. This could represent the most common flexion angle, while walking may reflect the more frequent leg position during movement. Considering the median, the grasping activity may yield a value close to the mean, pointing to consistent movements. The circular arm movement could result in a higher median, indicating wider movements. The median for leg flexion might display variability similar to the average, while walking could present a stable median, reflecting regular movement. Regarding variance and standard deviation, the grasping activity will likely have low values, indicating controlled and consistent movements. In contrast, the circular movement of the arm may exhibit high values due to the variability of wide motions. The flexion of the legs may show varying values, which depend on the intensity of the flexion. Walking is expected to produce moderate values, reflecting its regularity. When analyzing the average deviation and the root mean square, the grasping activity may again show low values, suggesting smooth movements. The arm's circular movements might present higher values due to their variability. Leg flexion could display values similar to those seen in variance, while walking will likely have moderate values that signify regular movement. Examining the minimum and maximum values shows that the grasping activity may have closely grouped values, indicating restricted movement. The circular movement of the arm is expected to show a significant difference between the minimum and maximum, reflecting its wide range of motion. The flexion of the legs may also exhibit variable differences, depending on the intensity of the flexion, while walking might display moderate differences that indicate consistent movement. Considering percentiles, the grasping activity could have closely grouped percentiles, signifying an even distribution of movements. The circular arm movements may show a wide range of percentiles, reflecting their variability. The flexion of the legs might exhibit varying percentiles similar to variance, whereas walking could demonstrate moderate percentiles that indicate regular movement. Finally, in terms of counting, the grasping activity may have a high count if it occurs frequently. The circular movement of the arm may vary depending on the duration of the activity. Leg flexion could also have a high count if performed repetitively, while walking and is expected to produce a moderate count that reflects the duration of the walk. In real time, we sent the graphical representation of movement data to the monitoring system using the \"graph\" script to be displayed on the remote console (Figures 9-12). Medical staff will later evaluate the motor skills of the monitored subjects in clinic to decide which therapeutic actions to take. Connecting a Xiaomi Redmi Note 11 Pro smartphone to the STM32 WB55G via Bluetooth Low Energy (BLE) and using the Android STBLE sensor app allows us to view the data transmitted by the sensors. The app allows us to plot these data on a phone screen (see Figure 13) and log them for future transfers. The acquired data and its statistical features are then sent to a predictive model designed to recognize the activities being performed. Figure 9: Arm circular movement. Figure 11: Legs flexion. Figure 12: Walking. Figure 10: Grasping.