Catechism of Pope St. Pius X p. 64 Q/A #5-10.  Edit: When in doubt if the miscarried baby is alive or dead, do baptize it.