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

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse 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)...

This is only a preview of the solution. Please use the purchase button to see the entire solution

Assisting Tutor

Related Homework Solutions

Statistics Project: The Effect of Sleep on GPA
Homework Solution
$60.00
Statistics
Project
Mathematics
Descriptive Analysis
GPA
Sleeping
Survey
Research
Regression Model
Questionnaire
Concentration Level
Mean
Median
Hypothesis Test
Variables
Standard Error
Statistical Models
Statistics-R Programming Questions
Homework Solution
$30.00
Mathematics
Statistics
R Programming
Variables
Probability
Samples
Normal Distribution
Comparison
Observations
Null Hypothesis
Population
Variance
Standard Deviation
Type Error
Numerators
Critical Values
Density Lines
Vectors
Plots
Degr
Stink Bugs
Homework Solution
$38.00
Mathematics
Statistics
R
Programming
Stink
Bugs
Analysis
Treatments
Predators
Agriculture
Framingham Heart Study
Homework Solution
$350.00
Mathematics
Statistics
R
Programming
Framingham
Heart
Study
Data
Patient
Stroke
Analysis
Statistics - R Programming Questions
Homework Solution
$28.00
Mathematics
Statistics
R Programming
Pearson Correlation
Bootstrap Samples
Histogram
Sampling Distribution
Confidence Interval
Confidence Limits
P-Value
Expected Counts
Observed Counts
Chi Square Test
Function Summary
Get help from a qualified tutor
Live Chats