Lab 3D
Directions: Follow along with the slides, completing
the questions in blue on your
computer, and answering the questions in red in your
journal.
Space, Click, Right Arrow or swipe left to move to
the next slide.
atus
(American
Time Use Survey) dataset, which is a survey of how a sample of
Americans spent their day.
(1) The United States has an estimated population of 336,302,171 (as of April 15, 2024 9:10 a.m. PDT). How many people were surveyed for this particular dataset?
Note: If you want to know the current US population or world population in real time, click on this link: https://www.census.gov/popclock/
What is the mean age of people older than 15 living in the United States?
atus
data to calculate an estimate
for the average age of people older than 15 living in the
U.S.sample()
of our original data (atus
)
WITH replacement.
size
of the sample should be the same size as the
original data.mean
in three steps:
slice
those rows from our original data into our
bootstrap data.sample
the row
numbers we’ll use in our bootstrapped sample.
set.seed(123)
before taking the sample.slice
function
to create a new dataset that includes each row from our
sample
.bs_rows
and
bs_atus
.R
how you created bs_rows
and
bs_atus
. Be sure to include an explanation of what the
values of bs_rows
mean and how those values are
used to create bs_atus
. Also, be sure to explain what each
argument of each function does.mean
of
the age
variable in your bootstrapped data, then
use a different value of set.seed()
to create your own,
personal bootstrapped sample. Then calculate its
mean
.do()
500 bootstrapped
samples.do()
-ing 500 bootstraps easier, we’ll
code our 3-step bootstrap method into a function.
mean
for our
atus
data.
histogram
for your
bootstrapped samples and describe the center,
shape and spread of its distribution.
histogram
, fill in the
statement below:The lowest 5% of our estimates are below _______ years and the highest 5% of our estimates are above_______ years.
quantile()
function to check your estimates.mean
age of
people living in the U.S. is contained?mean
age of people living in the U.S.