Hello Ruth,
This is most likely your John Dick's, birth, John Dick, 12/Feb/1810. Riccarton, Ayr, parents David Dick, and Janet Calderwood.
David Dick, and Janet Calderwood, were married 25/Nov/1804. Riccarton, Ayr.
They had two other children that i can see,
Robert Dick, born 6/March/1808, Riccarton, Ayr,
James Dick, born 22/Oct/1815, Riccarton, Ayr.
Its possible they had more children, but thats all the ones i can find who were registered.
So on the 1841. census that Janet Calderwood, is most likely his mother, the 1841 census. did not give relationships, if it is his mother, then she is most likely to be widowed, because in Scotland, lots of women after being widowed reverted back to their maiden name.
Also on the census John, and Mary, have three children, David, after his father, Janet, after his mother, and Mary, most likely after Mary's, mother.
Riccarton is next door to Kilmarnock, and in the modern world is actually part of Kilmarnock.
Regards,
Jonn.