It sounds like you are looking for the probability of being behind after x hands (or hours, or any other unit of measurement). This should get you started:
http://www.blackjackinfo.com/bb/showthread.php?t=4891
-Sonny-
my question is how to calculate the probability of spending x number of hands at a loss, or at a negative standard deviation if you prefer.