Contemporary fabulists (1997, 2010, 2012, 2019) have these as the famous first words of Thomas Babington Macaulay, at the age of 4 (or thereabouts):
What ails thee, Jock?
In 1933, the same words are ascribed to Thomas Carlyle at the age of eleven months by Lovisa C. Wagoner in The Development of Learning in Young Children.
The current favorite appears to be Macaulay, perhaps because of the incredulity inspired by any child speaking so coherently at eleven months. However, Wagoner at least provided sources, which eventually enabled me to trace the story back to a slightly different version.
In the 1928 Infancy and Human Growth, Arnold Gesell reports this:
Thomas Carlyle, writer, had not spoken a word until eleven months, when hearing a child cry he said, "What ails thee, Jock?"
Gesell attributes the story to biographical data "of unequal reliability" given in the 1926 Genetic Studies Of Genius Volume II: The Early Mental Traits Of Three Hundred Geniuses by Catharine Morris Cox, where the story is told with a slight but in this context significant difference:
It is reported that Carlyle had not spoken a word until, at the age of eleven months, hearing a child cry, he amazed the household by asking: "What ails wee Jock?" [emphasis added]
Cox, for her part, lifted the tale almost verbatim from the 1887 Life of Thomas Carlyle by Richard Garnett, wherein it is prefaced by "Few anecdotes are recorded of Carlyle's infancy."
My speculation is of course merely speculation, but I find it understandable that a literature professor might both embellish and alter the story, replacing "Jock" with "bairn" to give it a more Scottish flavor and forestall any irrelevant associations the students might concoct from "Jock".
In the contemporary accounts I looked at, Macaulay is misspelled as "Macauley", which suggests that story came from a source that likewise misspelled the name. Also noteworthy is that the first name of both Carlyle and Macaulay is Thomas. I'm sure these observations suggest profound truths about the etiology and development of apocryphal stories.
Both Macaulay and Carlyle wrote poetry, Macaulay more than Carlyle, but neither is now known principally for their verse.