I am looking at one kind of measurement in 4 groups Young males, young females, senior males, senior females. Whereas I am mainly concerned at looking at the differences between young and old, I don't want sex as a confounding factor which is why I added in the additional sex groups and basically doubled my sample size (no previous studies to say if it is different with age in the species I am researching). I am pretty new to statistics and am not sure how to analyse this as I was originally going to do a student's unpaired T-Test but now I have added the additional two groups to separate the sexes.
Additionally, some of the patients I am using may have underlying health issues that impact the measurement I am taking. I know this in advance (so for example I might know that 2 of the 12 senior females may have a health problem that changes the measurement), but unfortunately I cannot choose a different group of patients. Is there a way to account for these in advance? Or to note which ones may have values indicative of health problems and treat them as outliers later.
So without changing the outline of the project, if I am mainly comparing differences in this measurement between two age groups, while also taking into account sex, what statistical test should I use?
Thank you