Write down the five scores in sample1 and the five scores in sample2. Attach the R code for generating the sample data. What are the mean score for sample1 and the mean score for for sample2? What is the difference between these two means? 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. : Use t.test() function to conduct an independent-samples t-test. Our null hypoth- esis is Ho 1-2 0. Our alternative hypothesis is Ha 1-2 0. The code for the t-test is provided below. What are your obtained p-value and 95% confidence interval? Suppose a = 0.05. Is your test significant?

MATLAB: An Introduction with Applications
6th Edition
ISBN:9781119256830
Author:Amos Gilat
Publisher:Amos Gilat
Chapter1: Starting With Matlab
Section: Chapter Questions
Problem 1P
icon
Related questions
Question
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
n = 5) from the same distribution, and assign this data to an object called sample2.
(a) Write down the five scores in sample1 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.
(d) Use t.test() function to conduct an independent-samples t-test. Our null hypoth-
esis is Ho 1-2 = 0. Our alternative hypothesis is Ha 1-2 0. The code for
the t-test is provided below. What are your obtained p-value and 95% confidence
interval? Suppose a = 0.05. Is your test significant?
t.test (sample1, sample2, var.equal = T)
Transcribed Image Text: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 n = 5) from the same distribution, and assign this data to an object called sample2. (a) Write down the five scores in sample1 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. (d) Use t.test() function to conduct an independent-samples t-test. Our null hypoth- esis is Ho 1-2 = 0. Our alternative hypothesis is Ha 1-2 0. The code for the t-test is provided below. What are your obtained p-value and 95% confidence interval? Suppose a = 0.05. Is your test significant? t.test (sample1, sample2, var.equal = T)
Expert Solution
steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Similar questions
Recommended textbooks for you
MATLAB: An Introduction with Applications
MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc
Probability and Statistics for Engineering and th…
Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning
Statistics for The Behavioral Sciences (MindTap C…
Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning
Elementary Statistics: Picturing the World (7th E…
Elementary Statistics: Picturing the World (7th E…
Statistics
ISBN:
9780134683416
Author:
Ron Larson, Betsy Farber
Publisher:
PEARSON
The Basic Practice of Statistics
The Basic Practice of Statistics
Statistics
ISBN:
9781319042578
Author:
David S. Moore, William I. Notz, Michael A. Fligner
Publisher:
W. H. Freeman
Introduction to the Practice of Statistics
Introduction to the Practice of Statistics
Statistics
ISBN:
9781319013387
Author:
David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:
W. H. Freeman