🌍 All Study Guides📊 Dashboard📰 Blog💡 About
Google Data Analytics Professional Certificate • STUDY MODE

PRACTICE QUIZ

QUESTION 1 OF 45

A data analyst is considering using tibbles instead of basic data frames. What are some of the limitations of tibbles? Select all that apply.

A
Tibbles can overload a console
B
Tibbles won’t automatically change the names of variablesCorrect Answer
C
Tibbles can never create row namesCorrect Answer
D
Tibbles can never change the input type of the dataCorrect Answer
QUESTION 2 OF 45

A data analyst is working with a data frame called salary_data. They want to create a new column named hourly_salary that includes data from the wages column divided by 40. What code chunk lets the analyst create the hourly_salarycolumn?

A
mutate(salary_data, hourly_salary = wages * 40)
B
mutate(hourly_salary, salary_data = wages / 40)
C
mutate(hourly_salary = wages / 40)
D
mutate(salary_data, hourly_salary = wages / 40)Correct Answer
QUESTION 3 OF 45

A data analyst is working with a data frame named weather. It has separate columns for temperatures (temp) and measurement units (unit). The analyst wants to combine the two columns into a single column called display_temp, with the temperature and unit separated by the string “ Degrees “. What code chunk lets the analyst create the display_temp column?

A
unite(" Degrees ", weather, temp, "display_temp")
B
unite(weather, "display_temp", weather, temp, sep = " Degrees ")Correct Answer
C
weather %>% unite(" Degrees ", weather, temp, "display_temp")
D
weather %>% unite(weather, "display_temp", weather, temp, delim = " Degrees ")
QUESTION 4 OF 45

In R, which statistical measure can help you understand the spread of values in a dataset and describe how far each value is from the mean?

A
Maximum
B
Average
C
Standard deviationCorrect Answer
D
Correlation
QUESTION 5 OF 45

A data scientist is trying to print a data frame but when you print the data frame to the console output produces too many rows and columns to be readable. What could they use instead of a data frame to make printing more readable?

A
A list
B
A tibbleCorrect Answer
C
A vector
D
A structure
QUESTION 6 OF 45

A data analyst is working with a large data frame. It contains so many columns that they don’t all fit on the screen at once. The analyst wants a quick list of all of the column names to get a better idea of what is in their data. What function should they use?

A
head()
B
colnames()Correct Answer
C
str()
D
mutate()
QUESTION 7 OF 45

A data analyst is working with the penguins dataset. What code chunk does the analyst write to make sure all the column names are unique and consistent and contain only letters, numbers, and underscores?

A
clean_names(penguins)Correct Answer
B
drop_na(penguins)
C
rename(penguins)
D
select(penguins)
QUESTION 8 OF 45

A data analyst is working with the penguins data. The variable species includes three penguin species: Adelie, Chinstrap, and Gentoo. The analyst wants to create a data frame that only includes the Adelie species. The analyst receives an error message when they run the following code: penguins %>% filter(species <- “Adelie”) How can the analyst change the second line of code to correct the error?

A
filter(“Adelie”)
B
filter(Adelie == species)
C
filter(“Adelie” <- species)
D
filter(species == “Adelie”)Correct Answer
QUESTION 9 OF 45

A data analyst is working with a data frame named retail. It has separate columns for dollars (price_dollars) and cents (price_cents). The analyst wants to combine the two columns into a single column named price, with the dollars and cents separated by a decimal point. For example, if the value in the price_dollars column is 10, and the value in the price_centscolumn is 50, the value in the pricecolumn will be 10.50. What code chunk lets the analyst create the pricecolumn?

A
unite(retail, “price”, price_dollars, price_cents, sep=”.”)Correct Answer
B
unite(retail, “price”, price_dollars, price_cents)
C
unite(retail, price_dollars, price_cents, sep=”.”)
D
unite(retail, “price”, price_cents, sep=”.”)
QUESTION 10 OF 45

A data analyst is using statistical measures to get a better understanding of their data. What function can they use to determine how strongly related are two of the variables?

A
mean()
B
sd()
C
cor()Correct Answer
D
bias()
QUESTION 11 OF 45

A data analyst creates two different predictive models for the same dataset. They use the bias() function on both models. The first model has a bias of 20. The second model has a bias of 0.1. Which model is less biased?

A
It can’t be determined from this information
B
The first model
C
The second modelCorrect Answer
QUESTION 12 OF 45

You are cleaning a data frame with improperly formatted column names. In order to clean the data frame you want to use the clean_names() function. Which column names will be changed using the clean_names() with default parameters? Select all that apply.

A
column.1Correct Answer
B
column_3
C
column 2Correct Answer
D
column4
QUESTION 13 OF 45

