I have an instrument that collects travel_angle, work_angle and speed as the user moves this instrument and this data is collected in constant delta T.
Assuming counting starts at 0ms and the increment is 100ms:
|==================================|
| interval | travel | work | speed |
|==========+========+======+=======|
| 0ms | 3 | 14 | 15 |
| 100ms | 8 | 15 | 16 |
| 200ms | 1 | 15 | 14 |
| 300ms | 6 | 19 | 15 |
| 400ms | 2 | 22 | 15 |
...
====================================
The numbers that occur in the travel, work and speed do not follow any pattern. You can assume that they are completely arbitrary.
This next part applies to the travel, work and speed columns, but to simplify the matter, I will take work column as an example.
I have a pre-defined range where the system prefers the values to be. This range, in the case of work is 15 to 30. At the end of the sessions, I have to calculate the average_work_angle which is currently calculated as the sum of all the entries in the work column divided by the number of entries in the work column.
The problem arises when we have groups of highly-segregated data which are at a similar or equal distance from the range (15 to 30), on opposite ends of the range.
Say I have an array of entries [10, 10, 10, 35, 35, 35]. These are all on equal distance from the range (first three entries are -5 and the last three entries are +5), and they are on opposite ends from the range.
Although the user has held the instrument incorrectly throughout the entire session, the administrator will not know this because the average will calculate 135 / 6 which obviously falls perfectly in the middle of the accepted range (the middle is the exact correct value, the range around the middle is acceptable error).
I'd ask for some help in finding a more realistic average. I really don't know what to look for, so just providing me with a link to a method that solves this problem or a similar problem will be enough.
I would of course use a time-weighted average here but the problem is that I am working with already collected data and the data collected until now did not record the interval inside of my database.
Please be kind, I am not a math major.