# How to deal with missing values in the survey data to perform Paired sample t test

I have a dataset where I have 100 respondents. Each respondent has to give response on service quality of Health care equipment. Is it providing efficient services to the patients? We have two columns 'Expected service quality' and 'Perceived service quality'. We will perform this equation= Service quality=Expected-Perceived to see if the service quality is positive or negative. If the difference is negative, it states we need improvement in that area. Now the problem is the two columns have many missing values and I have to perform paired t test on the data. In the first column there are 15 missing values and in 2nd I have 56 missing values. How do I deal with these missing values?

You simply cannot use these data points for this test, you have to use only the data points for which both variables have a value. This will make the sample smaller, so it's less likely to result in a significant difference.

• Can't we replace all the missing values of one variable with its mean/median? Jan 18, 2021 at 2:45
• @pinky, you can, but you would be introducing a serious bias in the data so the result of the test wouldn't be reliable. Basically it's like pretending that there is some data where there isn't any, doing this is similar to adding 1000 data points made of the mean of the values: it might change the result of the test but it's meaningless. Jan 18, 2021 at 10:48
• Now I have removed all the missing values and ran descriptive statistics and Shapiro test( for normality). From Shapiro test, I saw that the data is not normal so I wanted to conduct Wilcoxon test instead of paired t test. From the descriptive statistics output , I saw that medians are equal. But after running Wilcoxon, I saw that p value <0.05 which rejects null and states that there is some difference in medians of the two groups. Now my descriptive output states medians of two groups are equal but my wilcoxon output shows medians of the two groups are not equal. why is this discrepancy? Jan 21, 2021 at 15:13
• @pinky depends what is "descriptive statistics output"? Jan 21, 2021 at 15:27
• The medians are not different but the distributions are different. There's no discrepancy, these two facts are compatible. Your main conclusion should be that the distributions are different, the fact that the medians are identical doesn't really matter. Jan 21, 2021 at 17:49