# Significance test of whether participants have more friends of the same sex

I've run into a simple problem - but no idea how to access it correctly.
I've 85 people asked concerning their social network; first example: how many friends do you have. Second, what gender is each of this friend. Then I do a table which displays the average number of female friends and the average number of male frieds of each interviewed person: separated for the male and female interviews and for all together. I got the following table:
$$\begin{array} {rrrrr} &&\text{avg no} &&\text{answers}& & \text{Sdev in}& \\ &&\text{of friends}& & & &\text{no of friends}& \\ & & m &f& m& f& m& f \\ \text{Sex of Interviewed}& M &5.57 &4.61& 54& 54& 3.543& 2.609 \\ & F &4.84 &6.42& 31& 31& 2.734& 3.264 \\ & All& 5.31& 5.27& 85& 85 &3.273& 2.978 \end{array}$$ and I see, that for the male interviewed ("M") the avg number of male friends is higher than the avg number of female friends, and for the female interviewed ("F") it is oppositely. Now what test for significane of the difference were correct here?
I could t-test for the means-difference in the M and F-group separately, but this seems a loss of infomation to me. Or the table suggests something like a chi-square; but how should I apply it here?

[update]
Another approach is to determine the percent of male friends for each respondents, and then determine the average of this percentages for male and female respondents separately: $$\begin{array} {cccc} &&\text{avg "% of }&N&\text{sdev of} & \\ &&\text{friends are male"}& &\text{"%..."} & \\ \text{sex of respondent}&M&52.746&54&21.087& \\ &W&40.868&31&17.235& \\ &all&48.414&85&20.487& \\ &&&&& \\ &f=7.101&&&& \\ &sig=0.009&&&& \\ \end{array}$$ The comparision of that means is significant due to the f-test - but is this a better sensical approach?

[update 2]
This another idea to use the chisquare-rationale. I (re-)expand the averages to the sums: "sum of male/female contacts per respondent" and compute the chisqare based on the indifference-table.

$\qquad \small \begin{array} {c | cc |c} \text{Sum} &\text{m} &\text{f} &\text{all} & \\ \hline \text{M} &301&249&550& \\ \text{F} &150&199&349& \\ \hline \text{all} &451&448&899& \\ \\ \\ \text{Indifference} &\text{m} &\text{f} & \\ \text{M} &275.92&274.08& \\ \text{F} &175.08&173.92& \\ \\ \\ \text{Residual} &\text{m} &\text{f} & \\ \text{M} &25.08&-25.08& \\ \text{F} &-25.08&25.08& \\ \\ \\ \text{Chisq} &\text{m} &\text{f} & \\ \text{M} &2.28&2.3& \\ \text{F} &3.59&3.62& \\ \end{array}$

$\qquad \chi^2 =11.79$

On the other hand, here -I feel- is the chisquare "inflated" because we have such a big N (which is actually an overall sum). Then the significance should be considered critically. Then gaian - what is the most sensical one?

[update 3]
Here I show a table using an "homophily"-index: 0 means completely heterophil, 1 means completely homophil (in terms of same sex between respondent and his reported friends - requires at least one response/one friend per respondent) $\qquad \begin{array} {c|cc|c} &&\text{avg of hom} &\text{sdev} &\text{semean} &\text{N} & \\ \hline \text{sex of respondent} &\text{M} &0.53&0.21&0.03&54& \\ &\text{F} &0.58&0.16&0.03&30& \\ \hline &\text{All} &0.55&0.19&0.02&84& \\ &&&&&& \\ &\text{f=1.297} &&&&& \\ &\text{sig=0.258} &&&&& \\ \end{array}$
I've got another test-value f and another significance level; well here I ask, whether male and female respondents are differently homo/heterophil which is another question than before. However, it is more precisely focused to an interesting indicator. The semean shows, that (only) female respondents seem to deviate significantly (5%-level) from indifference (which means hom=0.5)

It might, anyway, have a little drawback in that the index for each respondent is based on another number of responses and thus has a more or less reliable value for each of that respondents. But this seems to be a too sophisticated problem here, so I think, I'll stay with that type of measuring.
Thanks so far to all respondents here!

-
There's nothing here but a table. What's the question? –  whuber Jul 13 '11 at 17:43
@whuber: sorry, I was still editing –  Gottfried Helms Jul 13 '11 at 17:55

### First define the variables:

• Participant gender: between subjects predictor variable (two levels male, female)
• Gender of friend count: repeated measures predictor variable (two levels male friend, female friend)
• Friend count for a given gender: count based outcome variable

### Choose an analytic approach

