## Possible answers for the free response question on Test 1, Spring 2025 # 5 + 2 extra credit #(a) ga <- ggplot(data = schooldata, aes(y = math_score, x = reading_score)) ga + geom_point(aes(color = sex)) + facet_wrap(~race, nrow = 1) + geom_smooth() # 4 pts #(b) gb <- ggplot(data = schooldata, aes(x = math_score)) gb + geom_histogram(bins = 10) + labs(x = "Math score") # 5 pts #(c) schoolsmall <- schooldata %>% filter(free_lunch == 'no') %>% select(math_score, reading_score, class_type, race) %>% mutate(total_score = math_score + reading_score) # 5 pts #(d) schooldata %>% group_by(race) %>% summarize( N=n(), MeanReading = mean(reading_score) ) %>% arrange(desc(MeanReading)) # 3 rows, for the 3 races. # 3 pts #(e) Combined <- schooldata %>% inner_join(StudentNames, by=c("studentID"="studentID"))