R Data Analysis: Exploring mtcars Dataset
R Data Analysis: Exploring mtcars Dataset
Subject:
We consider the dataset "mtcars" available in R. This dataset contains
the measurements of several variables related to the appearance and performance of a
sample of cars (models 1973-1974):
1) Load the dataset
2)Consult the documentation of this dataset to understand its structure.
3)Display the names of the variables considered. Are there any variables?
qualitative in this dataset?
4)Display the first 6 lines of this dataset
5)Display the number of rows and columns.
6)Display the basic statistical measures using the command
summary.
7)What is the minimum number of cylinders that can be found in a
car of the studied sample
8)What is the median weight in lbs?
9)What is the average number of carburetors
10)Extract from the database:
the 5th line
(b) the 5th column,
(c) lines 1, 6, and 10 with a single command,
(e) all except the last two columns
(f) all records having a number of carburetors >1.
11)Are there any missing values in this dataset? Give
the instruction that allows to create a new dataset
corresponding to the private mtcars collection of missing values
12)We propose to study the fuel consumption expressed by the
miles per gallon, represented by the variable mpgen function of
the raw power, represented by the variable hp. Represent the cloud of
point corresponding to the help of the ggplot 2 package. Interpret
13)Can we establish a linear model to represent the relationship between the
variables mpg and hp. If so, add the linear regression line.
Interpret (Is there a strong correlation between the data?)
14)Give the equation of the line with the estimated values of the coefficients
unknowns (using the OLS method).
1
15)Evaluate the quality of the model from the graph.
16) Determine the covariance between the variables mpg and hp, Interpret.
17)Determine the correlation coefficient. Interpret.
18)Determine the coefficient of determination. Interpret.
19) Display the statistical measures for the obtained linear model.
20)Analyze the linear model on the inferential plane by interpreting the value
dep-value.