In this assignment, you will use data from the Midterm Exam in the Fall Semester of 2023. The data file is named “Data205_2023Fall_Midterm.csv” as you can see in this RStudio Cloud project. There are two variables in this data set.
The “lab” variable shows which DATA 205 Lab each student is attending. There are three labs: A, B, and D.
The “midterm” variable shows each student’s midterm exam score, which has been rescaled between 0 to 100 points.
Here is the R code to import the data:
df <- read.csv("Data205_2023Fall_Midterm.csv")
df
## lab midterm
## 1 D 77
## 2 D 63
## 3 D 60
## 4 A 37
## 5 D 47
## 6 B 73
## 7 A 53
## 8 D 57
## 9 B 40
## 10 B 50
## 11 A 30
## 12 B 73
## 13 D 70
## 14 D 53
## 15 A 57
## 16 A 67
## 17 A 87
## 18 A 43
## 19 A 67
## 20 B 57
## 21 A 37
## 22 D 63
## 23 B 60
## 24 B 50
## 25 A 73
## 26 A 47
## 27 D 60
## 28 B 53
## 29 A 60
## 30 B 57
## 31 A 30
## 32 B 60
## 33 B 70
## 34 D 60
## 35 D 53
## 36 D 40
## 37 A 60
## 38 D 60
## 39 D 67
## 40 B 47
## 41 A 40
## 42 A 33
## 43 B 37
## 44 B 57
## 45 D 73
## 46 D 80
## 47 D 50
## 48 B 57
## 49 A 57
## 50 B 60
## 51 B 63
## 52 A 63
## 53 D 60
## 54 D 83
## 55 D 37
## 56 D 20
## 57 A 80
## 58 B 53
Write R code below to find out:
Note that in addition to show your R code and output, you also need to explicitly report the number of students, the mean, and the median in words/text. Otherwise, you will only receive partial credits.
## Start your R code in the next line
"1. the number of studens who took the midterm is 58"
## [1] "1. the number of studens who took the midterm is 58"
"2. The mean of the exam scores is 53.96 "
## [1] "2. The mean of the exam scores is 53.96 "
"3. Thw median of the exam scores is 57"
## [1] "3. Thw median of the exam scores is 57"
Write R code here to create a histogram of the exam scores.
## Start your R code in the next line
hist(df$midterm)
Write R code to create boxplots of the midterm scores for students in different Labs (2 points).
## Start your R code in the next line
boxplot(df$midterm ~df$lab)
Based on the boxplots, do you think whether or not there is any difference in students’ midterm exam scores across the three Labs? (2 point).
"Yes, I believe there is a difference in students midterm exam scores because B has the lowest space in between the boxplot while the others are higher"
## [1] "Yes, I believe there is a difference in students midterm exam scores because B has the lowest space in between the boxplot while the others are higher"
Please knit your Markdown document into a HTML file and publish it on RPubs (see Lab 5 slides), and submit the link to your published webpage on the Blackboard.