Caveat emptor with iOS / HealthKit step data

Step counts have not been recorded uniformly before and after September 2016 on the iPhone, which leads to some artefacts. This slight complication might be interesting to those who intend to analyse long periods of health data.

The change came with an iOS update. Helpfully the exported data points from the Health App contain the current iOS version after iOS 9. Perhaps you can spot the difference pre- and post iOS 10 below. The plot shows steps/second over the years from the same device. Each dot was calculated from one record.

Magnification around the update shows that there are fewer data points post iOS 10:

A natural first hypothesis would be that the step count records represent longer time periods, and thus the mean per second likely became more uniform after September 2016. A diagram of the length of time that each record captures shows that this is indeed the case:

Before iOS 10 the record length was ideally 5 minutes and at most 6. After iOS 10 record length changed to at least 6 minutes and ideally 10 minutes. Ten minutes seem to be also the new maximum time period.

It is easy to speculate that the data resolution was reduced to improve battery life, or to deal with outliers. There might be variation between different iPhone models. In either case it probably does not hurt to look for artefacts in analyses that involve the timing or duration of walking, or the maximum/minimum/median step frequency.

Leave a Reply

Your email address will not be published.

Please simplify: \(\frac{\;\;\;\;20\;\;\;\;}{\frac{50}{5}}=\)