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))
TBL
[,1] [,2] [,3]
[1,] 21 34 53
[2,] 65 27 10
chisq.test(TBL)
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.