Statistical Significance – Developing a Statistical Test to Distinguish Two Products Based on Categorical Data

categorical dataordinal-datarepeated measuresstatistical significance

I have a data set from a customer survey, I want to deploy a statistical test to see whether there is significance difference between product 1 and product 2.

Here is a data set of customers' reviews.

The rate is from very bad,bad,okay,good,to very good.

customer    product1    product2
1           very good   very bad
2           good        bad
3           okay        bad
4           very good   okay
5           bad         very good
6           okay        good
7           bad         okay
8           very good   very bad
9           good        good
10          good        very good
11          okay        okay
12          very good   good
13          good        good
14          very good   okay
15          very good   okay

What methods should I use to see if there is any difference betw these two products?

Best Answer

For ranking by different judges, one can use the Friedman test. http://en.wikipedia.org/wiki/Friedman_test

You may convert ratings from very bad to very good to numerics of -2, -1, 0, 1 and 2. Then put data in long form and apply friedman.test with customer as the blocking factor:

> mm
   customer variable value
1         1 product1     2
2         2 product1     1
3         3 product1     0
4         4 product1     2
5         5 product1    -1
6         6 product1     0
7         7 product1    -1
8         8 product1     2
9         9 product1     1
10       10 product1     1
11       11 product1     0
12       12 product1     2
13       13 product1     1
14       14 product1     2
15       15 product1     2
16        1 product2    -2
17        2 product2    -1
18        3 product2    -1
19        4 product2     0
20        5 product2     2
21        6 product2     1
22        7 product2     0
23        8 product2    -2
24        9 product2     1
25       10 product2     2
26       11 product2     0
27       12 product2     1
28       13 product2     1
29       14 product2     0
30       15 product2     0
> 
> friedman.test(value~variable|customer, data=mm)

        Friedman rank sum test

data:  value and variable and customer
Friedman chi-squared = 1.3333, df = 1, p-value = 0.2482

The ranking of the difference between 2 products is not significant.

Edit:

Following is the output of regression:

> summary(lm(value~variable+factor(customer), data=mm))

Call:
lm(formula = value ~ variable + factor(customer), data = mm)

Residuals:
   Min     1Q Median     3Q    Max 
  -1.9   -0.6    0.0    0.6    1.9 

Coefficients:
                     Estimate Std. Error t value Pr(>|t|)
(Intercept)         4.000e-01  9.990e-01   0.400    0.695
variableproduct2   -8.000e-01  4.995e-01  -1.602    0.132
factor(customer)2   6.248e-16  1.368e+00   0.000    1.000
factor(customer)3  -5.000e-01  1.368e+00  -0.365    0.720
factor(customer)4   1.000e+00  1.368e+00   0.731    0.477
factor(customer)5   5.000e-01  1.368e+00   0.365    0.720
factor(customer)6   5.000e-01  1.368e+00   0.365    0.720
factor(customer)7  -5.000e-01  1.368e+00  -0.365    0.720
factor(customer)8   9.645e-16  1.368e+00   0.000    1.000
factor(customer)9   1.000e+00  1.368e+00   0.731    0.477
factor(customer)10  1.500e+00  1.368e+00   1.096    0.291
factor(customer)11  7.581e-16  1.368e+00   0.000    1.000
factor(customer)12  1.500e+00  1.368e+00   1.096    0.291
factor(customer)13  1.000e+00  1.368e+00   0.731    0.477
factor(customer)14  1.000e+00  1.368e+00   0.731    0.477
factor(customer)15  1.000e+00  1.368e+00   0.731    0.477

Residual standard error: 1.368 on 14 degrees of freedom
Multiple R-squared:  0.3972,    Adjusted R-squared:  -0.2486 
F-statistic: 0.6151 on 15 and 14 DF,  p-value: 0.8194

enter image description here

Related Question