Epic Children, Mostly Sons
Across 450 parent-child entries drawn from 32 epics and 23 civilizations, 85% of children are sons. 63% of couples have zero daughters, while only 6% have zero sons.
I classified each entry by how well-documented the family actually is: mythological (gods like Zeus and Brahma), legendary (human figures with no corroborating evidence, like Arjuna, Abraham, and Achilles), or historical (families documented by near-contemporaneous sources, like Muhammad, Abu Bakr, and Herod the Great). Legendary families are 88% male and historical families are 68%, a 20-point gap. The zero-daughter rate tells the same story more starkly: 70% of legendary couples have zero named daughters, against 43% for historical couples, while the zero-son rate barely moves across the two categories (5% vs. 2%). The Islamic data offers a particularly clean test, since it contains both legendary figures (Quranic prophets, close to 100% male) and historical ones (the Prophet's companions, roughly 70% male), drawn from the same religious tradition and often compiled by the same scholars.

The ratio varies considerably across traditions. Hindu epics are the most skewed at 90% male, with 1,220 sons against 142 daughters across 147 couple-level entries in seven texts. The Jewish scriptures come in at 77%, and Islamic sources at 72%. Greco-Roman mythology is the lowest of the four at 64%.

The son preference also shows up in who gets prayed for. Across the dataset, I found 23 cases where a character performs a ritual, makes a vow, or receives a divine promise specifically for a child: Dasharatha's Putrakameshti yajna, Hannah's vow at Shiloh, Zakariya's du'a in the Quran, Kunti's mantra invocations, Dirse Khan's feast in the Dede Korkut, among others. Of the 23, twenty explicitly ask for a son and three leave the gender unspecified. All 23 produce at least one son. In only two cases does a daughter also result from the prayer, and in both she is unasked-for: Drupad's fire ritual, performed to obtain a son who would kill Drona, produced both the desired son (Dhrishtadyumna) and Draupadi; Gandhari's boon from Vyasa was for a hundred sons, and she received them, plus one unrequested daughter (Dushala).
Data and analysis script are on GitHub.