Research Question

How do different versions of the website (mobile and desktop) and variations in background color (dark, light, grey) impact customer buy rate, considering age and gender differences?

Hypotheses

H1: Website version (mobile vs. desktop) has a significant effect on customer buy rate.

H2: Background color (dark, light, grey) has a significant effect on customer buy rate.

H3: There is an interaction effect between website version and background color on customer buy rate.

H4: Age and gender significantly influence buy rate.

library(readxl)
data <- read_excel("DMdata-1.xlsx")
head(data)
## # A tibble: 6 × 13
##   Gender Age   Race  Job   Website_type Background_color Income Digital_literacy
##   <chr>  <chr> <chr> <chr> <chr>        <chr>             <dbl>            <dbl>
## 1 Female 40~49 White Mana… Desktop      Light             50000                7
## 2 Female 18~29 White Engi… Desktop      Light             50000                4
## 3 Female 18~29 White Engi… Desktop      Light             50000                5
## 4 Female 50~59 White Mana… Desktop      Light             50000                5
## 5 Female 18~29 White Mana… Desktop      Light             50000                6
## 6 Female 30~39 Afri… Sales Desktop      Light             50000                4
## # ℹ 5 more variables: Click_through_rate <dbl>, Open_rates <dbl>,
## #   Typical_open_time <dbl>, Frequency_of_views <dbl>, Buy_rate <dbl>
summary(data)
##     Gender              Age                Race               Job           
##  Length:513         Length:513         Length:513         Length:513        
##  Class :character   Class :character   Class :character   Class :character  
##  Mode  :character   Mode  :character   Mode  :character   Mode  :character  
##                                                                             
##                                                                             
##                                                                             
##  Website_type       Background_color       Income       Digital_literacy
##  Length:513         Length:513         Min.   :  3000   Min.   :1.000   
##  Class :character   Class :character   1st Qu.: 35000   1st Qu.:5.000   
##  Mode  :character   Mode  :character   Median : 50000   Median :6.000   
##                                        Mean   : 76936   Mean   :5.678   
##                                        3rd Qu.: 75000   3rd Qu.:6.000   
##                                        Max.   :950000   Max.   :7.000   
##  Click_through_rate   Open_rates    Typical_open_time Frequency_of_views
##  Min.   : 3.32      Min.   : 7.17   Min.   : 3.00     Min.   : 15.0     
##  1st Qu.:16.60      1st Qu.:35.85   1st Qu.:15.00     1st Qu.: 75.0     
##  Median :19.92      Median :43.02   Median :18.00     Median : 90.0     
##  Mean   :18.72      Mean   :41.23   Mean   :17.01     Mean   : 80.5     
##  3rd Qu.:19.92      3rd Qu.:50.19   3rd Qu.:21.00     3rd Qu.: 90.0     
##  Max.   :23.24      Max.   :50.19   Max.   :21.00     Max.   :105.0     
##     Buy_rate    
##  Min.   :2.000  
##  1st Qu.:5.000  
##  Median :6.000  
##  Mean   :5.655  
##  3rd Qu.:6.500  
##  Max.   :7.000
sum(is.na(data))
## [1] 0
data$Website_type <- factor(data$Website_type, levels = c("Desktop", "Mobile"))
data$Background_color <- factor(data$Background_color, levels = c("Dark", "Light", "Grey"))
data$Gender <- factor(data$Gender, levels = c("Male", "Female"))
data$Age_Group <- ifelse(data$Age >= 40, "40 and above", "Below 40")
data$Age_Group <- factor(data$Age_Group)

data$Buy_rate <- as.numeric(data$Buy_rate)

library(ggplot2)
## Warning: package 'ggplot2' was built under R version 4.3.2
ggplot(data, aes(x = Website_type, y = Buy_rate, fill = Background_color)) +
  geom_boxplot() +
  facet_grid(. ~ Gender) +
  labs(title = "Buy Rate by Website Type and Background Color", x = "Website Type", y = "Buy Rate") +
  theme_minimal()

anova_model <- aov(Buy_rate ~ Website_type * Background_color + Age_Group + Gender, data = data)
summary(anova_model)
##                   Df Sum Sq Mean Sq F value Pr(>F)  
## Website_type       1    3.7   3.742   4.107 0.0432 *
## Background_color   2    2.6   1.284   1.409 0.2454  
## Age_Group          1    0.5   0.478   0.525 0.4691  
## Gender             1    2.2   2.210   2.425 0.1200  
## Residuals        507  461.9   0.911                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
interaction.plot(data$Website_type, data$Background_color, data$Buy_rate, col = c("red", "blue", "green"))

Interpretation of ANOVA Results

Website Type: The p-value for Website_type is 0.0432, which is less than 0.05. This indicates that the type of website (desktop vs. mobile) has a statistically significant effect on customer buy rate. Customers may have different buying behaviors depending on whether they are using the desktop or mobile version of the website.

Background Color: The p-value for Background_color is 0.2454, which is higher than 0.05. This suggests that background color does not have a statistically significant effect on buy rate. This implies that variations in background color (dark, light, grey) are not likely to impact the likelihood of a purchase.

Age Group: The p-value for Age_Group is 0.4691, which is also higher than 0.05. This indicates that the age group (40 and above vs. below 40) does not significantly influence buy rate in this scenario.

Gender: The p-value for Gender is 0.1200, which is above 0.05, suggesting that gender does not have a statistically significant effect on buy rate. While there may be some differences between male and female customers, they are not strong enough to be considered significant in this analysis.

Residuals: The residuals show the variability in the data that is not explained by the factors considered in the model.

Interaction Plot

The interaction plot between Website_type and Background_color shows how buy rate varies across different combinations of these factors. If the lines in the interaction plot cross or deviate significantly, it indicates a potential interaction effect. In this case, the lines are relatively parallel, suggesting that there is no strong interaction between website type and background color on buy rate.

Summary of Findings

Website Type Matters: The type of website (desktop vs. mobile) significantly impacts customer buy rate. This finding suggests that the company should carefully consider the design and functionality of each platform when planning its digital strategy.

Background Color is Insignificant: The choice of background color (dark, light, grey) does not significantly influence the buy rate. Therefore, the company can focus more on other design elements rather than worrying too much about background color.

Age and Gender Are Not Major Factors: Neither age group nor gender significantly affects buy rate in this context. Although these factors are relevant in the context of farsightedness, they do not show significant effects on purchase behavior in this analysis.

Recommendations

Focus on Website Optimization: Since the website type is significant, the company should ensure that both the desktop and mobile versions of the site are optimized for user experience, with a particular emphasis on the platform that shows higher buy rates.

Design Flexibility for Background Color: Given the lack of significance in background color, the company can maintain flexibility in choosing background colors based on aesthetic preferences or branding guidelines without worrying about adverse effects on sales.

Targeting Strategies: Although age and gender did not show significant effects here, they should not be entirely disregarded. These factors might still play a role when segmented with other variables, or in a broader marketing strategy.