This dataset pertains to colleges located in the United States, providing a comprehensive overview of various aspects and characteristics associated with these educational institutions.
College_Data <- read.csv('C:/Users/delee/Downloads/archive (1)/College_Data.csv')
hist(College_Data$PhD,
breaks = 20,
main = "Percentage of faculty members holding a Ph.D.degree",
xlab = "Faculty members with PhD",
ylab = "count",
col = "green")
The initial chart depicts a histogram showcasing the distribution of faculty members holding PhD degrees by percentage. This histogram portrays a skewed distribution, indicating that the data predominantly leans towards the right side of the scale, resulting in an asymmetrical curve.
library(ggplot2)
## Warning: package 'ggplot2' was built under R version 4.2.3
pie_chart <- ggplot(College_Data, aes(x = "", y = Private, fill = Private)) +
geom_bar(stat = "identity", width = 1) +
coord_polar(theta = "y") +
labs(title = "US Colleges Type")
pie_chart
In the subsequent graph, a pie chart illustrates whether universities are private or public, with two categories: “No” and “Yes.”
These calculation provides statistics on the percentage of professors holding a PhD degree. ### Mean
mean(College_Data$PhD)
## [1] 72.66023
median(College_Data$PhD)
## [1] 75
sd(College_Data$PhD)
## [1] 16.32815
var(College_Data$PhD)
## [1] 266.6086
summary(College_Data $ PhD)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 8.00 62.00 75.00 72.66 85.00 103.00
library(ggplot2)
ggplot(College_Data,aes(F.Undergrad,P.Undergrad))+
geom_point()+
geom_smooth(method = "lm", se=FALSE)
## `geom_smooth()` using formula = 'y ~ x'
cor.test(College_Data$F.Undergrad,College_Data$P.Undergrad)
##
## Pearson's product-moment correlation
##
## data: College_Data$F.Undergrad and College_Data$P.Undergrad
## t = 19.338, df = 775, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.5210882 0.6161228
## sample estimates:
## cor
## 0.5705122
To discern the connection between full-time and part-time students, I applied a correlation analysis.The correlation coefficient was found to be approximately 0.57, suggesting a moderate positive correlation between these two variables. The p-value, being less than the conventional significance level of 0.05, provides strong evidence against the null hypothesis that the true correlation is equal to 0. Therefore, it can be inferred that there is a significant relationship between the counts of full-time and part-time undergraduates. The 95 percent confidence interval for the correlation coefficient ranges from 0.52 to 0.62, reinforcing the reliability of the observed correlation.