Statistics for Design, modeling and control of a reaction wheel balanced inverted pendulum