- For a binomial distribution with parameters N=50 and p =0.5
- Use R to find the probability that x (a data outcome) =45
- Use R to find the probability that x <=30
- Find the .025 and 0.975 quantiles
- Generate random data values
- Take the following data on mass and sex of individual animals
- Calculate overall mean and sd for mass
- Calculate quantiles for mass over all the data at p=c(0.025,0.05,.5,.90,.975)
- Compare these quantiles to those from a normal distribution with the calculated mean and sd
- Using the aggregate function calculate mean of mass for each sex
- For the above data, create a factor variable (mass.class) with the following levels
- "Low" mass<55
- "Med" mass >=55 & < 65
- "High" mass >=65
- Compute a frequency table of the data with combinations of mass.class and sex
- Compute a test of independence of mass.class and sex using
- A summary function of the table object
- The chisq.test function
- Construct a 2-sample t-test to test the Ho: mass [males]=mass[females], vs the 1-sided alternative that mass[males]>mass[females]
- For the following data on insect counts over years
- Plot count versus year
- Fit a linear model of count versus year
- Superimpose a plot of the predictions from the linear model with 95% confidence interval
- Repeat the above steps but transform the count data by log(count+1)
Example code illustrating (1) binning continuous data into discrete groups (factors), (2) 2 -dimensional tests of independence , (3) 2-sample t-tests. This code (appropriately adapted) may help you in completing some parts of the assignment!