Question
Purpose : One of the most commonly made decisions is based on comparing the means of multiple conditions. Significance tests for comparing means are critical
Purpose:
One of the most commonly made decisions is based on comparing the means of multiple conditions. Significance tests for comparing means are critical in the decision making process. In this assignment, you will practice how to use t tests and ANOVA tests to compare the means of multiple conditions under one independent variable in different experiment design (between-group and within-group)
Tasks:Please write an R script that performs the following operations in the order listed. At the beginning of each task, write a comment marking the task number.
Name the file as: lab5-
T tests:
- Import the 'iristtest.csv' dataset. Browse and understand the data in each column
- Compute descriptive statistics and create boxplot for petal length and species.
- Select the appropriate t test to determine whether there is significant difference in petal length between the two species. Make sure you check whether the assumptions are met. Run the t test if the assumptions are met. Use the standard template to report the result.
- Import the 'weightTtest.csv' dataset. This dataset contains the weight of mice before and after a specific treatment. Browse and understand the data in each column
- Compute descriptive statistics and create boxplot.
- Select the appropriate t test to determine whether there is significant difference in the weight before and after the treatment. Make sure you check whether the assumptions are met. Run the t test if the assumptions are met. Use the standard template to report the result.
ANOVA tests
- Import the 'iris.csv' dataset. Browse and understand the data in each column
- Compute descriptive statistics and create boxplot for sepal length and species.
- Select the appropriate test to determine whether there is significant difference in sepal length between the three species. Follow the steps of ANOVA analysis. Make sure you check whether the assumptions are met. If a specific assumption is not met, you need to take specific action or make the decision that ANOVA test is not suited for the data. Use the standard template to report the result if ANOVA test is appropriate.
Note: If the homogeneity is not met, you need to transform the data to logarithm. Sample code:
iris$Sepal.L.Log <- log(iris$Sepal.Length)
- Import the 'weightanova.csv' dataset. This dataset contains the weight of mice measured at 3 different time points. Browse and understand the data in each column
- Compute descriptive statistics and create boxplot to get some general understanding of the data.
- Select the appropriate test to determine whether there is significant difference in weight between different time points. Follow the steps of ANOVA analysis. Make sure you check whether the assumptions are met. If a specific assumption is not met, you need to take specific action or make the decision that ANOVA test is not suited for the data. Use the standard template to report the result if ANOVA test is appropriate.
Files needed
https://blackboard.towson.edu/bbcswebdav/pid-7415228-dt-content-rid-63380023_2/xid-63380023_2
https://blackboard.towson.edu/bbcswebdav/pid-7415228-dt-content-rid-63380022_2/xid-63380022_2
https://blackboard.towson.edu/bbcswebdav/pid-7415228-dt-content-rid-63380021_2/xid-63380021_2
https://blackboard.towson.edu/bbcswebdav/pid-7415228-dt-content-rid-63380020_2/xid-63380020_2
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started