Question: There are many other statistical tests beyond the ones covered in our class. In this problem we will explore the correlation test. The hypotheses of

There are many other statistical tests beyond the ones covered in our class. In this problem we will explore the correlation test.

The hypotheses of the test are as follows, where is the population correlation:

H0: = 0; and

H1: Does not equal 0.

As with other statistical tests, you deduce the result based on taking a sample and calculating the p-value.

a. Generate 1000 random numbers from a normal distribution with mean 10 and standard deviation 2. Call this vector rand.x.

b. Generate 1000 random numbers from a normal distribution with mean 50 and standard deviation 10. Call this vector rand.y.

c. Calculate the correlation between the two variables using the function cor which takes as argument the two data sets.

d. Use cor.text to run a test to determine if there is statistical evidence that the population that these data came from is correlated? Print out the p-value. Does the result make sense? Explain.

e. The function cor.test also outputs a confidence interval. Report it and explain what it represents.

f. Now define a new vector rand.z which equals rand.x plus rand.y.

g. Run a correlation test between rand.z and rand.y. What are the results? Do the results make intuitive sense? Explain.

h. Plot two scatter plot; one depicting rand.x versus rand.y, and one depicting rand.z versus rand.y. Explain the difference, and why the plots provide a visual depiction of the results obtained in the previous parts.

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!