Question: Enter your name and EID here: You will submit this homework assignment as a pdf file on Gradescope. For all questions, include the R commands

Enter your name and EID here:
You will submit this homework assignment as a pdf file on Gradescope.
For all questions, include the R commands/functions that you used to find your answer (show R chunk). Answers without supporting code will not receive credit. Write full sentences to describe your findings.
Part 1
The dataset mtcars was extracted from the 1974 Motor Trend US magazine, and comprises fuel consumption and other aspects of automobile design and performance for different cars (1973-74 models). Look up the documentation for this data frame with a description of the variables by typing ?mtcars in the console pane.
Question 1: (1 pt)
Take a look at the first 6 rows of the dataset by using an R function in the code chunk below. Have you heard about any (or all) of these cars?
# your code goes below (replace this comment with something meaningul)
Your answer goes here. Write sentences in bold.
Question 2: (2 pts)
How many rows and columns are there in this data frame in total?
# your code goes below (replace this comment with something meaningul)
Your answer goes here. Write sentences in bold.
Question 3: (1 pt)
It is always a good practice to make a local copy of the dataset in your environment. Save mtcars in your environment and name it as your eid. From now on, use this new object instead of the built-in dataset.
# your code goes below (replace this comment with something meaningul)
Question 4: (2 pts)
When is your birthday? Using indexing, grab the row number of mpg that corresponds to the day of your birthday (the latter should be a number between 1 and 31).
# your code goes below (replace this comment with something meaningul)
Your answer goes here. Write sentences in bold.
Question 5: (2 pts)
Count the number of rows in the dataset where the variable mpg takes on values greater than 30.
# your code goes below (replace this comment with something meaningul)
Your answer goes here. Write sentences in bold.
Question 6: (2 pts)
Lets create a new variable called kpl which converts the fuel efficiency mpg in kilometers per liter. Knowing that 1 mpg corresponds to 0.425 kpl, what is the maximum value of kpl in the dataset?
# your code goes below (replace this comment with something meaningul)
Your answer goes here. Write sentences in bold.
Part 2
Lets quickly explore another built-in dataset: airquality which contains information about daily air quality measurements in New York, May to September 1973.
Question 7: (2 pts)
Calculate the mean Ozone (in ppb) using the mean() function. Why does it make sense to get this answer? Hint: take a look at the column Ozone in the dataset.
# your code goes below (replace this comment with something meaningul)
Your answer goes here. Write sentences in bold.
Question 8: (1 pt)
Look at the documentation for the function mean() by running ?mean in the console. What argument should be used to find the mean value that we were not able to get in the previous question? What type of values does that argument take?
Your answer goes here. Write sentences in bold.
Question 9: (2 pts)
Sometimes the R documentation does not feel complete. We wish we had more information or more examples. Find a post online (include the link) that can help you use that argument in the mean() function. Then finally find the mean ozone!
# your code goes below (replace this comment with something meaningul)
Your answer goes here. Write sentences in bold.
Part 3
The Internet clothing retailer Stitch Fix wants to develop a new model for selling clothes to people online. Their basic approach is to send people a box of 56 items of clothing and allow them to try the clothes on. Customers keep (and pay for) what they like while mailing back the remaining clothes. Stitch Fix then sends customers a new box of clothes a month later.
A critical question for Stitch Fix to consider is Which clothes should we send to each customer? Since customers do not request specific clothes, Stitch Fix has to come up with 56 items on its own that it thinks the customers will like (and therefore buy). In order to learn something about each customer, they administer an intake survey when a customer first signs up for the service. The survey has about 20 questions and the data is then used to predict what kinds of clothes customers will like. In order to use the data from the intake survey, a statistical algorithm must be built in order to process the customer data and make clothing selections.
Suppose you are in charge of building the intake survey and the algorithm for choosing clothes based on the intake survey data.
Question 10: (2 pts)
What kinds of questions do you think might be useful to ask of a customer in the intake survey in order to better choose clothes for them? Come up with 4 questions to ask customers, with 2 questions leading to numeric data and 2 questions leading to categorical data. Make sure to indicate which question is which type.
Your answer goes here.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!