Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Statistical Methods for Bioscience II - Homework 6 | HORT 572, Assignments of Data Analysis & Statistical Methods

Material Type: Assignment; Class: Statistical Methods for Bioscience II; Subject: HORTICULTURE; University: University of Wisconsin - Madison; Term: Spring 2008;

Typology: Assignments

Pre 2010

Uploaded on 09/02/2009

koofers-user-uwa
koofers-user-uwa 🇺🇸

10 documents

1 / 2

Toggle sidebar

Related documents


Partial preview of the text

Download Statistical Methods for Bioscience II - Homework 6 | HORT 572 and more Assignments Data Analysis & Statistical Methods in PDF only on Docsity! Stat/For/Hort 572 Larget March 29, 2008 Assignments #6 and 7 — Due Friday, April 4, 2008, by 4:00 P.M. Turn in homework in lecture, discussion, or your TA’s mailbox (just inside the main entrance to MSC). Please circle the discussion section you expect to attend to pick up this assignment. 311: Tues. 1:00–2:15 312: Wed. 2:30–3:45 313: Tue. 4:00–5:15 This assignment looks long, but I hope is simpler to complete than it appears from first glance. All problems are based on lecture from the past week and ask you to do in R what I showed you to do for different data. We will see more R examples in lecture and in discussion section. However, due to the large number of problems, this assignment will count double. Problems 1–4 will be worth 50 points and recorded as assignment #6. The remaining problems will be worth 50 points also and will be recorded as assignment #7. 1. A small class has 13 students who come from families of sizes 1, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, and 5. We are interested in simulating the sex of children in these families. Write a function in R that will sample the number of girls from each family, assuming that this number is a binomial random variable with p = 0.488. Show the output of this function for a single draw. 2. Write an R function that will take a random sample as in the previous example, but will return the total number of girls. (Hint: If your function in problem 1 was called prob1(), your function for this problem could be defined to use the previous function. For example: prob2 = function(sizes,prob) { return( sum(prob1(sizes,prob)) ) } would work. Here, sizes would be a vector of family sizes and prob would be the probability of having a girl. The function prob2() simply passes the arguments on to prob1() and takes the sum of the result.) 3. Use replicate() in R to replicate this sampling process 1000 times. Compute the mean and standard deviation of this distribution. Find the 0.025 and 0.975 quantiles. Draw a density plot of the distribution of sampled totals. 4. Suppose that instead of the total number of girls, we were interested in knowing the distribution of the maximum number of girls in a single family from these 13. You can find this by changing the function in Problem 2 to use max() instead of sum(). Use simulation to find the mean, standard deviation, and a 95 percent confidence interval for the distribution of the maximum number of girls in thirteen families of this size. 5. We will reanalyze the samara data set from homework assignment #3. Data is in the file samara.txt. The columns are: species: the common name of the species of tree; genus: the scientific genus; velocity : the terminal velocity in meters per second; mass: the mass of the samara in milligrams; area: area of the disk while spinning in square-centimeters; loading : the ratio of mass to area; and symmetry : a factor indicating if the samara are bilaterally symmetric or not. The four species with asymmetric samara are all from genus Acer and are the species box-elder, sugar maple, red maple, and silver maple. The three species with symmetric samara are: from genus Fraxinus, green ash and white ash; and from genus Liriodendron, tulip tree. Model the velocity with these five increasingly complicated nested models. (a) ∼ 1 (b) ∼ sqrt(loading) (c) ∼ sqrt(loading) + symmetry (d) ∼ sqrt(loading) + genus
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved