title: "RStat2101: Active Learning" subtitle: "Task I - Version III" author: - Name:ZAINAB ALSINANI - ID:126589 - Section:40 date: "2024-03-23" output: html_document ---

{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE)

YAML Header

Question 1. [1 point] Edit the header of the document by stating your name, ID and section. 126589Stat2101AL1.html

Reading Dataset

Question 2. [2 points] Read the dataset `ALS2101Grade.csv' and assign it to an object called s2101_grade.

{r Answer-Q2} s2101_grade= read.csv(file = "AL_S2101_Grade.csv",header = TRUE, sep = ",") s2101_grade

Data Extraction

Question 3. [2 points] Extract the dataset of sections 10 and 40. Assign the result to an object called grade_10_40 . [Hint: use a logical statement s2101_grade$Section %in% c(10,40)]

{r Answer-Q3} grade_10_40= s2101_grade[s2101_grade$Section %in% c(10,40),] grade_10_40

Data Tabulation

Question 4. [3 points] Use grade_10_40 dataset to create a relative frequency table called grade_table of Grade variable. Print the table.

{r Answer-Q4} grade_table<-transform(table(grade_10_40$Grade)) grade_table$relative_Freq<-prop.table(grade_table$Freq) grade_table grade_table<-prop.table(grade_table$Freq) grade_table

Data Visualization

Question 5. [3 points] Use histogram with 5 breaks to graphically represent the total scores of Science students in sections 10 and 40.

```{r Answer-Q5}

gradescience<-grade1040[grade1040$College %in% c("SCI"), ] gradescience

gradescienchist<-hist(grade_science$Total, breaks= 5, xlab="Total", ylab="frequency", col= "blue", main="total scores of Science students in sections 10 and 40")

par(mfrow=c(1,2)) ## keep this to show two graphs at the same row

```

Question 6. [3 points] Customize the obtained graphs by adding meaningful title, labels and distinct colors.

```{r Answer-Q6}

gradescienchist<-hist(grade_science$Total, breaks= 5, xlab="Total", ylab="frequency", col= "Pink", main="total scores of Science students in sections 10 and 40")

```

Question 7. [2 points] Identify any patterns or differences between the two sections' grades.

The graph represent the left skewed pattern

Data Description

Question 8. [2 points] Find the five number summary for the scores of Science students in each section.

```{r Answer-Q8} grade10<-grade1040[grade1040$Section==10,] grade10sci<-grade10[grade_10$College=="SCI",] fivenum(grade10sci$Total) grade40<-grade1040[grade1040$Section==40,] grade40sci<-grade40[grade_40$College=="SCI",] fivenum(grade40sci$Total)

```

Question 9. [2 points] Interpret the third quartile value for each section.

Third quartile of section 10= 83 Third qyartile of section 40= 82