Question

In: Statistics and Probability

Using the R built-in data set called Chick Weight, we want to compare the mean weight...

  1. Using the R built-in data set called Chick Weight, we want to compare the mean weight across the different types of Diet. IMPORTANT: We only want to compare chicks at the final value of Time, 21. In this problem, use ?? = 0.05.
    1. Make a boxplot to compare weight across the different types of Diet. Based on the boxplot, describe any differences (or lack of differences) you see.
    2. Run an ANOVA to compare weight across the different types of Diet. Is there a significant difference in means?
    3. Regardless of your answer to part b, using Tukey’s HSD approach, which pair or pairs of Diet have significantly different means?
    4. Check the assumptions of the ANOVA: Do the variances look similar across groups? And do the residuals look like they could have come from a Normal Distribution?

Answers should be in the form of R code on how to accomplish each part and include the correct statistical explanation for those that require it in the question. Please be as thorough as possible. Thank you so much!!!

Solutions

Expert Solution

R-codes

head(ChickWeight) ## data entry

boxplot(weight~Diet,data=ChickWeight) ## boxplot
ChickWeight.aov=aov(weight~Diet,data=ChickWeight) ## fitting model
anova(ChickWeight.aov) ## anova table
TukeyHSD(ChickWeight.aov) ## pairwise comparison

bartlett.test(weight~Diet,data=ChickWeight) ## assumption of equality of variance

shapiro.test(ChickWeight.aov$res) ## checking normality of residuals
qqnorm(ChickWeight.aov$res)## checking normality of residuals
qqline(ChickWeight.aov$res)## checking normality of residuals

I hope I have made it clear, If you have any doubt please ask in comment section.


Related Solutions

3. Using the R data set called warpbreaks (See ?warpbreaks for more info), we want to...
3. Using the R data set called warpbreaks (See ?warpbreaks for more info), we want to compare the mean breaks across both the different types of wool and the different levels of tension. In this problem, use ?? = 0.10. a. Make a boxplot to compare breaks across both wool and tension. Color-code the three different tension levels for easier visibility. Within wool A, describe the relationship between tension and breaks. Within wool B, describe the relationship between tension and...
In the R programming language, we would like to use the data set called iris to...
In the R programming language, we would like to use the data set called iris to build a simple linear regression model to predict Sepal.Length based on Petal.Length. Calculate the least squares regression line to predict Sepal.Length based on Petal.Length. Interpret the slope of the line in the context of the problem. Remember that both variables are measured in centimeters. Plot the regression line in a scatterplot of Sepal.Length vs. Petal.Length. Test H1: ??1 ≠ 0 at ?? = 0.05...
Instructions tell you how to get the data in R R has built in dataset called...
Instructions tell you how to get the data in R R has built in dataset called Iris. This famous (Fisher's or Anderson's) iris data set gives the measurements in centimeters of the variables sepal length and width and petal length and width, respectively, for 50 flowers from each of 3 species of iris. The species are Iris setosa, versicolor, and virginica. We are interested in estimating the length of Petal (Y) using the length of Sepal (X). First, load the...
R has a number of datasets built in. One such dataset is called mtcars. This data...
R has a number of datasets built in. One such dataset is called mtcars. This data set contains fuel consumption and 10 aspects of automobile design and performance for 32 automobiles (1973-74 models) as reported in a 1974 issue of Motor Trend Magazine. We do not have to read in these built-in datasets. We can just attach the variables by using the code attach(mtcars) We can just type in mtcars and see the entire dataset. We can see the variable...
a. Suppose that we want to show that the true mean weight of a lollipop is...
a. Suppose that we want to show that the true mean weight of a lollipop is less than 1.5 ounces. Set up you null and alternative hypotheses to test this. b. Suppose that the standard deviation is σ= 1 and the sample size is n= 100. If we observe a sample mean weight of Oreo cookies of 1.45 ounces, in words what is the p-value (referring to question 1)? c­. How can you restate your answer for question 3?
Using R calculate the following properties of the Data Set given below: (a) The average (mean)...
Using R calculate the following properties of the Data Set given below: (a) The average (mean) value for each of the four features (b) (b) the standard deviation for each of the features (c) repeat steps (a) and (b) but separately for each type of flower (d) (d) draw four box plots, one for each feature, such that each figure shows three boxes, one for each type of flower. Properly label your axes in all box plots. Data Set {...
In R: Consider dataset “juul” from library “ISwR”. (juul is a built in data set) Are...
In R: Consider dataset “juul” from library “ISwR”. (juul is a built in data set) Are the means of igf1 equal among tanner groups at 5% level? Please use the six step process to test statistical hypotheses for this research problem. Note: You need to convert tanner from numeric to factor type and ignore all the NAs.
warpbreaks is a built-in R dataset which gives This data set gives the number of warp...
warpbreaks is a built-in R dataset which gives This data set gives the number of warp breaks per loom, where a loom corresponds to a fixed length of yarn. We are interested in some descriptive statistics related to the warpbreaks dataset. We can access this data directly and convert the time series into a vector by using the assignment x <- warpbreaks$breaks. (In R, use ? warpbreaks for info on this dataset.) The values of x if assigned as above...
A simple Statistic question by using R, If I have two set of mean proportion data,...
A simple Statistic question by using R, If I have two set of mean proportion data, what test should I use? such as, [1] 0.7652632 0.7555354 0.7602588 0.7594096 0.7497992 0.5532588 0.7595661 0.6911504 [9] 0.5964602 0.6369565 0.7355828 0.7346225 0.5913793 0.6499079 0.6327273 0.6091873 [17] 0.6306122 0.5960784 0.5492918 0.6785714 0.5014787 0.5484848 0.5645403 0.6731343 [25] 0.6208191 0.6087248 0.6045045 0.7743390 0.5275862 0.5731278 [1] 0.6564195 0.5928482 0.6806709 0.5546422 0.5438393 0.5906535 0.6764637 0.6487188 [9] 0.5901547 0.6626735 0.5955325 0.7462415 0.5971111 0.5731504 0.6334729 0.6124653 [17] 0.6224686 0.5549067 0.6348427 0.6265627...
Using built in R functions to calculate mean and standard deviation. Simulate the X vector with...
Using built in R functions to calculate mean and standard deviation. Simulate the X vector with a length of 50 from a normal distribution with mean 2 and variance 1. Using a for() loop, create 100 different confidence intervals and also create a variable that keeps a count of how many of these confidence intervals contain the true mean 2. Hint: Use If/else statement to keep track of whether the confidence interval contains the true mean or not within the...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT