<<The degree to which you invest vs. gamble/speculate is simply how what percentage of you bankroll you place relative to the volatility (SD for gambling) of the position (bet).>>
There are some important differences. With gambling, each "event" is independent in that the card deck does not recall how it was mixed last time, the dice don't recall the prior roll, etc. Accordingly, by reducing the size of the bets and increasing the number of events, if you truly have a positive expectation for each event, you can reduce the deviation as much as you like. With investing, you may try to be diversified and that may reduce the degree of correlation, but that may not protect you in market crash.
Also, gambling games are generally fairly trivial, some more complex than others, but none approach to any extent the complexity of investments that are affected by the overall economy, not to mention the factors specific to the particular investment.