I think the easiest way to explain my question is with an example scenario:
Let's say we have 10 groups of 5 people and each group is in an identical circular room in which we are allowing them to move around the room at will for 20 minutes. In this scenario, We are interested in how close each person chooses to stand relative to the person closest to them. Specifically, we will measure how close each person is standing to their nearest neighbor at the top of every minute, and then take the median of these values for each individual (so we will end up with 5 data points for each group of people).
Not let's say we also perform this process with a completely different set of people (again we'll say we have 10 groups of 5) and we want to know how the nearest neighbor distances for this set of people differs from the other set of people.
So, we will have 50 measurements for each set of people (1 per person). My question relates to how the dependence/independence of our measurements will affect our hypothesis testing because measurements from people that were in a room together will not be completely independent (the behavior of any person in the group will have an effect on the behavior of others in the group), but measurements from different groups are independent.
Is there a particular statistical approach that deals with this type of issue? Or is the only solution to instead compare groups instead of individuals (median nearest neighbor distance per group instead of median nn distance per individual)?
The idea behind comparing each individual vs every group is that it would allow us to capture individual differences (i.e. we expect some people to stand particularly close and others to stand particularly far, which would not be illustrated in analysis of group medians alone).
I know the example is imperfect so please let me know if there is anything I need to clarify.