Chapter 1 Exercises

Tagged: ,

Viewing 2 reply threads
  • Author
    Posts
    • #78
      Tony
      Keymaster

      Post here your solutions to exercises from Chapter 1. Include the exercise number and text. Make sure your code is reproducible.

    • #80
      Tony
      Keymaster

      1. Find descriptive statistics for the age variable using dstudy(). What is the mean age? What is the largest age recorded in the PISA data set? Confirm these results using the base functions mean() and max().

      library("epmr")
      dstudy(PISA09$age)
      mean(PISA09$age)
      max(PISA09$age)
      • This reply was modified 6 years, 3 months ago by Tony.
    • #85
      Tony
      Keymaster

      2. Report the frequency distribution as a table for PISA09$grade. What proportion of students are in 10th grade?

      grade_tab <- table(epmr::PISA09$grade)
      round(grade_tab / sum(grade_tab), 2)
Viewing 2 reply threads
  • You must be logged in to reply to this topic.