Lab 3
Central tendency and distribution shape
Objectives
- Use measures of central tendency
- Create visualizations
- Dissect code that was used to retrieve data and conduct background research to uncover which census products were used in data creation
- Relate measures of central tendency to distribution shape
What to upload
- A .pdf containing all of the answers to the questions in this lab
- An R script which contains the code you used to create visualizations and descriptive statistics
Data preparation
Use the following code to retrieve the county level ACS data in Wisconsin (with
spatial features) that will be used in the lab by modifying the underscores
(i.e., _____) :
library(tidycensus)
library(dplyr)
library(readr)
wi_vars <- get_acs(geography = _____,
variables = c(_____ = "B19013_001",
_____ = "B01002_001"),
state = _____,
output = _____,
year = 2022,
_____ = TRUE)
wi_vars <- wi_vars %>%
transmute(GEOID,
NAME,
income = incomeE,
age = ageE)
Questions
Which year, census product, and estimate (e.g., 1-year, 3-year, or 5-year) correspond to the variables
incomeandage?What is the scale of measurement for the variable
income? Explain your answer.What is the scale of measurement for the variable
age? Explain your answer.What are the assumptions associated with computing basic descriptive statistics like central tendency and shape? Do the variables
incomeandagefulfill these assumptions?Create a visualization for the distribution of the variable
income. Include it in your document.Create a visualization for the distribution of the variable
age. Include it in your document.Compute the mean, median, and mode(s) for the variable
income.Discuss the shape of the distribution for the variable
incomein relation to its measures of central tendency.Compute the mean, median, and mode(s) for the variable
age.Discuss the shape of the distribution for the variable
agein relation to its measures of central tendency.