In: Statistics and Probability
A sample of 15 consumers provided the following product ratings for three different products. Five consumers were randomly assigned to test and rate each product.
Product | ||
---|---|---|
A | B | C |
55 | 85 | 65 |
64 | 99 | 49 |
79 | 91 | 35 |
41 | 88 | 51 |
69 | 95 | 58 |
Use the Kruskal-Wallis test and α = 0.05 to determine whether there is a significant difference among the ratings for the products.
Find the value of the test statistic.
test statistic=_____?______
Find the p-value. (Round your answer to three decimal places.)
p-value =___?___
Sol:
Perform kruskal.test in R studio
Ho:ratings are same for all the 3 products
Ha:There is difference among the ratings for the products.
Rcode:
df1 =read.table(header = TRUE, text ="
product Ratings
A 55
A 64
A 79
A 41
A 69
B 85
B 99
B 91
B 88
B 95
C 65
C 49
C 35
C 51
C 58
"
)
df1
kruskal.test(Ratings ~ product , data = df1)
output:
Kruskal-Wallis rank sum test
data: Ratings by product
Kruskal-Wallis chi-squared = 9.98, df = 2, p-value =
0.006806
Find the value of the test statistic.
test statistic=Kruskal-Wallis chi-squared = 9.98
p-value =0.007
p<0.05
Reject Ho
Accept Ha
Conclusion:
There is sufficent statistical evidence at 5% level of significance to conclude that there is a significant difference among the ratings for the products.