system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How does the pedometer know that I am walking and not just shaking my phone?
gpt
If you looked at a graph of what the phone was recording as it moves you would quickly see patterns that were unique to walking.

The phone records how it's moving (accelerating) in 3 different directions. It also records the magnetic force in 3 directions like a 3 dimensional compass. A graph of this would look like 6 lines all waving around.

When you're walking you have a very rhythmic movement and it only happens in certain directions relative to the direction your phone is orientated in your pocket or bag. The same for climbing stairs and a load of other actions. The graphs of these actions will all have unique things about them that the phone can pick out to tell what you're doing. It's like recognising your voice - it's not perfect but it's getting very good.