Advertisement
Guest User

Untitled

a guest
Oct 22nd, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.59 KB | None | 0 0
  1. ---
  2. title: "Quiz-1"
  3. output:
  4. html_document: default
  5. pdf_document: default
  6. ---
  7.  
  8. ```{r setup, include=FALSE}
  9. knitr::opts_chunk$set(echo = TRUE)
  10. library(xlsx)
  11. library(stats)
  12. library(rJava)
  13. library(ggplot2)
  14. library(plotly)
  15. library(mosaic)
  16. setwd("C:/Users/Mehdi/Desktop/Desktop/Statistics Courses/STAT2040/Mehdi/Quizes and Exam")
  17. df <- read.xlsx("./Quiz 1.xlsx", sheetIndex = "Grades", startRow = 2)
  18. colnames(df) <- c("Student ID", "Mark")
  19. ```
  20.  
  21.  
  22. ### Follwoing is the Bar chart showing the students mark (out of 34) on Quiz-1
  23. #### Hover the mouse over the graph to explore more
  24. ```{r}
  25. ## Histogram
  26. bchart <- ggplot(data=df, aes(x = Mark)) +
  27. geom_histogram(col='blue', fill='red', bins = 30) +
  28. xlab("Mark from 34") + ggtitle("Distribution of students mark on Quiz-1")
  29. ggplotly(bchart)
  30. ```
  31.  
  32. ### Follwoing is the Box and Whisker plot showing the students mark (out of 34) on Quiz-1
  33. #### Hover the mouse over the graph to explore more
  34.  
  35. ```{r}
  36. ## Histogram
  37. box <- ggplot(df, aes(y=Mark, fill=Mark)) + geom_boxplot(fill="orange" ) +
  38. guides(fill=FALSE)
  39.  
  40.  
  41. ggplotly(box)
  42. #box <- boxplot(df$Mark, xlab = "Students Mark" ,col = "orange", horizontal = TRUE)
  43. #ggplotly(b)
  44. ```
  45.  
  46. ### Here please find the raw data and statistical measures related to this quiz.
  47. ```{r}
  48. df$Mark
  49.  
  50. favstats(df$Mark)
  51. ```
  52.  
  53. ### You can find the answer to following questions
  54. * How is your mark in comparison with the class Median?
  55. * How does your mark affect the class Mean?
  56. * What is your evaluation of the class performance on Quiz-1?
  57. * What is your plan to improve on the next Quiz? (It is coming soon, please check the course schedule)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement