Reference no: EM132584994
Exercises - Descriptive Statistics Through Visualisation
Question 1
Cars
Download the Cars.csv dataset from the Data Repository. This dataset contains data from over 400 vehicles from 2003. The following variables, along with their coding, are included:
Vehicle_name: Model Name
Sports: Sports car? (1 = 'yes', 0 ='no')
Sport_utility: Sports utility vehicle? (1 = 'yes', 0 ='no')
Wagon: Wagon? (1 = 'yes', 0 ='no') Minivan: Minivan? (1 = 'yes', 0 ='no') Pickup: Pickup? (1 = 'yes', 0 ='no')
All_wheel_drive: All wheel drive? (1 = 'yes', 0 ='no') Rear_wheel_drive: Rear wheel drive? (1 = 'yes', 0 ='no') Retail_price: The recommended retail price ($) Dealer_cost: The cost price for a car dealer ($) Engine_size: Engine size in litres
Cylinders: Number of cylinders (-1 = Rotary engine)
Kilowatts: Power of the engine in kilowatts. Economy_city: Kilometres per litre for city driving Economy_highway: Kilometres per litre for highway driving Weight: Curb weight of car (kg)
Wheel_base: Wheel base of car (cm)
Length: Length of car (cm)
Width: Width of car (cm)
Load this dataset into RStudio. Name the dataset Cars. Ensure factors are de?ned correctly.
Use this dataset to complete the following exercises.
Question 2
Obtain a frequency distribution for the cylinder variable. How many cars had 4 cylinders?
Question 3
What percentage of cars had 6 cylinders? (Round response to two decimal places)
Question 4
What proportion of cars had all wheel drive? (Round response to two decimal places)
Question 5
How many sports cars were in the sample?
Question 6
Create a contingency table showing the column proportions of cylinders by sports car. What proportion of sports cars have six or more cylinders? (Round answer to two decimal places)
Question 7
What proportion of non-sports cars have six or more cylinders? (Round answer to two decimal places)
Question 8
Are sports cars more likely to have 6 or more cylinders than non-sports cars?
Question 9
Create a clustered bar chart comparing the proportion of sports and non-sports car cylinder numbers. Save the plot and upload it to this exercise.
Question 10
What is the modal cylinder number for non-sports cars?
Question 11
What is the modal cylinder number for sports cars?
Question 12
Produce a dot plot of car kilowatts. Save the plot and upload to this question.
Question 13
How would you describe the shape of the kilowatts variable depicted in the dot plot?
Symmetric
Skewed to the right Skewed to the left Multi-modal
Question 14
Produce a histogram of city fuel economy with 18 bins. Save the plot and upload it to this
exercise
Question 15
How would you describe the distribution shape of the city fuel economy depicted in the
histogram?
Skewed to the left Multi-modal Symmetric
Skewed to the right
Question 16
For city fuel economy, would you expect the mean or median to be higher based on the
shape of the distribution?
About the same
Median would be higher Mean would be higher Impossible to say
Question 17
Produce a histogram of car length with 18 bins. Save the plot and upload it to this exercise.
Question 18
How would you describe the distribution shape of car length depicted in the histogram?
Skewed to the left Multi-modal Symmetric
Skewed to the right
Question 19
Create a ?ltered dataset called Cars_?ltered, with only 4 and 6 cylinder cars selected. Produce a side-by-side box plot of 4 and 6 cylinder cars on highway fuel economy. Save the
plot and upload it to this exercise.
Question 20
How many suggested outliers are present for the four cylinder cars?
Question 21
Which cylinder, 4 or 6, has the higher IQR for highway fuel economy?
Question 22
What is the median highway fuel economy for 4 cylinder cars?
Question 23
What is the mean highway fuel economy for 4 cylinder cars? (Round answer to two decimal places)
Question 24
What is the standard deviation for highway fuel economy for 4 cylinder cars? (Round answer to two decimal places)
Question 25
What is the IQR for highway fuel economy for the 6 cylinder cars?
Question 26
What is the upper fence for an outlier on highway fuel economy in the 4 cylinder cars?
Question 27
What is the range of highway fuel economy for 6 cylinder cars?
Question 28
Produce a scatter plot of city fuel economy by highway fuel economy. Save the plot and
upload it to this exercise.
Question 29
Which of the following statements best explains the relationship between city and highway fuel economy?
As highway fuel economy increases, city fuel economy tends to increase. As highway fuel economy increases, city fuel economy tends to decrease.
As there are a few outliers present, it's di?cult to determine the nature of the relationship between city and highway fuel economy.
There is no relationship between city and highway fuel economy
Question 30
Create a bar chart showing the distribution of the proportion of di?erent total car cylinders in the sample. Save the bar chart as an image and upload it to this exercise
Attachment:- Descriptive Statistics.rar