# For each of the following you should do some exploratory data analy...

## Question

For each of the following you should do some exploratory data analysis, i.e. calculate some summary statistics, do the appropriate plots, perform the statistical procedure asked of you. You should record your work by creating an R script and comment each line of your code explaining. All the data sets discussed in the problems are ones we’ve used before or built into R.The built in data sets can be loaded in RStudio using library(datasets) and then explored using View(name)and help(name).

(1) Do a permutation test for difference in means for the built in data set chickwts to test for a difference in average weight for different feeds. There are many feed options so compare a couple different ones.
(2) Use a permutation test and built in data set airquality to test to see if temperatures above 85 have increased atmospheric ozone on average.
(3) Do a permutation test for independence in the GSS2002 between at least two pairs of interesting variables (don’t do the one from the book).
(4) Use the chi-squared test for independence using built in data set UCBAdmission to see if being admitted to department A is independent of sex. Do a similar test for the other departments.

## Solution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

library(datasets)
#View(chickwts)
#help(chickwts)
# (1)
# Do a permutation test for difference in means for the built in data set chickwts to test for a
# difference in average weight for different feeds. There are many feed options so compare a couple
# different ones.
summary(chickwts)
#    weight             feed
# Min.   :108.0   casein   :12
# 1st Qu.:204.5   horsebean:10
# Median :258.0   linseed :12
# Mean   :261.3   meatmeal :11
# 3rd Qu.:323.5   soybean :14
# Max.   :423.0   sunflower:12

linseed.weight <- subset(chickwts, feed=="linseed", select=weight)\$weight
sunflower.weight <- subset(chickwts, feed=="sunflower", select=weight)\$weight
soybean.weight <- subset(chickwts, feed=="soybean", select=weight)\$weight

d <- c(linseed.weight,sunflower.weight)
d2 <- c(sunflower.weight, soybean.weight)...

By purchasing this solution you'll be able to access the following files:
Solution.R.

\$48.00
for this solution

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

### Find A Tutor

View available Statistics-R Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.