Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / Lab 3 – Mammal Sleep Behavior Formatting Requirements: When you are done, you should have your answers saved in a pdf

Lab 3 – Mammal Sleep Behavior Formatting Requirements: When you are done, you should have your answers saved in a pdf

Math

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?
 

Option 1

Low Cost Option
Download this past answer in few clicks

19.86 USD

PURCHASE SOLUTION

Already member?


Option 2

Custom new solution created by our subject matter experts

GET A QUOTE