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, their is a positive relationship between x and y. The regression line crosses points around (6,6.2), having a positive incline.

library(readr)
library(readr)
ad_sales <- read_csv('https://raw.githubusercontent.com/utjimmyx/regression/master/advertising.csv',show_col_types = FALSE)
## New names:
## • `` -> `...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, their is a positive relationship between TV advertising and sales.

library(readr)
plot(sales ~ radio, data = ad_sales)

plot (sales ~ radio, data = ad_sales, pch = 16)
abline(lm(sales ~ radio, ad_sales), col = "grey20")

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

Yes, you can plot the relationship between radio advertising and sales. it appears to have a positive linear relationship with some scattered points.

library(ggplot2)                              
ggplot(data = ad_sales, aes(x=TV)) +
  geom_histogram(binwidth=10, fill="gray")

Question 4: Are there any other kinds of exploratory analysis you can perform using R? If so, please include your analysis and results in your final report.

Yes, we can explore the expenditure relationship distributed for TV ads, through the histogram presented above we can view how much TV ad spending is being made based on the observations collected overall.

Question 5: Visit the avocado dataset available in week 2, raise one question you could possibly answer with the data, and explain how a stakeholder could benefit from your proposed analysis.

Which locations presents a highest total volume based on Avocado type? A stakeholder will want to look for the highest returning investments based on locations and values that they might present. This will help them understand the product and its current output increase in sale, helping them decide if they are wanting to invest in conventional or organic avocados.

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