## ## female male ## 109 91 There is more female than males in this data set, but the distribution is more even than with the races of students. ggplot(Highschoolandbeyond, aes(x=gender)) + geom_bar(fill ="yellow") Student’s School Type table(Highschoolandbeyond$schtyp) ## ## private public ## 32 168 The majority of students in this data type go to public school rather than private school. ggplot(Highschoolandbeyond, aes(x=schtyp)) + geom_bar(fill ="pink") School Type Vs. Race table(Highschoolandbeyond$schtyp, Highschoolandbeyond$race) ## ## african american asian hispanic white ## private 2 1 2 27 ## public 18 10 22 118 prop.table(table(Highschoolandbeyond$schtyp, Highschoolandbeyond$race)) ## ## african american asian hispanic white ## private 0.010 0.005 0.010 0.135 ## public 0.090 0.050 0.110 0.590 ggplot(Highschoolandbeyond, aes(x=schtyp, fill=race)) + geom_bar(position = "dodge") The graph shows that most of the students are in public school with many of them being caucasian. School Type Vs. Gender table(Highschoolandbeyond$schtyp, Highschoolandbeyond$gender)
## ## female male ## 109 91 There is more female than males in this data set, but the distribution is more even than with the races of students. ggplot(Highschoolandbeyond, aes(x=gender)) + geom_bar(fill ="yellow") Student’s School Type table(Highschoolandbeyond$schtyp) ## ## private public ## 32 168 The majority of students in this data type go to public school rather than private school. ggplot(Highschoolandbeyond, aes(x=schtyp)) + geom_bar(fill ="pink") School Type Vs. Race table(Highschoolandbeyond$schtyp, Highschoolandbeyond$race) ## ## african american asian hispanic white ## private 2 1 2 27 ## public 18 10 22 118 prop.table(table(Highschoolandbeyond$schtyp, Highschoolandbeyond$race)) ## ## african american asian hispanic white ## private 0.010 0.005 0.010 0.135 ## public 0.090 0.050 0.110 0.590 ggplot(Highschoolandbeyond, aes(x=schtyp, fill=race)) + geom_bar(position = "dodge") The graph shows that most of the students are in public school with many of them being caucasian. School Type Vs. Gender table(Highschoolandbeyond$schtyp, Highschoolandbeyond$gender)