Descriptive Statistics in R
- 20Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
- spaceFlip card
- KI knew it
- DI didn't know it
- ←Previous card
- →Next card
What are descriptive statistics, and what are common examples?
Statistics that summarize data, such as averages, maximum values, and record counts.
Or swipe the card
20 cards
What are descriptive statistics, and what are common examples?
Statistics that summarize data, such as averages, maximum values, and record counts.
In the described
dplyrworkflow, are summary functions applied across rows or columns?They are generally applied to columns: select a column and summarize its values.
What does
summarize()do in adplyrpipeline?It computes summary values, such as a mean or maximum, for selected data.
How do you calculate the maximum value of a column with
summarize()?Create a summary variable using
max(column), for example:summarize(max_rate = max(�60�60�602000�60�60�60)).How do you calculate a column's mean with
summarize()?Create a summary variable using
mean(column), for example:summarize(avg_rate = mean(�60�60�602000�60�60�60)).What does
n()return when used insummarize()?The number of records (rows) in the data being summarized.
What was the maximum fertility rate in the OECD data for 2000, and which country had it?
The maximum was approximately 3.12, and it belonged to India.
What was the average fertility rate in the OECD data for 2000?
Approximately 1.76.
Why might a mean calculated with
summarize()be unsuitable as an equality condition infilter()?The mean may not equal any individual value in the data, so filtering for equality can return no records.
How can you filter records whose 2000 fertility rate is below the mean for that column?
Use
filter(�60�60�602000�60�60�60 < mean(�60�60�602000�60�60�60)).How many of the 42 countries were below the mean fertility rate in 2000?
26 countries.
How can you identify the country or countries with the maximum value in a column?
Filter the data for rows where the column equals its maximum, such as
filter(�60�60�602000�60�60�60 == max(�60�60�602000�60�60�60)).What does
arrange()do when applied to the 2000 fertility-rate column?It orders the records by their 2000 fertility-rate values.
How many observations and variables were in the prepared OECD fertility data?
42 observations and 6 variables: a country column and five decade columns.
Which decade columns were retained in the prepared OECD dataset?
1970, 1980, 1990, 2000, and 2010.
What does the
ends_with("0")selection helper select in this dataset?Columns whose names end in 0, which selects the decade columns from 1970 through 2010.
Why was
skip = 3used when importing the OECD Excel file?To skip the first three records, which contained headers rather than the data to import.
Why was
n_max = 42used when importing the OECD Excel file?To limit the import to the 42 data records and avoid including footer content.
How was the country column renamed in the imported data?
It was renamed using its column position: the second column was named
country.Which R packages were used to prepare and import the OECD data?
dplyrwas used for data manipulation, andreadxlwas used to read the Excel file.

Ask anything
We've read this whole study set, so questions about it get the best answers.