Looking up the census and using FamilySearch, I put this together:
David Scott born 1895 at Coupar, Angus
Parents William M Scott postman and Janet M Reid
1901 census at Coupar Angus, Perthshire has:
William M Scott head 33, postman, born Perth, Perthshire
Janet M Scott wife 32, born Clunie, Perthshire
David M Scott son age 6, scholar, born Coupar Angus
Charles M Scott son age 3, born Coupar Angus
Alexander R Scott son age 7 months, born Coupar Angus
William McGregor Scott born 1868 at Perth, Perthshire
Mother Helen McGregor, reputed father William Scott
1871 census at George Street, Perth:
Helen McGregor age 44 seamstress, born Logierait, Perthshire
William McG Scott age 3, born Perth, Perthshire
FamilySearch has a birth for William Scott McGregor, mother Helen McGregor on 7 July 1867 which seems to have been registered at both Auchtergaven and Perth. The father must not have attended the registration of William, hence the mother had to have him registered with her surname but gave the father’s surname as a middle name. This was common practice for illegitimate children. William then went on to use the surname Scott.
Helen McGregor born about 1826 at Logierait
FamilySearch has a birth of Helen McGrigor (note spelling variation) in 1825 at Logierait, parents Charles McGrigor and Helen Low.
1861 census has Helen McGregor as housekeeper at Logierait to Morrice household.
If William’s father was William Scott, who was a farmer, the question is where did he and Helen McGregor get together? Most likely she was working as a servant/housekeeper either for his household or nearby. It's impossible to say with certainty which William Scott he was, but:
In the 1861 census there is a William Scott age 39, farmer, at Auchtergaven - he’s not married and does not have any children, but has a female servant. Could Helen McGregor have been a servant at his farm in 1866 when she fell pregnant with her son? In 1871 William Scott is at the same farm, with a female servant, but seems to have married soon after as he has a wife and children by 1881.