The information on the census forms that you can see online is only as good as the knowledge (and truthfullness) of the person providing the information to the enumerator. So, depending on who told the enumerator about Mary Williams:
- They may not have known so guessed
- They lied
- They did not remember correctly
In addition the forms you see are not the forms that were originally filled in, but a summary produced by the enumerator, which introduces the opportunity for the enumerator to miscopy the information.
(And if you're relying on an online transcription rather than viewing the image itself, the transcriber could have made an error, or the image may not be very legible and the best that can be done is a guess about what a letter/number/word is.).
So, the discrepancy in ages:
- Could be down to a data entry or transcription error somewhere along the chain -- you should look for her age in as many sources as possible to determine which is most likely (if you currently only have 2 possibilities, you cannot know which is correct -- the 1901 census may have been wrong and the 1861 census correct. Or they may both have been wrong).
- Could indicate that you are looking at two different people (those weren't unusual names in the place/time you're looking at).
Try to find her in all the census from 1841 onwards, and Ivan from 1861 on and assess from what you find whether you're dealing with the same people and what is the most likely age. Don't assume that the first candidate you find in each census is the one you're looking for -- consider all the possibilities.
As she was born before Civil Registration started in 1837, you will not find a birth certificate for her, and in Wales it's less likely that you will find a Parish Baptism record (because so many people were non-conformist) but you should be able to find a birth record for Ivan, which will give you her maiden name; with that you may be able to find a marriage record and a marriage certificate will give her age as well.
In general terms, ages recorded close to the beginning of life are most accurate -- they are either provided by the parents (for children) or by the individual themself (although you'd be surprised how many people at this time didn't know how old they were -- it wasn't something they needed to know for any practical purpose); ages later in life are more prone to be shaved for appearances sake, misremembered or provided mistakenly by somebody other than the individual concerned. For example, if Ivan gave his mother's age in 1901, he may have guessed it. It's worth looking at who the Head of the household is, and how they're related to the individual to assess how accurate their knowledge is likely to be; however, be aware that it wasn't always the Head of the household that provided the information to the enumerator.