Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

do all questions please thanks ! 3. (12 pts) Jack collected data on cars, shown in the table below. a) (5pts) Create the following data

image text in transcribed
do all questions please thanks !
3. (12 pts) Jack collected data on cars, shown in the table below. a) (5pts) Create the following data frame, called Mycars. Model Color MPG Miles Honda Black 22 10000 Honda White 22 12000 Toyota White 25 15000 Ford Blue 30 20000 Ford Red 30 5000 b) (7pts) Create a for loop to do the following: loop through each row of the data frame, if a car is a Japanese car (Honda or Toyota), then add 5 to the MPG number; and if a car is a U.S. car (Ford), then subtract 5 to the MPG number. 4. (6pts) Use the InsectSprays data in R. The variable count showed the number of sprays. The variable Spray showed the type of the spray. Generate a histogram to show the distribution of the variable count with 15 bins, color the border black and fill the bars with red. 5. (12pts) Use USArrests data in R. The variable Murder recorded the murder rate at the 50 states in 1973, the variable Assault showed the assault rate in 1973, the variable Rape showed the rape rate in 1973, and the variable UrbanPop showed the percent of the population living in urban area at the 50 states. Perform the following: a) (6pts) Generate an appropriate lot to show the relationship between the two variables: Murder (y) and UrbanPop (x), and fit the plot with a linear red regression line without showing the confidence interval band. Label the x axis as Urban Population, and label the y- axis as Murder Rate. b) (6pts) Generate one appropriate graph show the five-number summary of Assault. Color the inside with red

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

Bioinformatics Databases And Systems

Authors: Stanley I. Letovsky

1st Edition

1475784058, 978-1475784053

More Books

Students also viewed these Databases questions

Question

1.The difference between climate and weather?

Answered: 1 week ago

Question

1. What is Fog ?

Answered: 1 week ago

Question

How water vapour forms ?

Answered: 1 week ago

Question

What is Entrepreneur?

Answered: 1 week ago

Question

Which period is known as the chalolithic age ?

Answered: 1 week ago