I want to see if certain types of food items are represented in certain locations. To test this I have an experiment where participants place items into locations as they desire. After that, they learn the actual properties of the food items, and they do the same task once more.

My aim is twofold: First, to see if each food type is significantly represented more in certain locations. Second, if the first and second tasks differ.

I have 2 categorical variables: food type and location. Food type has 4 levels, and location has 8 levels. So I have a contingency table consisting of 32 cells. In the first part I want to see for each row (for each food type) if one of the locations have significantly more placement frequencies than the others (If so, I can say there is an association between certain food type and location). So my aim is to compare frequencies within each row. In the second part I want to see if these frequencies change significantly.

The first one seems like a Chi-square test for independence, and the second part seems like chi-square goodness-of-fit to me. Can you please tell me if this is correct?

Another question I have is about sample size estimation in G*power. I'm confused because in G*power there are two options under chi-square tests: "Goodness-of-fit test: Contingency tables", and "Variance: difference from constant (one sample case)". I'm confused because from what I read, difference from constant seems like goodness-of-fit. I have a contingency table but it's not for goodness-of-fit. So which one should I use for Chi-square test for independence?

I hope I made it clear. Thank you in advance!