• If the dependent variable had been a normally distributed variable, I'd suggest running a 2 x 2 mixed ANOVA.
• If you log transformed the counts (e.g., log(count + 1)) the assumptions of ANOVA might be a reasonable approximation for your purposes, although this arguably is not best practice.
• Alternatively, you could use something like generalised estimating equations (I have some links to tutorials) with a link function more suited to counts.

### Test the homophily effect

With all the above approaches you will be left with two binary main effects and an interaction effect. The significance of the interaction effect will indicate whether the average of m-m and f-f friend counts are significantly different from the m-f and f-m counts. Examination of the raw data or the sign of any parameter would indicate the direction of your effect (which you have already seen in the sample data is a homophily effect rather than a heterophily effect)

-
I think the most helpful here is the focusing on "what do I (really/finally) want to look at", and to consider such "homophily"-effect as a specific index per respondent. While I'm not new to statistics, I'm fairly unexperienced with that social network-analysis and I've to get familiar with the available concepts for such models in general. The three approaches I gave seem fairly naive and introduce different general directions of thinking. Don't know which one is the most reasonable in cases like this... –  Gottfried Helms Jul 14 '11 at 6:27
@Gottfried As I understand it, your research question pertains to theories relevant to social network analysis. However, your data collection procedure is fairly standard. I.e., you can assume independence of observations. This contrasts with many social network studies that sample entire networks to get indices of things like homophily, and have to deal with the dependence in the data. Thus, the analytic approach required for your data does not seem that complicated, relative to the analyses of whole networks using approaches such as Exponential Random Graph Models. –  Jeromy Anglim Jul 14 '11 at 7:10

The chi-square test is close but because you have paired data you should use a variant called McNemar's test. That still gives you what you're looking for in terms of testing whether the sex of the friend is dependent on the sex of the respondent. The statistic says that whether you have more male or female friends depends on whether you're male or female (chi-square = 24.7).

Alternatively, you could recode the counts as same sex friends and opposite sex friends. You have 500 same sex friends (successes) out of 899 friends. Then you could use a binomial test and it will tell you that the probability of having friends of the same or different sex is not equal with the confidence interval of the binomial test being about 0.523 to 0.589 probability same. You can use a chi-square goodness of fit test as well comparing 500 and 399. The story will come out about the same.

You could look at these tests separately for men and women. Estimating confidence intervals under binomial theorem will show that the estimated proportion of same sex friends for men, CI95% = [0.505, 0.589] overlaps substantially with that of women, CI95% = [0.516, 0.623] indicating that the bias toward same sex friends is not greater for women than for men. But this may be a power issue. Perhaps there is a very small effect.

This is all nice and neat because your proportion of male to female friends (regardless of respondent) is about 50:50, p = 0.502, CI95% = [0.468, 0.535]. Therefore, there's no overall male or female bias.

You are right that, with a large n, the statistical significance should be looked at critically. That doesn't mean it's not true. In fact, because of the n you probably have a good estimate of the true proportion and it's definitely not 0.5. Now you you have to do the hard work and assess what a proportion of about 0.55 really means and whether it's meaningful in light of the theories, specific populations, and potential real world applications of what you're examining.

-
Well, that is a nice statement, thanks! I'm still not confident about the "inflation"/the high N. Respondents with many friends (="highly communicative") seem to introduce more weight into the chisq-estimate than those with less (but possibly more selected(!)) friends, and I'm not sure whether I want that weighting. Currently I'm going to tend to reconsider the "homophily"/"heterophily"-concept (jeremy's hint) as an index -1 to 1 for each respondent and then test the homophily for men/women, type of mental disorder and the other indicators of our study. –  Gottfried Helms Jul 14 '11 at 6:21
If that came out differently then you'd need to come up with explanations of why people with larger numbers of friends might be more or less homophilic. –  John Jul 14 '11 at 6:43
I also don't understand why you're so concerned about an overall high n. It just makes your estimates more accurate. That is all it does of any substance. With more accurate estimates you can see smaller differences but that isn't the important thing it does. Enjoy accurate estimates and the fact that you can make statements about the actual quantity rather than merely about significance. –  John Jul 14 '11 at 6:44
I'm not sure if the chi-square test in this case is appropriate because the data is not an independent sample of friendships. Rather the friendships are nested within participants. –  Jeromy Anglim Jul 14 '11 at 7:15
@John: at the inflating of chisquare: surely I like it, when I've a lot of data and estimates are thus more accurate (and significance improves). But if I have only 85 people answering - is it then correct to have a significance-statement, which was derived on basis of 899 answers? Jeromy linked to a helpful blog, and the blog links with its first link to the following article: aje.oxfordjournals.org/content/157/4/364.full.pdf . Here, incidentally, the author gives on the very first page a similar discussion with a more extreme example. Well, so far I'm only sceptic, not yet negating... –  Gottfried Helms Jul 14 '11 at 7:21