STEP 1: Design the experiment

Data has already been collected!

STEP 2: Load the Data

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

STEP 3: Describe the Data

Researches were interested in the effects of priming subjects towards certain images/concepts on their likelihood to purchase a product. They conducted a survey to gather information on this marketing tactic and this data is the fruit of that labor.

STEP 4: Purpose

The purpose is to determine the effectiveness of priming in selling goods.

STEP 5: Visualize the Data

library(ggplot2)
ggplot(data=preference, mapping=aes(x=as.factor(primed), y=preference)) + geom_point() 

STEP 6: Interpret the Plot

It seems from this graph that the primed group, represented by the 1, has higher preference scores overall. We need to perform a significance test to be sure that our data is meaningful

STEP 7: Formulate the Null Hypothesis

The null hypothesis is that there is not difference between people who are primed and those who are not primed. The population means will be the same.

STEP 8: Identify Alternative

The alternative hypothesis is that there is a difference between people who are primed and who are not. The population means will be different.

STEP 9: Decide on Test

The t-test is useful to us because we our variables are quantitative.

STEP 10: Choose one or two Sample

There are two sample groups involved in this experiment, so we will be using the two-sample t-test.

STEP 11: Check Assumptions

Before we perform our t-test, we need to verify that the samples are approximately normal. If they are normal, they will appear to be approximately linear on our graph below.

ggplot(data=preference) + geom_qq(mapping=aes(sample=preference, color=as.factor(primed)))

The samples appear to be linear, and therefore normal. We can now continue with our analysis.

STEP 12: Decide on Significance

0.05 is the typical significance level for statisticians, so we will respect their wisdom and use 0.05.

STEP 13: Perform Test

t.test(formula=preference~as.factor(primed), data=preference)
## 
##  Welch Two Sample t-test
## 
## data:  preference by as.factor(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

STEP 14: Interpret P-value

The p-value is 0.002666, which is less than our level of significance of 0.05. We therefore reject the null hypothesis that the population means are equal.

STEP 15: Interpret Confidence Interval

The confidence interval is -1.577912 to -0.357543, which does not include 0. Zero is the value which could plausibly prove our null hypothesis, and therefore STEP 15 and 14 agree; we reject the null hypothesis.

STEP 16: Interpret Sample Estimates

The mean of group 1 i.e. the primed group is 2.972727 which is greater than the mean of group 0 i.e. the unprimed group. In other words, priming the subjects of this experiment did have an impact on their preference levels.

STEP 17: Conclusion

Our data all point to the conclusion that the marketing tactic of priming does have an impact on preference levels, and may have a significant impact on the perception of products by consumers.