preference <- read.csv("preference.csv")
preference
## preference primed
## 1 1.8 0
## 2 0.1 0
## 3 4.0 0
## 4 2.1 0
## 5 2.4 0
## 6 3.4 0
## 7 1.7 0
## 8 2.2 0
## 9 1.9 0
## 10 1.9 0
## 11 0.1 0
## 12 3.3 0
## 13 2.1 0
## 14 2.0 0
## 15 1.4 0
## 16 1.6 0
## 17 2.3 0
## 18 1.8 0
## 19 3.2 0
## 20 0.8 0
## 21 1.7 1
## 22 1.7 1
## 23 4.2 1
## 24 3.0 1
## 25 2.9 1
## 26 3.0 1
## 27 4.0 1
## 28 4.1 1
## 29 2.9 1
## 30 2.9 1
## 31 1.2 1
## 32 4.0 1
## 33 3.0 1
## 34 3.9 1
## 35 3.1 1
## 36 2.5 1
## 37 3.2 1
## 38 4.1 1
## 39 3.9 1
## 40 1.1 1
## 41 1.9 1
## 42 3.1 1
There are two columns and 42 rows in the chart. Each row represents a different person and the preference column represents on a scale of 1 to 6 if the consumer liked it while the primed column represents whether the consumer is exposed to an animal on the label. The primed group is denoted as 1 on the table while the non-primed group is denoted as 0.
The purpose of the study is to determine if an animal on a bottle, in this case a dog shampoo bottle, affected how much a consumer liked the product.
library(ggplot2)
ggplot(data=preference, mapping=aes(x=as.factor(primed), y=preference)) + geom_point()
According to the plot, on average, people with non-primed bottles had a preference of 2 while, on average, people with primed bottles has a preference of 3-4. Therefore, people with primed bottles were more satisfied than those with non-primed bottles.
The primed and non-primed groups will have the same mean.
The primed and non-primed groups will not be equal. The primed mean will be higher than the non-primed group.
T-test
Two sample
ggplot(data=preference) + geom_qq(mapping=aes(sample=preference))
0.05
t.test(formula=preference~primed, data=preference)
##
## Welch Two Sample t-test
##
## data: preference by primed
## t = -3.2072, df = 39.282, p-value = 0.002666
## alternative hypothesis: true difference in means is not equal to 0
## 95 percent confidence interval:
## -1.577912 -0.357543
## sample estimates:
## mean in group 0 mean in group 1
## 2.005000 2.972727
Since the p-value is less than the level of significance, the null hypothesis is rejected.
Confidence interval is a range of values that are plausable for the difference of means. However, zero is not plausable, so the means will not be the same. Therefore, the null-hypothesis is rejected. There is a 95 percent confidence interval between -1.577912 and -0.357543.
The mean for group 0 is 2.005000 while the mean for group 1 is 2.972727, so the mean for group 1 is about .9 larger than group 0.
In conclusion, group 1 had a higher satisfaction number than group 0. Therefore, when someone sees a lable with an animal on it, then they are more likely to buy it because they like the label more.