Statistical properties of magnetar bursts and FRB 121102