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.
Note: this analysis was performed using the open source software R and Rstudio.
The objective of this tutorial is to explain how bivariate analysis works.This analysis can be used by marketers to make decisions about their pricing strategies, advertising strategies, and promotion stratgies among others.
Bivariate analysis is one of the simplest forms of statistical analysis. It is generally used to find out if there is a relationship between two sets of values (or two variables). That said, it usually involves the variables X and Y (statisticshowto.com).
library(readr)
segmentation <- read_csv('Group_Project_Cleaned.csv')
## Rows: 14 Columns: 20
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## chr (14): Generation, Employment, Other_Platform, Ad_Interaction_Frequency, ...
## dbl (6): ID, Rank_TikTok, Rank_Instagram, Rank_Facebook, Rank_LinkedIn, Ran...
##
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
plot(Rank_TikTok ~ Rank_Facebook, data = segmentation, pch = 16)
abline(lm(Rank_TikTok ~ Rank_Facebook, segmentation), col = "grey20")
# Simple Linear Regression (one predictor)
simple_model <- lm(Rank_TikTok ~ Rank_Facebook, data = segmentation)
simple_model
##
## Call:
## lm(formula = Rank_TikTok ~ Rank_Facebook, data = segmentation)
##
## Coefficients:
## (Intercept) Rank_Facebook
## 3.3443 -0.4754
summary(simple_model)
##
## Call:
## lm(formula = Rank_TikTok ~ Rank_Facebook, data = segmentation)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.9180 -0.9180 -0.2049 0.4508 2.0820
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.3443 0.8961 3.732 0.00286 **
## Rank_Facebook -0.4754 0.2485 -1.913 0.07992 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.038 on 12 degrees of freedom
## Multiple R-squared: 0.2337, Adjusted R-squared: 0.1698
## F-statistic: 3.659 on 1 and 12 DF, p-value: 0.07992
# Multivariate Linear Regression (three predictors)
multivariate_model <- lm(Rank_TikTok ~ Rank_Facebook + Generation + Employment, data = segmentation)
multivariate_model
##
## Call:
## lm(formula = Rank_TikTok ~ Rank_Facebook + Generation + Employment,
## data = segmentation)
##
## Coefficients:
## (Intercept) Rank_Facebook
## 3.5747 -0.4937
## GenerationMillennials (1981-1996) EmploymentYes
## 0.2025 -0.2835
summary(multivariate_model)
##
## Call:
## lm(formula = Rank_TikTok ~ Rank_Facebook + Generation + Employment,
## data = segmentation)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1.0937 -0.8101 -0.2114 0.5127 1.9063
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.5747 1.5185 2.354 0.0404 *
## Rank_Facebook -0.4937 0.3582 -1.378 0.1982
## GenerationMillennials (1981-1996) 0.2025 1.4659 0.138 0.8929
## EmploymentYes -0.2835 0.6796 -0.417 0.6853
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.126 on 10 degrees of freedom
## Multiple R-squared: 0.2485, Adjusted R-squared: 0.02303
## F-statistic: 1.102 on 3 and 10 DF, p-value: 0.3931
Bivariate Analysis Definition & Example https://www.statisticshowto.com/bivariate-analysis/#:~:text=Bivariate%20analysis%20means%20the%20analysis,the%20variables%20X%20and%20Y.
https://www.sciencedirect.com/topics/mathematics/bivariate-data