Hi,
What the 1851 census record says is that Hugh Ryan (50) is the brother-in-law of Margaret Logan (54), the head of the family. Jane Logan (18) is her daughter. Both Hugh and Margaret came from Down. It seems likely that he's really the brother.
The 1861 census has Hugh (57) as the head, living with his sister Margaret Logan (50), neice Rose Ryan (26), nephew William Wilson (31) and his wife and family. Hugh, Margaret, Rose and William are all Irish-born. The other Wilsons are born in Liverpool.
Clearly, we've got a problem deciding what the correct dates of birth should be.
I can't find Hugh in the 1871 census. There's a death of a 69 year-old Hugh Ryan in Liverpool in the 2nd quarter of 1869. This age does fit with the 1851 census. You could try sending for the death certificate. (Reference is to volume 8b, page 26.)
There's a suitable Margaret Logan (30) in Birkenhead in the 1841 census with husband John (30), their son Thomas (6) and his sister Jane (25), all of them Irish-born. This suggests that Margaret and John were married in Ireland. This isn't of course consistent with your current information, which has John dying in 1840.
There's also the death of a 79 year-old Margaret Logan in Liverpool in the 2nd quarter of 1877. This age does fit with the 1851 census, though not the others. You could try sending for the death certificate. (Reference is to volume 8b, page 110.)
There are 6 deaths in Liverpool of John Logans between 1843 and 1851. Again, these death certificates may be useful.
Your real problem is that everything points back to Ireland at a time when there wasn't civil registration and for which church records are patchy.
There's a Hugh Ryan in Warrenpoint in 1815 (Freeholders' records), who has a son Thomas. Given the tendency for names to run in families . . .
The Rose Ryan born in 1834 has a father named Arthur. According to the Tithe Applotment Books, there's an Arthur Ryan in Corrigs (Corrags) in 1834.
You could also try tracking down Rose later on, to see if she married for example. There's a marriage in Liverpool in 1869, for example.
Hope that's of some use.