What kind of shaking are we talking about? Maybe you do not need math:
This is just a 1 min example, can be done better, be more nuanced, more random. Does it feel like something worth experimenting with?