Question
For the following assignment, please submit your R code, the output, graphs and figures (if any), and your interpretation in a document which should have
For the following assignment, please submit your R code, the output, graphs and figures (if any), and your interpretation in a document which should have a cover page that shows your name, course number, instructor name, and the assignment number.
Before you begin this assignment, you must install and load the library "MASS" into your R Studio so that you can use sample data available within this package. To accomplish this task, you may use the following code:
install.packages("MASS")
library(MASS)
Using the designated dataset, conduct the appropriate t-tests in R (using the "t.test" function) to answer the following questions.
Part 1
Two-sample t-test with unequal variance:
Using the "cats" dataset, answer the question (see https://r-data.pmagunia.com/dataset/r-dataset-package-mass-catsLinks to an external site. to load the "cats" data set in "MASS" library): do male and female cat samples have the same bodyweight ("Bwt")? [Hint: one way to get separate vectors for male and female cat bodyweights is to use the subset function as follows: "male <- subset(cats, subset=(cats$Sex=="M"))"].
Part 2
To evaluate whether meditation has an effect on sleep quality, 10 students were recruited for a meditation workshop. They agreed to wear sleeping evaluators to measure their sleeping quality. The sleeping quality is on the scale 0-10 (the higher the better).
The average sleeping quality scores in the week before the workshop were: 4.6, 7.8, 9.1, 5.6, 6.9, 8.5, 5.3, 7.1, 3.2, 4.4.
The average sleeping quality scores in the week following the workshop were: 6.6, 7.7, 9.0, 6.2, 7.8, 8.3, 5.9, 6.5, 5.8, 4.9.
The researchers claimed that meditation improves sleeping quality. Is it true?
List all steps of your testing procedure clearly (using = 0.05) including
- stating your hypotheses,
- your code,
- your output and
- your findings along with interpretation.
Hint: Use two-sample hypothesis; ask yourself whether this should be a paired T test. Does your conclusion change if the level of significance changes from 0.05 to 0.1? Lastly, justify the testing procedure you choose , why use the test of your choice rather than other tests?
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