UIUC Mammal Sleep Behavior Lab Report

User Generated

Nccyr1997

Mathematics

University of Illinois at Urbana Champaign

Description

Unformatted Attachment Preview

Lab 3 – Mammal Sleep Behavior Formatting Requirements: When you are done, you should have your answers saved in a pdf. You may keep the original questions in, or delete them and only keep the question numbers—either way is fine! You should submit your file to Gradescope (follow link in Lab 3 description on Canvas). You may work solo, or in groups of 2-3. If working with others, please put your names and netIDs on the top of this document AND have only one person make a submission, and then add your partner(s) to your “group” when you make your submission. When submitting, please match pages to question numbers. Note that the same page can be tagged for multiple questions! Each question does not need to be on a separate page—but it’s fine if you do. o Submissions where pages are not matched appropriately may lose 0.5 points. Assignment Overview: What is the sleep behavior of different mammals? How does it vary across species? You will have a chance to explore some data about this using R, and then briefly commenting on some of your findings. Question 0: - Be sure you have installed both R and RStudio on your device (or you have purchased a semester license of RStudio Cloud). Open RStudio and try downloading and opening the starter script that is posted on Canvas as well (same paragraph that the instructions are linked) If you haven’t already, install the “tidyverse” package. Once you have installed this package, library tidyverse. Open the `msleep` data by running the code: View(msleep) Take a look at the documentation for `msleep` by running the code: ?msleep Question 1 (4pts): Create a histogram of the total sleep variable. Your histogram should: - Have a black border color Have the fill color of your choice Have an appropriate title Have a set number of bins (don’t use the default of 30—try doing a lower number). Once you have created your histogram, save it to your computer and insert it here (or do a screenshot and be careful to select or crop down to the graph only). Question 2 (4pts) Report the numeric summary of the sleep_total variable (and only this variable) using just one function. The numeric summary function in R should produce the min, Q1, Q2, mean, Q3, and max. Also report the standard deviation of this same variable with a separate function. Please copy your output here. Question 3 (4pts): Now briefly describe the distribution of this variable. You should consider both the numeric summary and your histogram when answering this. Consider… - What is a typical amount of sleep for a mammal species in this dataset? What is the range of sleep totals reported for mammal species in this dataset? What is the average deviation from the mean for total sleep in this dataset? In what sleep range are the middle 50% of mammal species in this dataset? Question 4 (5pts): Create a histogram of the body weight variable. Your histogram should: - Have a black border color Have the fill color of your choice (use a different color from your first one) Have an appropriate title Any number of bins is fine (at least 20, no more than 100) Once you have created your histogram, save it to your computer and insert it here (or do a screenshot and be careful to select or crop down to the graph only). Briefly describe how this distribution is different in comparison to the total sleep distribution. Question 5 (4pts): What are the eating classifications for the mammals in this dataset? Let’s answer this question by creating a barplot to compare the frequency of each `vore` type. Your barplot should: - Have a black border color Allow each bar a different color (fill by the variable) Have an appropriate title Once you have created your histogram, save it to your computer and insert it here (or do a screenshot and be careful to select or crop down to the graph only). Which “vore” classification appears the most in this dataset? Question 6 (4pts): Create one graph containing side by side boxplots to compare total sleep by vore classification. You should have a separate boxplot for each of the 5 categories in vore (including one for “NA”). Your boxplots should: - Allow each box a different color (fill by the grouping variable) Have an appropriate title You can arrange them vertically or horizontally. Up to you! Once you have created your histogram, save it to your computer and insert it here (or do a screenshot and be careful to select or crop down to the graph only). Question 7 (5pts): Answer these questions about the previous graph and by looking at the msleep tab more carefully. Note, you can sort by a column by clicking on the column header! Which “vore” classification appears to get the most sleep in this dataset? Take a look at the data tab and see which animals are in this group (and also note how many). Which specific animals in that classification are getting the most? Is high total sleep a consistent feature of all animals in that classification, or just some? In general, do you find “vore” classification to be a helpful way to explain variability in total sleep across mammals (in other words, does knowing a mammal’s “vore” classification give us much indication of their total sleep)? Why or why not?
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

View attached explanation and answer. Let me know if you have any questions.

1

Lab 3 – Mammal Sleep Behavior
Name
Institution

2
Lab 3 – Mammal Sleep Behavior
Formatting Requirements:
When you are done, you should have your answers saved in a pdf. You may keep the original questions in, or delete them and
only keep the question numbers—either way is fine!
You should submit your file to Gradescope (follow link in Lab 3 description on Canvas).
You may work solo, or in groups of 2-3. If working with others, please put your names and netIDs on the top of this
document AND have only one person made a submission, and then add your partner(s) to your “group” when you make your
submission.
When submitting, please match pages to question numbers. Note that the same page can be tagged for multiple questions!
Each question does not need to be on a separate page—but it’s fine if you do.
o Submissions where pages are not matched appropriately may lose 0.5 points.
Assignment Overview:
What is the sleep behavior of different mammals? How does it vary across species?
You will have a chance to explore some data about this using R, and then briefly
commenting on some of your findings.

Question 0:
-

Be sure you have installed both R and RStudio on your device (or you
have purchased a semester license of RStudio Cloud).
Open RStudio and try downloading and opening the starter script that is posted on Canvas as well (same
paragraph that the instructions are linked)
If you haven’t already, install the “tidyverse” package....


Anonymous
Nice! Really impressed with the quality.

Studypool
4.7
Indeed
4.5
Sitejabber
4.4

Related Tags