You will need the R and RStudio software installed to complete this assignment. Please follow the instructions in section 1.2 of the reading to complete the installation. Complete the following requirements: The R software includes several built-in data sets. This assignment will use the Motor Trend Cars data set named mtcars. Import this data set into a new data frame called CarData, using this command: CarData <- mtcars Run the following commands, and use the results to answer the questions below: summary(CarData) sd(CarData$hp) table(CarData$cyl) str(CarData) hist(CarData$hp) Points: 60 Started on Aug 18 at 14:57Your Submission: Using results from the summary() function, what is the median value for the qsec attribute? A.14.50 B. 19.28 C. 17.71 D. 17.85 Using results from the summary() function, what is the horsepower (hp) of the most powerful vehicle in the data set? A. 146.7 B. 467.3 C. 335.0 D. 472.0 Using results from the summary() function, what is the average weight of the vehicles in the data set? A. 3.217 B. 3.325 C. 3.610 D. 3.117 Using results from the summary() function, what is the lowest fuel economy as measured in miles per gallon (mpg)? A. 10.40 B. 4.0 C. 71.10 D. 19.21 Based on the results of the standard deviation function (sd()), about how much do the horsepower (hp) values vary from the average of 146.7? A. 76.8 B. 68.6 C. 63.8 D. 72.3 Using results from the table() function, are there more 4-cylinder, 6-cylinder, or 8-cylinder vehicles (cyl attribute) in this data set? A. 4 B. 6 C. 8 D. There is the same number of 4- and 8-cylinder vehicles in the data set. Using results from the table () function, which is the least common engine size as measured by the number of cylinders (cyl attribute)? A. 4 B. 6 C. 8 D. 4- and 6-cylinder engines appear the same number of times in the data set. Using results from the str() function, what is the data type of the drat attribute? A. str B. num C. chr D. dec Using results from the hist() function, which horsepower (hp) range has the largest number of vehicles? A. 50–100 B. 100–150 C. 150–200 D. 200–250 Using results from the hist() function, are there any vehicles with more than 250 horsepower? A. No. B. Yes, there is one. C. Yes, there are four. D. Yes, there are two.
SQL
SQL stands for Structured Query Language, is a form of communication that uses queries structured in a specific format to store, manage & retrieve data from a relational database.
Queries
A query is a type of computer programming language that is used to retrieve data from a database. Databases are useful in a variety of ways. They enable the retrieval of records or parts of records, as well as the performance of various calculations prior to displaying the results. A search query is one type of query that many people perform several times per day. A search query is executed every time you use a search engine to find something. When you press the Enter key, the keywords are sent to the search engine, where they are processed by an algorithm that retrieves related results from the search index. Your query's results are displayed on a search engine results page, or SER.
You will need the R and RStudio software installed to complete this assignment. Please follow the instructions in section 1.2 of the reading to complete the installation. Complete the following requirements: The R software includes several built-in data sets. This assignment will use the Motor Trend Cars data set named mtcars. Import this data set into a new data frame called CarData, using this command: CarData <- mtcars Run the following commands, and use the results to answer the questions below: summary(CarData) sd(CarData$hp) table(CarData$cyl) str(CarData) hist(CarData$hp) Points: 60 Started on Aug 18 at 14:57Your Submission: Using results from the summary() function, what is the median value for the qsec attribute? A.14.50 B. 19.28 C. 17.71 D. 17.85 Using results from the summary() function, what is the horsepower (hp) of the most powerful vehicle in the data set? A. 146.7 B. 467.3 C. 335.0 D. 472.0 Using results from the summary() function, what is the average weight of the vehicles in the data set? A. 3.217 B. 3.325 C. 3.610 D. 3.117 Using results from the summary() function, what is the lowest fuel economy as measured in miles per gallon (mpg)? A. 10.40 B. 4.0 C. 71.10 D. 19.21 Based on the results of the standard deviation function (sd()), about how much do the horsepower (hp) values vary from the average of 146.7? A. 76.8 B. 68.6 C. 63.8 D. 72.3 Using results from the table() function, are there more 4-cylinder, 6-cylinder, or 8-cylinder vehicles (cyl attribute) in this data set? A. 4 B. 6 C. 8 D. There is the same number of 4- and 8-cylinder vehicles in the data set. Using results from the table () function, which is the least common engine size as measured by the number of cylinders (cyl attribute)? A. 4 B. 6 C. 8 D. 4- and 6-cylinder engines appear the same number of times in the data set. Using results from the str() function, what is the data type of the drat attribute? A. str B. num C. chr D. dec Using results from the hist() function, which horsepower (hp) range has the largest number of vehicles? A. 50–100 B. 100–150 C. 150–200 D. 200–250 Using results from the hist() function, are there any vehicles with more than 250 horsepower? A. No. B. Yes, there is one. C. Yes, there are four. D. Yes, there are two.
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 8 images