A data analyst is working with the penguins dataset. The variable island represents the island on which the sample was collected. The analyst wants to create a data frame that excludes records from the island named “Torgersen”. What code chunk will allow them to create this data frame?

A
penguins %>% filter(island = "Torgersen")
B
penguins %>% filter(island == "Torgersen")
C
penguins %>% filter(island != "Torgersen")Correct Answer
D
penguins %>% filter(island <> "Torgersen")
QUESTION 14 OF 45

A data analyst is working with a data frame called zoo_records. They want to create a new column named is_large_animal that signifies if an animal has a weight of more than 199 kilograms. What code chunk lets the analyst create the is_large_animal column?

A
zoo_records %>% mutate(weight > 199 <- is_large_animal)
B
zoo_records %>% mutate(weight > 199 = is_large_animal)
C
zoo_records %>% mutate(is_large_animal == weight > 199)
D
zoo_records %>% mutate(is_large_animal = weight > 199)Correct Answer
QUESTION 15 OF 45

You are compiling an analysis of the average monthly costs for your company. What summary statistic function should you use to calculate the average?

A
max()
B
cor()
C
mean()Correct Answer
D
min()
QUESTION 16 OF 45

A data analyst creates a data frame with data that has more than 50,000 observations in it. When they print their data frame, it slows down their console. To avoid this, they decide to switch to a tibble. Why would a tibble be more useful in this situation?

A
Tibbles won’t overload the console because they automatically only print the first 10 rows of data and as many variables as will fit on the screenCorrect Answer
B
Tibbles only include a limited number of data items
C
Tibbles will automatically change the names of variables to make them shorter and easier to read
D
Tibbles will automatically create row names to make the data easier to read
QUESTION 17 OF 45

You have a data frame named employees with a column named Last_NAME. What will the name of the employees column be in the results of the function rename_with(employees, tolower)?

A
lAST_nAME
B
last_nameCorrect Answer
C
last_nAME
D
Last_NAME
QUESTION 18 OF 45

A data analyst is working with the penguins data. They write the following code: penguins %>% The variable species includes three penguin species: Adelie, Chinstrap, and Gentoo. What code chunk does the analyst add to create a data frame that only includes the Gentoo species?

A
filter(species == “Gentoo”)Correct Answer
B
filter(Gentoo == species)
C
filter(species == “Adelie”)
D
filter(species <- “Gentoo”)
QUESTION 19 OF 45

A data analyst is working with a data frame named users. It has separate columns for first name (first_name) and last name (last_name). The analyst wants to combine the two columns into a single column called full_name, with the first name and last name separated by a space. What code chunk lets the analyst create the full_namecolumn?

A
unite(users, "full_name", first_name, last_name, sep = " ")Correct Answer
B
merge(users, "full_name", first_name, last_name, sep = " ")
C
unite(users, first_name, last_name, "full_name", sep = " ")
D
unite(users, "full_name", first_name, last_name, sep = ", ")
QUESTION 20 OF 45

A data analyst is working with a data frame named salary_data. They want to create a new column named wagesthat includes data from the rate column multiplied by 40. What code chunk lets the analyst create the wages column?

A
mutate(salary_data, wages = rate + 40)
B
mutate(salary_data, wages = rate * 40)Correct Answer
C
mutate(wages = rate * 40)
D
mutate(salary_data, rate = wages * 40)
QUESTION 21 OF 45

A data analyst writes the following code chunk to return a statistical summary of their dataset: quartet %>% group_by(set) %>% summarize(mean(x), sd(x), mean(y), sd(y), cor(x, y)) Which function will return the average value of the y column?

A
sd(x)
B
mean(x)
C
mean(y)Correct Answer
D
cor(x, y)
QUESTION 22 OF 45

A data analyst is working with a dataset in R that has more than 50,000 observations. Why might they choose to use a tibble instead of the standard data frame? Select all that apply.

A
Tibbles can create row names
B
Tibbles automatically only preview the first 10 rows of dataCorrect Answer
C
Tibbles can automatically change the names of variables
D
Tibbles automatically only preview as many columns as fit on screenCorrect Answer
QUESTION 23 OF 45

A data analyst is examining a new dataset for the first time. They load the dataset into a data frame to learn more about it. What function(s) will allow them to review the names of all of the columns in the data frame? Select all that apply.

A
library()
B
head()Correct Answer
C
str()Correct Answer
D
colnames()Correct Answer
QUESTION 24 OF 45

A data analyst is working with a data frame named customers. It has separate columns for area code (area_code) and phone number (phone_num). The analyst wants to combine the two columns into a single column called phone_number, with the area code and phone number separated by a hyphen. What code chunk lets the analyst create the phone_numbercolumn?

