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('customer_segmentation (4).csv')
## Rows: 22 Columns: 15
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## dbl (15): ID, CS_helpful, Recommend, Come_again, All_Products, Profesionalis...
##
## ℹ 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(Recommend ~ CS_helpful, data = segmentation, pch = 16)
abline(lm(Recommend ~ CS_helpful, segmentation), col = "grey20")
# Simple Linear Regression (one predictor)
simple_model <- lm(Recommend ~ CS_helpful, data = segmentation)
simple_model
##
## Call:
## lm(formula = Recommend ~ CS_helpful, data = segmentation)
##
## Coefficients:
## (Intercept) CS_helpful
## 0.6345 0.4297
summary(simple_model)
##
## Call:
## lm(formula = Recommend ~ CS_helpful, data = segmentation)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.92369 -0.38655 -0.06426 -0.06426 1.50602
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.6345 0.2998 2.116 0.0471 *
## CS_helpful 0.4297 0.1718 2.501 0.0212 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.578 on 20 degrees of freedom
## Multiple R-squared: 0.2382, Adjusted R-squared: 0.2001
## F-statistic: 6.255 on 1 and 20 DF, p-value: 0.02119
# multivarite Linear Regression (three predictors)
multivarite_model <- lm(Recommend ~ CS_helpful + Education + Age, data = segmentation)
multivarite_model
##
## Call:
## lm(formula = Recommend ~ CS_helpful + Education + Age, data = segmentation)
##
## Coefficients:
## (Intercept) CS_helpful Education Age
## 0.68118 0.41135 0.04729 -0.06839
summary(multivarite_model)
##
## Call:
## lm(formula = Recommend ~ CS_helpful + Education + Age, data = segmentation)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.87301 -0.29170 -0.05539 -0.00303 1.49105
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.68118 0.58885 1.157 0.2625
## CS_helpful 0.41135 0.18358 2.241 0.0379 *
## Education 0.04729 0.08660 0.546 0.5917
## Age -0.06839 0.19255 -0.355 0.7266
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.6038 on 18 degrees of freedom
## Multiple R-squared: 0.252, Adjusted R-squared: 0.1273
## F-statistic: 2.021 on 3 and 18 DF, p-value: 0.147
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