“Bivariate analysis for marketing managers”

“Jimena Carrillo Gomez”, “follow me on Twitter: https://twitter.com/MKTJimmyxu

“02/04/2026”

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, what does the relationship look like?

Yes, there is a relationship between X and Y. The relationship is positive and as X increases, Y will also increase. When plotted, the data shows an upward trend that looks linear, implying a consistent connection between the two variables rather than a random pattern.

library(readr)
library(readr)
ad_sales <- read_csv('https://raw.githubusercontent.com/utjimmyx/regression/master/advertising.csv')
## New names:
## Rows: 200 Columns: 6
## ── Column specification
## ──────────────────────────────────────────────────────── Delimiter: "," dbl
## (6): ...1, X1, TV, radio, newspaper, sales
## ℹ 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.
## • `` -> `...1`
plot(sales ~ TV, data = ad_sales)

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

Yes, there is a relationship between TV advertising and Sales. From the bivariate analysis, the relationship looks strong and positive. As TV advertising spending increases, Sales will also increase. The points follow an upwards and linear pattern, which implies that TV advertising is the driver of Sales compared to other advertising channels.

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

Yes, the relationship between radio advertising and sales can be plotted using a scatterplot in R. When plotted, the relationship shows a moderate postive result. When radio advertising spending increased, sales will also increase. The points are more spread out compared to TV advertising. This shows that radio ads have an impact on sales, but not too consistent.

###Question 4: Three things you learned from this tutorial.

From the tutorial, I learned how to use R in order to perform bivaraite analysis by creating scatterplots, how exploratory analysis can help guide decisions about which variables are the most useful for modeling, and how to interpret the strength and direction of relationshops between two varaibles.

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