A
unite(customers, area_code, phone_num, sep=”-”)
B
unite(customers, “phone_number”, area_code, phone_num)
C
unite(customers, “phone_number”, area_code, phone_num, sep=”-”)Correct Answer
D
unite(customers, “phone_number”, area_code, sep=”-”)
QUESTION 25 OF 45

A data analyst wants a high level summary of the structure of their data frame, including the column names, the number of rows and variables, and type of data within a given column. What function should they use?

A
colnames()
B
rename_with()
C
str()Correct Answer
D
head()
QUESTION 26 OF 45

You are working with the ToothGrowth dataset. You want to use the select() function to view all columns except the supp column. Write the code chunk that will give you this view. How many columns does the resulting data frame contain?

A
1
B
3
C
2Correct Answer
D
4
QUESTION 27 OF 45

You are working with the penguins dataset. You want to use the summarize() and min() functions to find the minimum value for the variable bill_depth_mm. At this point, the following code has already been written into the script: penguins %>% drop_na() %>% group_by(species) %>% Add the code chunk that lets you find the minimum value for the variable bill_depth_mm. (Note: do not type the above code into the code block editor, as it has already been inputted. Simply add a single line of code based on the prompt.) What is the minimum bill depth in mm for the Chinstrap species?

A
12.4
B
13.1
C
15.5
D
16.4Correct Answer
Explanation:

The code chunk summarize(min(bill_depth_mm)) lets you find the minimum value for the variable bill_depth_mm. The correct code is penguins %>% drop_na() %>% group_by(species) %>% summarize(min(bill_depth_mm)). The summarize() function displays summary statistics. You can use the summarize() function in combination with other functions -- such as mean(), max(), and min() -- to calculate specific statistics. In this case, you use min() to calculate the minimum value for bill depth. The minimum bill depth for the Chinstrap species is 16.4mm.

QUESTION 28 OF 45

A data analyst wants to find out how much the predicted outcome and the actual outcome of their data model differ. What function can they use to quickly measure this?

A
mean()
B
bias()Correct Answer
C
sd()
D
cor()
QUESTION 29 OF 45

You are working with the ToothGrowth dataset. You want to use the skim_without_charts() function to get a comprehensive view of the dataset. Write the code chunk that will give you this view. What is the average value of the len column?

A
13.1
B
18.8Correct Answer
C
4.2
D
7.65
QUESTION 30 OF 45

A data analyst is working with the penguins dataset and wants to sort the penguins by body_mass_g from least to greatest. When they run the following code the penguin body mass data is not displayed in the correct order. penguins %>% arrange(body_mass_g) head(penguins) What can the data analyst do to fix their code? b)the capitalization of arrange() to Arrange()

A
Use the print() function instead of the head() function
C
Save the results of arrange() to a variable that gets passed to head()Correct Answer
D
Add a minus sign in front of body_mass_g to reverse the order
QUESTION 31 OF 45

You are working with the penguins dataset and want to understand the year of data collection for all combinations of species, island, and sex. At this point, the following code has already been written into your script: penguins %>% drop_na() %>% group_by(species, island, sex) %>% summarize(min = min(year), max = max(year)) When you run the code in the code box, how many separate observational rows are returned by this code chunk?

A
10
B
6
C
2
D
3Correct Answer
QUESTION 32 OF 45

A data analyst is working with a data frame called athletes. The data frame contains a column names record that represents an athlete's wins and losses separated by a hyphen (-). They want to turn this single column into individual columns for wins and losses. Which code chunk lets the analyst split the record column?

