Lab 1G
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.
data() function to load the
atu_clean data file to use in this lab.gender seem to have a higher occurrence of
physical challenges than the other?bargraph helps us get an idea of the answer
to the question, but we need to provide precise values.tally of the number of people with
physical challenges and their genders.
format = "percent" as an
option to the code you used to make your 2-way frequency table.
gender seem to have a higher
occurrence of physical challenges than the other? If so, which one and
explain your reasoning.margin = TRUE as an option in
the tally function.phys_challenge | gender
and gender | phys_challenge!## gender
## phys_challenge Male Female
## No difficulty 4140 5048
## Has difficulty 530 775
## Total 4670 5823
## phys_challenge
## gender No difficulty Has difficulty
## Male 4140 530
## Female 5048 775
## Total 9188 1305
At first glance, the two-way frequency tables might look similar
(especially when the margin option is excluded). Notice,
however, that the totals are different.
The totals are telling us that R calculates
conditional frequencies by column!
What does this mean?
Male and Female on the distribution of
physical challenges.No difficulty and Has difficulty
on the distribution of gender.Add the option format = "percent" to the
first tally function. How were the percents calculated?
Interpret what they mean.
gender has a higher rate of part time
employment?