Reference for Yevamot 4:2
הַכּוֹנֵס אֶת יְבִמְתּוֹ, וְנִמְצֵאת מְעֻבֶּרֶת וְיָלָדָה, בִּזְמַן שֶׁהַוָּלָד שֶׁל קְיָמָא, יוֹצִיא וְחַיָּבִין בַּקָּרְבָּן. וְאִם אֵין הַוָּלָד שֶׁל קְיָמָא, יְקַיֵּם. סָפֵק בֶּן תִּשְׁעָה לָרִאשׁוֹן, סָפֵק בֶּן שִׁבְעָה לָאַחֲרוֹן, יוֹצִיא וְהַוָּלָד כָּשֵׁר, וְחַיָּבִין בְּאָשָׁם תָּלוּי:
If one wed his yevamah, and he found her to be pregnant, and she gave birth — if the child lived, he must send her away, and they must bring a (sin-) offering [for he cohabited with his brother's wife outside the context of mitzvah (i.e., yibum), and the child is kasher in any event.] And if the child does not live, she remains with him. If it were not clear whether the child were a nine-month birth of the first or a seven-month birth of the second, he must send her away, the child is kasher, and they must bring a suspended guilt-offering. [For in all instances where one is liable to kareth for wilful transgression, and to a sin-offering for unwitting transgression, he is liable to a suspended sin-offering for possible transgression.]