Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Week 2 R Exercises INSERT YOUR NAME HERE! Below are questions to answer using R , based on the documents you just read. Enter your

Week 2 R Exercises
INSERT YOUR NAME HERE!
Below are questions to answer using R, based on the documents you just read. Enter your answers in the
Rmd file, using the space provided below each question! When you are done, you should be able to click the
Knit button and see a pretty version of your assignment.
Answer the following questions using the cdc data that we used in the Intro to Data document.
1. If you run the command below, you will see a graph of peoples weights (x-axis) versus their desired
weights (y-axis). Describe the relationship between these two variables.
ENTER TEXT FOR YOUR ANSWER HERE.
## run this command:
plot(cdc$weight, cdc$wtdesire, xlab="Weight", ylab="Desired weight")
2. Lets consider a new variable: the difference between desired weight (wtdesire) and current weight
(weight). Create this new variable by subtracting the two columns in the data frame and assigning
them to a new object called wdiff.
ENTER TEXT FOR YOUR ANSWER HERE.
# ENTER YOUR R COMMAND(S) HERE
# (YOU CAN ADD LINES IF NEEDED)
3. What type of data is wdiff? If an observation wdiff is 0, what does this mean about the persons
weight and desired weight. What if wdiff is positive or negative?
ENTER TEXT FOR YOUR ANSWER HERE.
# ENTER YOUR R COMMAND(S) HERE
# (YOU CAN ADD LINES IF NEEDED)
4. Describe the wdiff variable, using commands from the Intro to Data document. What does this tell
us about how people feel about their current weight?
ENTER TEXT FOR YOUR ANSWER HERE.
# ENTER YOUR R COMMAND(S) HERE
# (YOU CAN ADD LINES IF NEEDED)
5. Using numerical summaries and a side-by-side box plot, determine if men tend to view their weight
differently than women.
ENTER TEXT FOR YOUR ANSWER HERE.
# ENTER YOUR R COMMAND(S) HERE
# (YOU CAN ADD LINES IF NEEDED)
6. Now its time to get creative. Find the mean and standard deviation of weight and determine what
percentage of the weights are within one standard deviation o

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions