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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!