Probabilistic modeling and optimal design of robotic manipulators