title: “Bivariate analysis for marketing managers” author: “zhenning Jimmy xu, follow me on Twitter: https://twitter.com/MKTJimmyxu” date: “10/24/2020” output: html_document editor_options: chunk_output_type: console —

R Markdown

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.

Objective

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).

Dataset - We will be using two online datasets available in R for this tutorial

plot(y3 ~ x2, data = anscombe, pch = 16)
abline(lm(y3 ~ x3, anscombe), col = "grey20")

### Question 1:Is there a relationship between x and y? If so, how does the relationship look like?

There seems to be a positive correlation between x and y. The scatter plots seem to be moving upwards to the right.

library(readr)
library(readr)
ad_sales <- read_csv('https://raw.githubusercontent.com/utjimmyx/regression/master/advertising.csv')
## Warning: Missing column names filled in: 'X1' [1]
## Warning: Duplicated column names deduplicated: 'X1' => 'X1_1' [2]
## 
## ── Column specification ────────────────────────────────────────────────────────
## cols(
##   X1 = col_double(),
##   X1_1 = col_double(),
##   TV = col_double(),
##   radio = col_double(),
##   newspaper = col_double(),
##   sales = col_double()
## )
plot(sales ~ TV, data = ad_sales)

Question 2:Is there a relationship between TV advertising and Sales? If so, how does the relationship look like?

There seems to be a positive correlation between TV advertising and Sales.

Question 3:Can you plot the relationship between TV advertising and Sales? If so, how does the relationship look like?

The graph shows that the scatterplots are moving upwards. Meaning that sales are going up as a result of larger amount of TV advertising.

###Question 4:Three things you learned from this tutorial ### (1)Further understand how bivariate analysis works. (2)More information on scatterplots. (3)Relationship between Sales and TV Advertising.

References

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