Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Use the function read.csv and name the data frame apdata. Copy and paste the following in your R script: apdata < - read.csv (

Use the function read.csv and name the data frame apdata. Copy and paste the following in your R script: apdata <- read.csv("APprediction.csv", stringsAsFactors = TRUE) apdata$ID <- as.factor(apdata$ID Note: You should not hard-code any answers in this assignment. For example, suppose Question 0 asked to find the average of 10 and 20 and store it in Q0. You should have Q0<- mean(c(10,20)) for your answer, not Q0<-15. In other words, you should be using functions (like mean) to find answers, rather than storing the values (15) themselves. The problem with hard-coding is that if the data changes, your answer will not change with it (and therefore it will be wrong). Using a function (like mean), on the other hand, will recalculate the mean regardless if the data changes. We want code that is robust to these types of issues. If your code is found to have hard-coded answers, you may receive a 0% on the assignment. Q1: Find the mean weighted GPA of the students. Assign it to Q1. Q2: Find the median weighted GPA of the students. Assign it to Q2. Q3: Find the minimum weighted GPA of the students. Assign it to Q3. Q4: Find the maximum weighted GPA of the students. Assign it to Q4. Q5: Find the range of the weighted GPA of the students. Assign it to Q5. Q6: Find the variance of the weighted GPA of the students. Assign it to Q6. Q7: Find the standard deviation of the weighted GPA of the students. Assign it to Q7. Q8: Store the summary of only the weighted GPA data and store it in Q8.(Do not store the summary of all variables!) Q9: Store the weighted GPA of the student whose data is stored in the 200th row of the data set in Q9. Q10: Convert the weighted GPA for the student in the 200th row into a z-score (standardized score). When calculating this z-score, use the vectors above which contain the statistics needed to calculate a z-score. Assign it to Q10. Q11: Find the 25th,50th, and 75th percentiles (aka quartiles) of the weighted GPAs in this data set. Assign them to Q11. For assistance, see https://www.geeksforgeeks.org/how-to-calculate-quartiles-in-r/ or this R documentation. *R script only*

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions