Question
Generate two samples of the length 4 from normal distributions with corresponding means 4 and 2, and variance=4. Assume that in these two samples means
Generate two samples of the length 4 from normal distributions with corresponding means 4 and 2, and variance=4.
Assume that in these two samples means are "mx" and "my", and that both variances are known and equal to 3. Test the null H0: mx=mx versus alternative H1: mx is larger than my and find the p-value.
In your answer display both random samples (4 and 4 numbers), the test statistic and p-value.
You can use:
To generate vector "x" containing N normally distributed random numbers you can use the command x=rnorm(N,mean,sd) , where mean is the mean, and sd is the standard deviation.
To compute the mean you can use mean(x).
To obtain cdf of the normal distribution you can use the command pnorm(x,mean,sd).
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