Title: “Homework 1”
Author: “Brandon Flores”
Date: “Sept. 1st, 2021”
When observing the following plots what is to be found is positive skewness with outliers stretching out the plot exceeding salary points of $200,000. To as far as over $400,000. A strong positive kurtosis is also be seen showing that the vast majority of salary positions at Sam Houston State University are at around $40,000 to $50,000 annually. A steep decline can be found after the $50,000 mark of Annual Salaries with flattening to of the plot to occur around the $150,000 mark of Annual Salaries. 

A minutely slight jump can be observed at the $200,000 mark of Annual Salaries with a more gradual decline after this point; as opposed to the extreamly steep decline observed at the $50,000 mark of Annual Salaries. When analyzing the summery plot of the salaries the median being at 55,485 is noticeably lower than the mean of the plot standing at 63,822. This again tells of the skewness to be found to the right of the plot due to the extream outlier at 456,216. With not even half of the total occupational count to be found after 200,000.
library(readr, quietly = TRUE)
salaries = read_csv(file = "C:\\Users\\BTP\\Desktop\\Sam Houston Salaries (1).csv")
names(salaries) = tolower(names(salaries))
hist(salaries$annual_salary)

library(ggplot2)
library(scales)
## 
## Attaching package: 'scales'
## The following object is masked from 'package:readr':
## 
##     col_factor
ggplot(data = salaries,mapping = aes(annual_salary))+
geom_histogram(binwidth=9379.25)+
ggtitle(label="Distribution of Annual Salaries")+
xlab(label="Annual Salaries")+ 
ylab(label = "Total Number of Faculty")+
scale_x_continuous(labels=label_dollar())

library(ggplot2)
library(scales)
options(scipen=100)
ggplot(data = salaries,mapping = aes(annual_salary, stat=..density..))+
geom_density()+
ggtitle(label="Distribution of Salaries")+
xlab(label="Annual Salaries")+
ylab(label = "Total Number of Faculty")+
scale_x_continuous(labels=label_dollar())

summary(salaries)
##  position_title     home_organization_desc annual_salary   
##  Length:2225        Length:2225            Min.   :  6012  
##  Class :character   Class :character       1st Qu.: 40950  
##  Mode  :character   Mode  :character       Median : 55485  
##                                            Mean   : 63822  
##                                            3rd Qu.: 76770  
##                                            Max.   :456216