| Title: “Homework 2” |
| Author: “Brandon Flores” |
| Date: “Sept. 9th, 2021” |
As you compare the four departments within this subset of Sam Houston University; one can notice much more similarities than differences.
For similarities, all four departments have relatively the same IQR's when observing Annual Salaries. The one department that is noticeably different concerning the IQR's would be the Dept. of Economics & Business. The other three are strikingly similar.
In terms of overall placement of the boxplots; all three had relatively similar first & third quartiles. Meaning that the span of each individual box on the chart were in similar positions; around alittle less than $50K & about $75K.
The medians of the boxplots for the Dept. of Population Health & Athletics is slightly to the left showing a positive skewness. While the medians of the boxplots for the Dept. of Sociology & the Dept. of Economics & Intll Business was observed to be more centered; telling of a more symmetrical distribution of the bell curve.
When controlling for all outliers amongst the departments at Sam Houston State University; all departments make relatively the same annual salary. Even though Athletics had the most outliers, and being of fairly large salaries, the majority of the department made annual salaries on the lower side of the boxplot as evident by its positive skewness. This bulk of data points due to positive skewness can also be found in the Dept. of Population Health. Finally, even though the Athletics department had some of the highest paying salaries at Sam Houston State University; the overall highest annual paying salaries belonged to the Dept. of Economics & Intl Business. As mentioned previously, all but the Dept. of Economics had relatively similar overall annual salaries.
Also with the Dept. of Economics boxplot median being placed centered that shows that the majority of faculty in this department earn about the same annual salary. Furthermore, with the IQR range the narrowest of the four departments it tells that their isn't much distance between the 1st and 3rd Quartiles for annual salary. This shortened distance between the two points indicates that not many of the faculty earn more or less than that median point; or if they do they do not earn far from that median point. One can argue that this department pays the most equal amongst its faculty in comparison with the other three departments listed.
After completing exercise three for HWK 2, I compared those excel results with the boxplot R provided from the Sam Houston Subset data. The small IQR being at $19,962 also showed itself on the boxplot with its narrowness. Even the one outlier on the lower extremity was captured at $45K. The first and third quartiles were the same at $90K & $110K resepctively. Lastly, both the lowest and the highest quartiles for the boxplot also represented that of the calculations from the excel sheet. With the lowest outlier to be examined under $60,768 & outliers to be examined that are greater than $140,616.
library(readr, quietly = TRUE)
salaries = read_csv(file = "C:\\Users\\BTP\\Desktop\\Sam Houston Salaries Subset.csv")
names(salaries) = tolower(names(salaries))
library(ggplot2)
library(ggplot2)
options(scipen=100)
ggplot(salaries, mapping = aes(x=home_organization_desc, y =annual_salary))+
geom_boxplot()+
ggtitle(label = "Distribution of Salaries by Department",
subtitle = "Selected Sam Houston Departments")+
xlab(label="Home Organizations")+
ylab(label = "Annual Salary")+
coord_flip()
