REMEMBER: capitalization, spacing, and parentheses are important when using datasets and functions in R!
Include all code for each question, plus output from R or graphs, and answer all sub-questions.
Question 1. As part of a habitat assessment, you are tasked with searching for a rare bird. You visit 20 sites. At each site, you search 10 trees for birds’ nests. The following data show the number of trees with nests you count at each of the 20 sites:
Read the following data into R:
Nests: 3, 2, 5, 2, 2, 4, 2, 4, 0, 3, 2, 3, 0, 1, 2, 4, 8, 0, 3, 3
a. What sort of discrete distribution do these data follow?
b. Read the data into R. Calculate the mean and variance of the data.
c. Based on the mean you calculated in part b, what is the probability of successfully seeing a nest in a given tree?
d. What is the probability of seeing nests in exactly 3 trees? (Use both the formula for a binomial probability and the R command dbinom() to calculate the probability.)
e. To protect the bird, you want to preserve sites that have 6 or more trees with nests in them. What is the probability of a site having 6 or more trees with nests? Based on your answer, do you think it is likely that the bird will be protected? (Use both the formula for a binomial cumulative probability and the R command pbinom() to calculate the probability.)
f. If you sample 25 trees at a new site, calculate the expected mean, variance, and standard deviation of the number of trees with nests at that site.
Question 2. You are a researcher trying to estimate the number of fishers and the number of bobcats in different forests in western Washington. You survey a random sample of 30 forests and find the following numbers of fishers and bobcats (read the following data into R):
Fishers: 1, 1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 0, 3, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 3
Bobcats: 5, 3, 4, 4, 5, 4, 0, 3, 1, 3, 5, 6, 2, 4, 4, 0, 3, 2, 6, 2, 1, 6, 5, 7, 3, 6, 2, 4, 3, 0
a. What sort of discrete distribution do these data follow?
b. Read the data into R. Calculate the mean and variance of the fisher and bobcat data separately. Are the mean and variance what you would expect, given your answer to part a?
c. Based on the means you calculated in part b, what is the probability of seeing 2 fishers in a given forest? (Use both the formula for a Poisson probability and the R command dpois() to calculate the probability.)
d. What is the probability of seeing 6 or fewer bobcats in a forest? (Use both the R command dpois() and the R command ppois() to calculate the probability.)
e. What is the probability of seeing more than 1 fisher or exactly 2 bobcats in a forest? (Assume the numbers of fishers and bobcats are independent.)
CS 340 Milestone One Guidelines and Rubric Overview: For this assignment, you will implement the fundamental operations of create, read, update,
Retail Transaction Programming Project Project Requirements: Develop a program to emulate a purchase transaction at a retail store. This
7COM1028 Secure Systems Programming Referral Coursework: Secure
Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip
CS 340 Final Project Guidelines and Rubric Overview The final project will encompass developing a web service using a software stack and impleme