This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
summary(cars)
## speed dist
## Min. : 4.0 Min. : 2.00
## 1st Qu.:12.0 1st Qu.: 26.00
## Median :15.0 Median : 36.00
## Mean :15.4 Mean : 42.98
## 3rd Qu.:19.0 3rd Qu.: 56.00
## Max. :25.0 Max. :120.00
install.packages(“readr”) library(readr) data <- read_csv(“ab_testing1.csv”) ls(data) head(data)
data\(Ads <- factor(data\)Ads) is.factor(data$Ads)
summary(lm(Purchase~Ads, data = data))
cols(ads = col_double(), Purchases = col_double())
display <- read_csv(“ab_testing1.csv”) ls(display) head(display)
display\(Ads <- factor(display\)Ads) is.factor(display$Ads)
summary(lm(Purchase~Ads, data = display))
Hypothesis: I believe that Ad 0 will generate the least number of sales because no ad i shown to the group for ad 0. I also think Ad 2 will generate the most since it’s the second ad the company is showing. I think ad 1 will be in the middle, it will generate sales but not as much as Ad 2.
Outcomes: Ad=1 generated the most sales from the targeted group, Ad=1 had a Std. of 69.71 Ad=2 generated less sales than ad=1 with a Std. of 24.75. There were not as many purchases from the group after watching ad=2 Ad=0 generated the least number of sales.
My hypothesis was partially correct.
Recommendation: Judging by the data I would suggest that the company uses Ad=1 since it produces the greatest number of purchases. When marketing products the company should stick with Ad=1 to maximize purchase volume.
You can also embed plots, for example:
Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.