The objective of this tutorial is to explain how bivariate analysis works. This analysis can be used by marketers to make decisions about pricing, advertising, and promotion strategies.
Bivariate analysis examines the relationship between two variables, usually referred to as X and Y.
plot(y3 ~ x2, data = anscombe, pch = 16)
abline(lm(y3 ~ x2, anscombe), col = "grey20")
Based on the scatterplot, there is a relationship between x and y. The relationship appears to be positive and roughly linear, meaning that as x increases, y also increases. However, the data shows some variation, so the relationship is not perfectly consistent.
library(readr)
ad_sales <- read_csv('https://raw.githubusercontent.com/utjimmyx/regression/master/advertising.csv')
## `curl` package not installed, falling back to using `url()`
## 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.
plot(sales ~ TV, data = ad_sales)
abline(lm(sales ~ TV, data = ad_sales), col = "red")
Yes, there is a strong relationship between TV advertising and sales. The relationship is positive and mostly linear. As TV advertising increases, sales also increase. The points in the scatterplot follow an upward trend, showing that TV advertising is very effective in influencing sales.
plot(sales ~ radio, data = ad_sales)
abline(lm(sales ~ radio, data = ad_sales), col = "blue")
The relationship between radio advertising and sales is positive, but it is weaker than the relationship between TV advertising and sales. The points are more spread out, which means the relationship is less consistent. This shows that radio advertising has an effect, but it is not as strong as TV advertising.
Bivariate Analysis Definition & Example
https://www.statisticshowto.com/bivariate-analysis/
https://www.sciencedirect.com/topics/mathematics/bivariate-data