We present an approach based on Hidden Markov Model (HMM) and Gaussian Mixture Regression (GMR) to learn robust models of human motion through imitation. The proposed approach allows us to extract redundancies across multiple demonstrations and build time-independent models to reproduce the dynamics of the demonstrated movements. The approach is systematically evaluated by using automatically generated trajectories sharing similarities with human gestures, and by using several metrics to assess the imitation performance. The proposed approach is contrasted with four state-of-the-art methods previously proposed in robotics to learn and reproduce new skills by imitation. An experiment with a 7 DOFs robotic arm learning and reproducing the motion of hitting a ball with a table tennis racket is then presented to illustrate the approach.