What makes a bike stay upright when moving? What makes a bike stay upright when it is in motion?  What is the relationship between speed and stability?  Is it a linear relationship?  

I could ask this on the physics site however I am hoping for a relatively simple answer.  I took an introductory class in physics in University so basic physics is appreciated but nothing too gnarly.  

I think that it is not the spinning mass of the wheel that is keeping the bike upright.  I read a study recently stating that if you have a wheel with identical mass spinning backwards beside the bike the bike will not lose stability.  (I am not sure where I read the study).

Why do bikes stay upright when on a roller?
This question was recently the subject of a lengthy article in New Scientist magazine. To summarize:


  "Why does this bicycle steer the proper amounts at the proper times to assure self-stability?" the paper asks. "We have found no simple physical explanation."


http://www.newscientist.com/article/mg21028141.700-bike-to-the-drawing-board.html

This article also cites the study that you could not quite place - gyroscopic forces, for so long thought to be the be all and end all of bicycle stability - have been scientifically proven to not be of the consequence popularly imagined.

As for staying upright on a roller, that is not covered by the article, however, it does discuss what happens when you send a bike off down the street with nobody on it - seemingly the weight and steering adjustments made by the rider have nothing to do with it.

I don't think that the New Scientist article is the last word on the subject. However it is recent (a few weeks old) and is a good introduction to the mystery. Enjoy!