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 commandsfunctions 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
The dataset mtcars was extracted from the Motor Trend US magazine, and comprises fuel consumption and other aspects of automobile design and performance for different cars models Look up the documentation for this data frame with a description of the variables by typing mtcars in the console pane.
Question : pt
Take a look at the first 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 : 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 : 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 builtin dataset.
# your code goes below replace this comment with something meaningul
Question : 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 and
# your code goes below replace this comment with something meaningul
Your answer goes here. Write sentences in bold.
Question : pts
Count the number of rows in the dataset where the variable mpg takes on values greater than
# your code goes below replace this comment with something meaningul
Your answer goes here. Write sentences in bold.
Question : pts
Lets create a new variable called kpl which converts the fuel efficiency mpg in kilometers per liter. Knowing that mpg corresponds to 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
Lets quickly explore another builtin dataset: airquality which contains information about daily air quality measurements in New York, May to September
Question : 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 : 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 : 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
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 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 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 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 : 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 questions to ask customers, with questions leading to numeric data and 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
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
