Question
The command quantile(data, probs = a) will find the 100ath percentile of the data set data. In other words, x = quantile(data, probs = 0.75)
The command quantile(data, probs = a) will find the 100ath percentile of the data set data. In other words, x = quantile(data, probs = 0.75) will find the value x in data so that 75% of other values are less than x.
(a) Find the 35th percentile of price in the mispriced_diamonds.csv data set.
(b) Use subsetting and create a new data frame called diamonds_35th that only contains diamonds with a price that is less than your answer in part (a).
(c) Find the total number of rows in the data frame diamonds_35th. (d) Verify that the number of diamonds in diamonds_35th is 35% of the number of diamonds in the original data set. Hint: The number of rows from part (c) is the number of diamonds in diamonds_35th. Find the number of diamonds in the original data set by finding the number of rows in the original data set. Hint 2: You don’t need to use a specific R command or function to find the percent, just use division, which is the forward slash / (e) Use the command write_csv to write the data frame diamonds_35th to a file. Hint: You need to load the package tidyverse (or readr) to use write_csv.
Step by Step Solution
3.56 Rating (142 Votes )
There are 3 Steps involved in it
Step: 1
a The 35th percentile of price is 3313 To find the 35th percentile of price we c...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started