-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathquiz2_data.Rmd
104 lines (72 loc) · 3.04 KB
/
quiz2_data.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
---
title: Quiz 2 Data
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(cache=TRUE)
library(tidyverse)
library(lubridate)
library(viridis)
library(zoo)
library(janitor)
library(broom)
library(ggthemes)
library(directlabels)
library(kableExtra)
library(stargazer)
library(scales)
library(ggrepel)
library(readxl)
colors_tableau10<-function()
{
return(c("#1F77B4", "#FF7F0E", "#2CA02C", "#D62728", "#9467BD", "#8C564B",
"#E377C2", "#7F7F7F", "#BCBD22", "#17BECF"))
}
class_clean<-function(){
theme_classic()+
theme(
plot.subtitle = element_text(color="grey10",size=rel(.7)),
plot.title = element_text(face="bold",size=rel(.8)),
plot.caption = element_text(color="grey50",size=rel(.5),hjust=0),
legend.title = element_text(color="grey10",size=rel(.5)),
legend.text = element_text(color="grey10",size=rel(.5)),
axis.text = element_text(size=rel(1.5)),
axis.title = element_text(size=rel(1.5)),
#panel.grid.major = element_line(size=0,colour = "black"),
#plot.margin = margin(t = .1, r = .1, b = .1, l = .1,unit= "cm"),
plot.margin = margin(t = .5, r = 1, b = .25, l = 1,unit= "cm"),
#axis.text.x = element_text(margin = margin(t = 10, r = 0, b = 0, l = 0)),
NULL)
}
```
```{r quiz_data,echo=FALSE,warnings=FALSE,include=FALSE,,cache=FALSE}
sections<- read_csv("private/eclass_import.csv") %>% select(student_id,sec)
midterm_data<-read_csv("private/quiz_2.csv") %>% clean_names()%>%select(midterm=quiz_2,student_id) %>% left_join(sections)
midterm_A1<-midterm_data %>% filter(sec=="A1")
midterm_A2<-midterm_data %>% filter(sec=="A2")
midterm_A3<-midterm_data %>% filter(sec=="A3")
```
The quiz average over all three sections was `r round(mean(midterm_data$midterm,na.rm=T),2)`/10.
The quiz averages for the individual sections were `r round(mean(midterm_A1$midterm,na.rm=T),2)`/10 for section A1, `r round(mean(midterm_A2$midterm,na.rm=T),2)`/10 for section A2 and `r round(mean(midterm_A3$midterm,na.rm=T),2)`/10 for section A3.
```{r quiz_graphs,echo=FALSE,warnings=FALSE,include=FALSE,,cache=FALSE}
all<-ggplot(midterm_data%>%filter(!is.na(midterm)),aes(midterm))+
geom_density(aes(),alpha=0.5,fill="dodgerblue")+
labs(x="Range of Scores",y="Probability Density",
title="Distribution of second quiz Scores",
caption="Kernel-smoothed so you won't necessarily find your actual grade",
fill=guide_legend(title="Section"),color=guide_legend(title="Section"))
sec<-ggplot(midterm_data%>%filter(!is.na(midterm)),aes(midterm,group=sec))+
geom_density(aes(fill=sec,colour=sec),alpha=0.5)+
labs(x="Range of Scores",y="Probability Density",
title="Distribution of midterm Scores by Section",
caption="Kernel-smoothed so you won't necessarily find your actual grade",
fill=guide_legend(title="Section"),color=guide_legend(title="Section"))
```
## Grade Distribution
```{r dist_graph,fig.width=12,fig.height=7,echo=FALSE}
all
```
## Grade Distribution By Section
```{r dist_graph_sec,fig.width=12,fig.height=7,echo=FALSE}
sec
```