i have conducted an experiment with two conditions (happy and sad) i wanted to see the effects of these conditions on words chosen from three different categories (positive, negative and neutral words)

-in both conditions i have data on the three different word categories

its a between subjects design - their were different paricipants in each condition the IV is the mood condition either happy or sad

the DV is realtive frequency of words in pos, neg and neutral categories

i want to find a statistical test which will show me if there is a difference between the realtive frequencies in each word category in the two different conditions


1 Answer 1


Maybe make a table with rows Happy/Sad and columns Pos/Neg/Neut. Find word counts for each of the $2\times 3 = 6$ cells.

Then do a chi-squared test to see if Pos/Neg/Neut choices are homogeneously distributed for Happy and Sad populations.

To illustrate how chisq.test works in R, consider the following table with fictitious counts:

TBL = rbind(c(21,34, 53), c(65, 27, 10))
     [,1] [,2] [,3]
[1,]   21   34   53
[2,]   65   27   10


       Pearson's Chi-squared test

data:  TBL
X-squared = 52.536, df = 2, p-value = 3.909e-12

For these data the null hypothesis of homogeneity is strongly rejected with a P-value near $0.$ So it seems Happy and Sad people are picking different kinds of words.

There are lots of examples of chi-squared tests of homogeneity on this site and on various online help pages. [For possibilities on this site you might start with the "Related" links in the margin of this page.]

  • If you get an error message for your real data complaining about inability to get a reliable P-value on account of low counts in some cells, you might be able to use the argument sim=T in chisq.test to get a useful P-value.

  • If you wonder whether additional tests might be useful to try to track down what specific differences in word type there are between Happy and Sad people, you may get some ideas from similar sources. Maybe use $ notation chisq.test(TBL)$resi for clues from 'Pearson residuals'.

Whatever happens: If you get stuck analyzing your real data, then please post the table of real counts and explain your quandary. Then one of us might be able to help.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.