Lottery and nearly all casino games are negative expected value and high variance.
Penny stocks, venture capital, micro-loans etc are positive expected value and high variance so these are clearly the better high variance investments.
Appliance warranties are negative expected value, moderate variance, and have no entertainment value. These seem like the worst investments among these.
Penny stocks certainly don't have as high an upside as the lottery.
Any investment with a negative expected value should only be purchased to cover exceptional/catastrophic situations. Insurance covers the 1:1,000,000 case that your house burns down. The lottery is for the 1:300,000,000 case where you win an absurd amount of money that basically makes you a King.
I also believe that the non-linearity of the the utility function of money makes buying one ticket in the lottery a rational choice. The loss of $1 is essentially 0 negative utility for many people, while the gain of millions of dollars is an exponentially larger increase in utility, even if the probability is minute.