Answered step by step
Verified Expert Solution
Question
1 Approved Answer
10. 8 marks In this and the next questions, you will conduct simulation studies in R to explore the concepts we learned for hypothesis
10. 8 marks In this and the next questions, you will conduct simulation studies in R to explore the concepts we learned for hypothesis testing. For the first simulation study, use the rnorm() function to generate one random sample data (with sample size n = 5) from the distribution N(5, 1), and assign this data to an object called sample1. Then, generate another random sample data (with sample size 5) from the same distribution, and assign this data to an object called sample2. n = (a) Write down the five scores in samplel and the five scores in sample2. Attach the R code for generating the sample data. (b) What are the mean score for sample1 and the mean score for for sample2? What is the difference between these two means? (c) What is the population mean difference between the two groups of scores? Is it exactly the same with the sample mean difference? Explain why it is or it isn't the same. = a (d) Use t.test() function to conduct an independent-samples t-test. Our null hypoth- esis is Ho1 - 2 0. Our alternative hypothesis is H : 2 0. The code for the t-test is provided below. What are your obtained p-value and 95% confidence interval? Suppose = 0.05. Is your test significant? t.test(sample1, sample2, var.equal = T)
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