# Expected Values for Male/Female Populations

I've got a population of individuals who went through a weight loss program. I'm trying to figure out if gender had an effect on whether they lost a certain threshold of weight by the end of the program or not. I think I should be using a Chi Square test, but how do I come up with the expected values?

Something like 74% of participants were female, and the rest were male, and overall across the entire population, 40.57% hit the weight loss threshold, and 52.11% did not.

Would I do something like the US ratio is 0.9787 M : 1.00 F, calculate how many participants would be male or female using that ratio, then apply the 40.57% and 52.11%, and use those as my expected values? I'm a little lost here, any help would be much appreciated.

Or is there another statistical test I should be using in this situation? Would it be better to set my two groups as male and female and compare total weight lost, rather than if they made it above a threshold or not?

I think maybe I'm confused because it's two categorical groups - Male/Female, and Crossed Weight Threshold / Did Not Cross Threshold

• Do you actually have individual-level information or just sample-level aggregates? In other words, do you know for any particular individual in your sample what their gender is and also whether or not they crossed that threshold? – Isabella Ghement Nov 19 '19 at 16:34
• Yes @IsabellaGhement I have data on both those things (and more) - gender, age, percentage weight loss at program end, height, starting weight, things like that (in addition to a wide range of engagement metrics, which I was able to run variety of T-tests / Kruskal Wallis tests on). I'm just having difficulty figuring out how to set up this particular test. I'd also need to run a similar test on "Personality", of which we have three groupings, and again, I'm not sure how you're supposed to say Ah the expected result for Personality A was X number of people losing above the threshold weight. – James Nov 19 '19 at 17:10
• Maybe begin with something very simple: Make a 2-by-2 table, with rows M/F and columns Achieved goal Yes/No. Put appropriate observed counts in each of the four cells of the table. See if Fisher Exact test finds that one gender achieved goals more often. If answer is Yes, then look more deeply at other information that might explain who meets goals. – BruceET Nov 20 '19 at 7:03

Comment continued: Perhaps the 2-by-2 table of my comment is as follows

           Met Goal
Gender     Y      N    Total
----------------------------
M       10     15      25
W       40     35      75
----------------------------
Total     50     50     100


From the table it looks as if Women meet goals slightly more often, but Fisher's Exact test as implemented in R does not find this difference to be statistically significant at the 5% level.

TABL = rbind(c(10,15),c(40,35))
fisher.test(TABL)

Fisher's Exact Test for Count Data

data:  TABL
p-value = 0.3558
alternative hypothesis:
true odds ratio is not equal to 1
95 percent confidence interval:
0.206663 1.603530
sample estimates:
odds ratio
0.5865061


Perhaps with 10 times as much data the pattern will be sufficiently strongly supported to give a significant result.

TABL2 = rbind(c(100,150),c(400,350))
fisher.test(TABL2)$p.value [1] 0.0003347878  Perhaps with actual data the proportions of successes would differ more greatly between the genders, so that 100 subjects would provide a significant result. TABL3 = rbind(c(10,15),c(60,15)) fisher.test(TABL3)$p.value
[1] 0.0003244721