I performed a survey in which one of the questions used a grid to let people express preferences for different features of something, using a Likert-like scale for each feature. I coded the values as 1-5. The people surveyed fall into two disjoint subgroups; one subgroup had more individuals in it. Here's an illustration of the results (the real survey had more people and more questions). The columns are individual people's responses:
group1 = {
"feature1" : [5, 1, 4, 5, 2, 5, 5, 4, 4, 2],
"feature3" : [3, 5, 2, 3, 4, 2, 0, 2, 1, 2],
"feature2" : [3, 3, 2, 1, 2, 3, 3, 1, 2, 4],
}
group2 = {
"feature1" : [5, 4, 5, 0, 4, 3],
"feature2" : [1, 4, 1, 0, 4, 4],
"feature3" : [2, 5, 3, 4, 3, 2],
}
In a few cases, sometimes a person didn't give a rating for a given feature. This is represented as 0's in the lists above. For example, the 4th person in group 2 didn't give responses for features 1 and 2 and only responded to feature 3 (here, with a rating of "4"). I have no way to know why people occasionally did that. (Not always the same person, not always the same question.)
Question: If I want to do Welch's unequal variances t-test for the
responses of the two groups to each feature, how should I treat the item
nonresponses? In concrete terms, if I use Python SciPy's stats.ttest_ind
and pass it two lists of values (one for each group's responses to a given
feature question, or in other words, for a row in the two dictionaries of
responses shown above), then which of the following is the correction approach?
- leave the 0's in the lists of values passed to
stats.ttest_ind
- remove the 0's from the lists of values passed to
stats.ttest_ind
On the one hand, I can argue that removing the 0's is correct because they are not actual responses—they are just place holders we used to code the results. On the other hand, if the 0's are removed, then it seems like it would change the sample mean for one or the other group in the t-test calculation, because there would be fewer responses than there are people in the subgroup.
I don't know enough statistics to know whether what's right. Can someone please explain what the right thing to do is in this situation?