MLB Revenue Per Team in the Millions

MLB <- read.csv("MLB Rev.csv")
library(ggplot2)

State GDP and average disposable Income per person in every state

StatesGDP <- read.csv("states gdp.csv")
StatesGDP <- StatesGDP[,c(1,2,5)]
StatesGDP$Disposable.income <- as.numeric(StatesGDP$Disposable.income)
StatesGDP$GDP <- as.numeric(StatesGDP$GDP)

Now merging all of the data together

MLB.Rev <- data.frame(merge(StatesGDP,MLB))
MLB.Rev$GDP <- as.numeric(MLB.Rev$GDP)
plot <- ggplot(MLB.Rev,aes(Revenue,GDP))
plot + geom_point(aes(size=Wins,color=Disposable.income)) + geom_smooth(method="lm")

This plot shows that the higher a states GDP is and the more disposable income the people have will usually have an effect on the level of revenue the team has. This will also go for multiple teams in the same state the higher the GDP and Disposable in the more the teams profits. This data does not take in account for a team that is just horrible and thats the reason they have such a low team revenue.

out <- lm(formula = GDP ~ Wins + Revenue + Disposable.income,data=MLB.Rev)
summary(out)
## 
## Call:
## lm(formula = GDP ~ Wins + Revenue + Disposable.income, data = MLB.Rev)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -701114 -490713 -220757  285668 1475174 
## 
## Coefficients:
##                     Estimate Std. Error t value Pr(>|t|)
## (Intercept)        217530.42 1628936.38   0.134    0.895
## Wins                -6748.61   10427.88  -0.647    0.523
## Revenue              2793.19    1963.70   1.422    0.167
## Disposable.income      10.66      35.70   0.299    0.768
## 
## Residual standard error: 643200 on 26 degrees of freedom
## Multiple R-squared:  0.1177, Adjusted R-squared:  0.01593 
## F-statistic: 1.156 on 3 and 26 DF,  p-value: 0.3452

This is stating that every time the team wins a game that the States GDP will go decrease by $6,748.61, this also states that for every dollar increase in revenue that state GDP will go up $2,793.19 and for every dollar disposable income goes up States GDP goes up $10.66 all shown to be statistical insignificant.

library(lmtest)
## Loading required package: zoo
## 
## Attaching package: 'zoo'
## 
## The following objects are masked from 'package:base':
## 
##     as.Date, as.Date.numeric
bptest(out)
## 
##  studentized Breusch-Pagan test
## 
## data:  out
## BP = 2.9485, df = 3, p-value = 0.3996

This shows homoskedasticity, proving that the null hypothesis is relativaly true.