Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please answer all parts using R or RStudio. I will upvote! The following information relates to a sample of 15 cars regarding their model, weight

Please answer all parts using R or RStudio. I will upvote!

image text in transcribedimage text in transcribed
The following information relates to a sample of 15 cars regarding their model, weight (in 1000 lbs), number of cylinders, miles per gallon, displacement (cu.in.) and gross horsepower. model: c("Honda Civic", "AMC Javelin", "Merc 240D", "Duster 360", "Datsun 710", "Lincoln Continental", "Merc 280C", "Merc 450SLC", "Ferrari Dino", "Cadillac Fleetwood", "Ford Pantera L", "Porsche 914-2", "Fiat X1-9", "Merc 450SL", "Valiant") wgt: 1.615 3.435 3. 190 3.570 2.320 5.424 3.440 3.780 2.770 5.250 3.170 2.140 1.935 3.730 3.460 cyl: 4, 8, 4, 8, 4, 8, 6, 8, 6, 8, 8, 4, 4, 8, 6 mpg: 30.4 15.2 24.4 14.3 22.8 10.4 17.8 15.2 19.7 10.4 15.8 26.0 27.3 17.3 18.1 disp: 75.7 304.0 146.7 360.0 108.0 460.0 167.6 275.8 145.0 472.0 351.0 120.3 79.0 275.8 225.0 hp: 52 150 62 245 93 215 123 180 175 205 264 91 66 180 105(a) Read this data into six vectors-model, wgt, cyl, mpg, disp, hp. (b) Create a dataframe-dat using six vectors in (a). (c) Print fist and last two observations of the dataframe in (b) (d) Write a function to output the following quantities as a list for a vector of data. the data vector range five number summary 3 quartiles IOR (e) Using the function defined in (d), print the list of outputs for the vectors mpg and wgt. (f) Add a column vector id with values 1-15 with the dataframe dat, and print first 3 observations of the updated dataframe dat. (g) Create a new dataframe dat with observations 7-15 of the dataframe dat. (h) Create a new dataframe dat3 with 10th and 14th observations from the dataset dat removed, and print dat3. (i) Make a boxplot of the original vector mpg. What can you say about the shape of the distribution of mpg? ()) Make a boxplot of the original vector wet. What can you say about the shape of the distribution of wgt

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Wavelet Based Approximation Schemes For Singular Integral Equations

Authors: Madan Mohan Panja, Birendra Nath Mandal

1st Edition

0429534280, 9780429534287

More Books

Students also viewed these Mathematics questions

Question

=+which it operates?

Answered: 1 week ago

Question

=+How should we organize a book to maximize learning and interest

Answered: 1 week ago