Question
The headers for the data set are: The data was extracted from the 1974 Motor Trend US magazine and comprises fuel consumption and 10 aspects
The headers for the data set are: The data was extracted from the 1974 Motor Trend US magazine and comprises fuel consumption and 10 aspects of automobile design and performance for 32 automobiles (197374 models). Please code in python and comment your code
A data frame with 32 observations on 11 (numeric) variables.
[1] | mpg | Miles/(US) gallon |
[2] | cyl | Number of cylinders |
[3] | disp | Displacement (cu.in.) |
[4] | hp | Gross horsepower |
[5] | drat | Rear axle ratio |
[6] | wt | Weight (1000 lbs) |
[7] | qsec | 1/4 mile time |
[8] | vs | Engine (0 = V-shaped, 1 = straight) |
[9] | am | Transmission (0 = automatic, 1 = manual) |
[10] | gear | Number of forward gears |
[11] | carb | Number of carburetors |
- Import the dataset mtcars.csv and note if there is any missing data. Print the first 10 lines to verify upload
- Calculate the mean, media, mode and standard deviation for the mpg, number of cylinders, weight and quarter mile time
- Plot the relationship between the number of cylinders and mpg, and weight vs quarter mile time. What do the graphs indicate (ie what can you infer in these relationships)?
- Look up the 2019 specs for the Honda Accord, Toyota RAV4 and the Mazda Miata and Ford F150. Gather the same information (use average values for the headings) from the mtcars dataset for these 4 vehicles.
- Is there any information that is no longer relevant?
- How does the average mpg, quarter mile time, number of cylinders and weight for the 1974 vehicles compare to average for these 4 vehicles?
- Write a paragraph to summarize your analysis of the mtcars dataset and that observed in question 6.
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