Processing math: 100%

{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE)

Example 2.1 - An A/B test with 4 different advertising campaigns (this step is optional)

note: You can also perform this analysis using Excel We would like to see which campaign lead to more product sales in 2 different ways below.

```{r echo=TRUE} #now we do an analysis for a predictor with 4 different levels display <- read_csv(“ab_testing.csv”) ls(display) # list the variables in the dataset head(display)

creating the factor variable

displayAds<factor(displayAds) is.factor(displayAds) # showing the first 15 rows of the variable "Ads" displayAds[1:15]

#now we do a regression analysis for a predictor with 4 different levels summary(lm(Purchase~Ads, data = display))

## Example 2.2 -An A/B test with 4 different advertising campaigns (no dummy coding required)
```{r echo=TRUE}
#Alternatively, you can also use the factor function within the lm function, saving the step of creating the factor variable first.
summary(lm(Purchase~ factor(Ads), data = display))

Q1 Please interpret the results for the regression model in Example 2.1. Assume that you work for this company. What are the marketing implications?

Q2 Did we get the same results in Example 2.1 and Example 2.2? Which solution do you like better? Why?

Q3 Please read the following article and list at least 5 reasons R programming might add value to your career.

Reference: Understanding R programming over Excel for Data Analysis https://www.gapintelligence.com/blog/understanding-r-programming-over-excel-for-data-analysis/

Q4: Write a summary on at least one article listed in the Reference section.