Ad Campaign

A client has come to you. There in-house data scientist has gone crazy and fled to study the social habits of monkeys in the Amazon. Unfortunately, they had just run an important study trying to determine their new ad campaign and their data scientist left before analyzing the results. All they have is a piece of paper with a table on it (see below) and a glimmer of hope.

Properly analyze the data showing your code. Then summarize the results.

## # A tibble: 18 x 5
##    Time      Audience Day   Ad    Rating
##    <chr>        <dbl> <fct> <fct>  <dbl>
##  1 Morning       1.00 Day 1 Ad 1   10.0 
##  2 Evening       2.00 Day 1 Ad 1    8.00
##  3 Afternoon     3.00 Day 1 Ad 1    9.00
##  4 Morning       4.00 Day 2 Ad 1   10.0 
##  5 Evening       5.00 Day 2 Ad 1    6.00
##  6 Afternoon     6.00 Day 2 Ad 1   10.0 
##  7 Morning       2.00 Day 1 Ad 2    9.00
##  8 Evening       3.00 Day 1 Ad 2    2.00
##  9 Afternoon     1.00 Day 1 Ad 2    5.00
## 10 Morning       5.00 Day 2 Ad 2    9.00
## 11 Evening       6.00 Day 2 Ad 2    2.00
## 12 Afternoon     4.00 Day 2 Ad 2    4.00
## 13 Morning       3.00 Day 1 Ad 3    8.00
## 14 Evening       1.00 Day 1 Ad 3    7.00
## 15 Afternoon     2.00 Day 1 Ad 3    8.00
## 16 Morning       6.00 Day 2 Ad 3    9.00
## 17 Evening       4.00 Day 2 Ad 3    8.00
## 18 Afternoon     5.00 Day 2 Ad 3    8.00

Note that days and Ad were converted to categorical and factored


Ratings per Ad

Each ad yielded significant difference in ratings with Ad 1 and 3 having the highest ratings.

Ratings per time of the day

Ads had the highest ratings during the morning and afternoon.

Ratings per Day

Ratings per day did not show any significant difference. The ANOVA test will confirm if any variance exists among ratings per day.

Note that each ad had the same amount of participants, 21 each.

##       [,1]
## FALSE   42
## TRUE    21
##       [,1]
## FALSE   42
## TRUE    21
##       [,1]
## FALSE   42
## TRUE    21

ANOVA Test

Ratings per Ad

With a high F-value and a P-value under .05, ANOVA confirms ratings differ across ads.

We reject the null hypothesis of equal means across groups.

anova(lm(Ad_Campaign$Rating~Ad_Campaign$Ad))
## Analysis of Variance Table
## 
## Response: Ad_Campaign$Rating
##                Df Sum Sq Mean Sq F value  Pr(>F)  
## Ad_Campaign$Ad  2 44.333 22.1667  5.0635 0.02088 *
## Residuals      15 65.667  4.3778                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Ratings per time of day

With a high F-value and a P-value under .05, ANOVA confirms ratings differ for each time of the day.

We reject the null hypothesis of equal means across groups.

anova(lm(Ad_Campaign$Rating~Ad_Campaign$Time))
## Analysis of Variance Table
## 
## Response: Ad_Campaign$Rating
##                  Df Sum Sq Mean Sq F value  Pr(>F)  
## Ad_Campaign$Time  2 40.333 20.1667  4.3421 0.03253 *
## Residuals        15 69.667  4.6444                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Ratings per day

With an f-value of 0 and a p-value of 1, ANOVA confirms days do not show any difference on ratings. We accept the null hypothesis of equal means across groups.

anova(lm(Ad_Campaign$Rating~Ad_Campaign$Day))
## Analysis of Variance Table
## 
## Response: Ad_Campaign$Rating
##                 Df Sum Sq Mean Sq F value Pr(>F)
## Ad_Campaign$Day  1      0   0.000       0      1
## Residuals       16    110   6.875

Ratings per ad and time of day

When combining both ad and time of day groups, variance is significant among popullation means. We Reject the null hypothesis of equal means among groups.

anova(lm(Ad_Campaign$Rating~Ad_Campaign$Ad+Ad_Campaign$Time))
## Analysis of Variance Table
## 
## Response: Ad_Campaign$Rating
##                  Df Sum Sq Mean Sq F value   Pr(>F)   
## Ad_Campaign$Ad    2 44.333 22.1667  11.375 0.001394 **
## Ad_Campaign$Time  2 40.333 20.1667  10.349 0.002048 **
## Residuals        13 25.333  1.9487                    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Conclusion:
  • Ad 1 and 3 turned out to be the most succesful, with an average rating of 9 and 8.
  • Anova proved that ratings did not differ between days.
  • all ads were played at similar times and had equal number of participats.