A
separate(athletes, record, into=c("wins”, “losses”), delim="-")
B
separate(athletes, record, into=c("wins”, “losses”), sep="-")Correct Answer
C
separate(record, athletes, into=c("wins”, “losses”), sep="-")
D
separate(record, athletes, into=c("wins”, “losses”), delim="-")
QUESTION 33 OF 45

A data analyst is working with a data frame named stores. It has separate columns for city (city) and state (state). The analyst wants to combine the two columns into a single column named location, with the city and state separated by a comma. What code chunk lets the analyst create the location column?

A
unite(stores, “location”, city, state, sep=”,”)Correct Answer
B
unite(stores, “location”, city, state)
C
unite(stores, “location”, city, sep=”,”)
D
unite(stores, city, state, sep=”,”)
QUESTION 34 OF 45

A data analyst is working with the penguins dataset in R. What code chunk will allow them to sort the penguins data by the variable bill_length_mm?

A
arrange(=bill_length_mm)
B
arrange(penguins, bill_length_mm)Correct Answer
C
arrange(bill_length_mm, penguins)
D
arrange(penguins)
QUESTION 35 OF 45

A data analyst is working with a data frame called salary_data. They want to create a new column named total_wages that adds together data in the standard_wages and overtime_wagescolumns.

A
mutate(salary_data, total_wages = standard_wages + overtime_wages)Correct Answer
B
mutate(total_wages = standard_wages + overtime_wages)
C
mutate(salary_data, standard_wages = total_wages + overtime_wages)
D
mutate(salary_data, total_wages = standard_wages * overtime_wages)
QUESTION 36 OF 45

What scenarios would prevent you from being able to use a tibble?

A
You need to store numerical data
B
You need to create column names
C
You need to create row namesCorrect Answer
D
You need to change the data types of inputsCorrect Answer
QUESTION 37 OF 45

You are working with the ToothGrowth dataset. You want to use the skim_without_charts() function to get a comprehensive view of the dataset. Write the code chunk that will give you this view. How many rows does the ToothGrowth dataset contain?

A
50
B
40
C
60Correct Answer
D
25
Explanation:

The code chunk skim_without_charts(ToothGrowth) gives you a comprehensive view of the dataset. Inside the parentheses of the skim_without_charts() function is the name of the dataset you want to view. The code returns a summary with the name of the dataset and the number of rows and columns. It also shows the column types and data types contained in the dataset. The ToothGrowth dataset contains 60 rows.

QUESTION 38 OF 45

In R, which statistical measure demonstrates how strong the relationship is between two variables?

A
Standard deviation
B
Average
C
CorrelationCorrect Answer
D
Maximum
QUESTION 39 OF 45

A data analyst is studying weather data. They write the following code chunk: bias(actual_temp, predicted_temp) What will this code chunk calculate?

A
The minimum difference between the actual and predicted values
B
The average difference between the actual and predicted valuesCorrect Answer
C
The maximum difference between the actual and predicted values
D
The total average of the values
QUESTION 40 OF 45

A data analyst wants to learn more about a specific data frame. Which function will allow them to review the data types of each column in the data frame?

A
colnames()
B
package()
C
library()
D
str()Correct Answer
QUESTION 41 OF 45

You are working with the ToothGrowth dataset. You want to use the glimpse() function to get a quick summary of the dataset. Write the code chunk that will give you this summary. 1 2 How many different data types are used for the column data types?

A
2Correct Answer
B
3
C
60
D
1
QUESTION 42 OF 45

You are working with the penguins dataset. You want to use the summarize() and mean() functions to find the mean value for the variable body_mass_g. At this point, the following code has already been written into your script: penguins %>% drop_na() %>% group_by(species) %>% Add the code chunk that lets you find the mean value for the variable body_mass_g. (Note: do not type the above code into the code block editor, as it has already been inputted. Simply add a single line of code based on the prompt.) What is the mean body mass in g for the Adelie species?

A
3733.088
B
3706.164Correct Answer
C
5092.437
D
4207.433
Explanation:

The code chunk summarize(mean(body_mass_g)) lets you find the mean value for the variable body_mass_g. The correct code is penguins %>% drop_na() %>% group_by(species) %>% summarize(mean(body_mass_g)). The summarize() function displays summary statistics. You can use the summarize() function in combination with other functions -- such as mean(), max(), and min() -- to calculate specific statistics. In this case, you use mean() to calculate the mean value for body mass. The mean body mass for the Adelie species is 3706.164g.

QUESTION 43 OF 45

A data analyst is working with a data frame called sales. In the data frame, a column named location represents data in the format “city, state”. The analyst wants to split the city into an individual city column and state into a new countrycolumn. What code chunk lets the analyst split the location column?

A
separate(sales, location, into=c("country", "city" ), sep=", ")
B
separate(sales, location, into=c("city", "country"), sep=", ")Correct Answer
C
separate(sales, location, into=c("country", "city" ), sep=" ")
D
untie(sales, location, into=c("city", "country"), sep=", ")
QUESTION 44 OF 45

What is an advantage of using data frames instead of tibbles?

A
Data frames make printing easier
B
Data frames allow you to create row namesCorrect Answer
C
Data frames allow you to use column names
D
Data frames store never change variable names
QUESTION 45 OF 45

A data analyst is checking a script for one of their peers. They want to learn more about a specific data frame. What function(s) will allow them to see a subset of data values in the data frame? Select all that apply.

A
library()
B
colnames()
C
head()Correct Answer
D
str()Correct Answer

Ready to test your recall?

A data analyst is considering using tibbles instead of basic data frames. What are some of the limitations of tibbles? Select all that apply.

💡Select all 3 correct answers before submitting (0 of 3 selected).
A
Tibbles can overload a console
B
Tibbles won’t automatically change the names of variables
C
Tibbles can never create row names
D
Tibbles can never change the input type of the data

How confident are you in this answer?