Question
Imagine that you are interested in understanding whether knowing the brand of car tire can help you predict whether you will get more or less
Imagine that you are interested in understanding whether knowing the brand of car tire can help you predict whether you will get more or less mileage measured in miles per gallon before you need to replace them. Suppose a random sample of 60 tires are selected from four different manufacturers (Bridgestone, Apollo, Falken, CEAT) and the mean mileage by brand groups are recorded which can be found in the file Tyre.txt (available on CourseLink).
a) [0.5 mark] You can read the data into R using the following command:
data <- read.table("your_file_directory/your_file_name.txt", header=FALSE)
For example, if I saved my dataset in C in .txt format then:
Data1 <- read.table("C:/Tyre.txt", header=FALSE) # the name of my dataset now is Data1 Note (1): OR you can read the data using
Data2 <- read.csv(file.choose())
Note (2): You need to save and read the data correctly with 60 observations not treating the first row as the title.
Note (3): Show the R code that you used to read the dataset and do not show the output (the dataset), but make sure that you read the dataset correctly.
b)[1 mark] Plot a simple boxplot (vertical) of all 60 points with a nice colour, label, and main title. By looking at the boxplot, is the assumption of normality for mileage appropriate? Note: Show the R code and the result/output.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started