Presumably you have death record for Mary. Was death notified by a family member and does record give their details?
From some of the suggestions above, family may all have come from Ireland and possibly was not all together at times of censuses. Also there may well have been a number of relocations - several new pits opened in the Stirling area in the 1890's / 1900's and in my own family a number of mineworkers later moved to Fife from Stirling.
Possible family (mother not listed) in 1901 census (Ancestry) in Hamilton has father James Ward (aged 45) Colliery Stocker, and son Thomas (15) Colliery Labourer (both born in Ireland). There are 2 other children, Essie (Jessie?) aged 17 and James aged 12 - again listed as born in Ireland. Mother could have been back in Ireland or in hospital if already poorly? There are a couple of Mary Wards who might be candidates but ages / birthplaces not entirely consistent.
Regards
Sandy