Materials for ICOTS 11 Session on Favorite Car Activities
Send comments to rlock@stlawu.edu
Project/Activity handouts (as Word documents)
- Car Correlation Exploration – class handout for an activity letting students explore correlations for relationships between variables measured for new car models.
- Simple Linear Regression Project – using car ages to predict prices
- Multiple Linear Regression Project – using age, mileage, and second order models to predict car prices
- Analysis of Variance Project – comparing mean price between four car models
- Analysis of Covariance Class Example – comparing mean price between four car models after accounting for ages
Datasets (as .csv files)
- Cars2020.csv - data for 110 new car models (in 2020) from the textbook Statistics: UnLocking the Power of Data
- Forester.csv – data for a sample of 50 Subaru Forester sampled near zip code 94566 (Pleasanton, California) as used in the two regression projects
- FourCarModels.csv – data for 50 samples each of Toyota Camry, Honda CRV, Subaru Outback, and Volkswagen Jetta as used in the ANOVA project
- FourCars.csv – data for 50 samples each of Audi, BMW, Mercedes, and Yukon, for use with the ANCOVA example
RMarkdown documents
- GradeProject1.Rmd Rmarkdown file to process a one-page “key” for the simple linear regression calculations for a student’s car data. Edit the path and “Mystudent.csv”, then knit to produce the key for that student. Requires the WordforProject1.docx file as a template.
- GradeProject2.Rmd Rmarkdown file to process a “key” for the multiple regression calculations for a student’s car data. Edit the source path to the R script with the slunova() function, the path to the student data files, and “Mystudent.csv”, then knit to produce the key for that student.
- GradeProject5.Rmd – Rmarkdown file to process a “key” for the ANOVA project. Uses a file called Project5Groups.csv which has a row for each student listing the names of the four students whose cars they will compare and the name of each of the four car models.
- ReadAllModels.Rmd – Rmarkdown file to read car data from all students, find the mean and standard deviation for each student’s model, and produce boxplots of the price distribution for each model. These are useful to select sets of four car models for each student that may show some differences in means, but not extremely so, and have similar variability. It uses a file called Project5Names.csv which has two columns, the first has the name or each student (assuming the student datasets are stored as studentname.csv) and a second column identifying the car model. Use distinct names (like CamryA and CamrB) to avoid duplicate model names.
Other files
- WordforProject1.docx – a template for output of a key for the simple linear regression project. To be used as a template for the GradeProject1.Rmd rmarkdown file.
- slunova.R – an R script that defines the slunova() function used for ANOVA output in GradeProject2.Rmd.
- Project5Names.csv - an example of a file with student names and files for the ANOVA project to use with ReadAllModels.Rmd.
- Project5Groups.csv – an example of the file with group assignments for each student for the ANOVA project to use in GradeProject5.Rmd.
Web link
Used Car Price Sampler: http://myslu.stlawu.edu/~clee/dataset/autotrader