Highlights
Question : Q1) : • Download the txt file “BikeShareTabSep.txt” and save it to your R working directory. • Assign the data to a matrix, e.g. using the.data<-as.matrix(read.table("BikeShareTabSep.txt")) • Generate a sample of 400 data using the following: my.data <- the.data [sample(1:727,400),c(1:9)] Save “my.data” to a text file titled “name-StudentID-BikeShareMyData.txt" using the following R code (NOTE: you must upload this text file with your submission). write.table(my.data,"name-StudentID-BikeShareMyData.txt") Use the sampled data (“my.data”) to answer the following questions. 1.1) Draw histograms for ‘casual users’ and ‘Humidity’ values, and comment on them. 1.2) Give the five number summary and the mean value for the ‘Casual users’ and the ‘Registered users’ separately. 1.3) Draw a parallel Box plot using the two variables; ‘Casual users’ and the ‘Registered users’. Use the answers to Q1.2 and the Boxplots to compare and comment on them. 1.4) Draw a scatterplot of ‘Temperature’ and ‘Casual users’ for the first 100 data vectors selected from the “my.data” (name the axes) and comment on them 1.5) Fit a linear regression model to the ‘temperature’ (as x) and the ‘casual users’ (as y) using the first 100 data vectors selected from the “my.data”. Write down the linear regression equation. Plot the line on the same scatter plot.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.