On average the implied volatility is higher than realized volatility because you can easily imagine that dealers will ask customers to pay a premium to write them options and risk manage them
you can have a look at this paper for instance
PIMCO-The Volatility Risk Premium
Now you can investigate how realized volatility can be a signal for trading implied vol but the condition will certainly not be "buy when realized > implied" because the 2 quantities are not directly comparable. You need to establish some statistical relationship first.
And to finish here is a little exercise to test your thinking about realized vs implied vol and hopefully help you design properly your strategy: suppose you are long a call option which you purchased at some implied vol level $\sigma_0$ and which you are delta-hedging. Now imagine that i grant you that "on average" over a period of time the stock realized volatility $\sigma_r$ will be higher than $\sigma_0$. In other words i tell you that in expectation $$E[\sigma_r] > \sigma_0$$
Would you be certain to make money even in this situation ?