Question

In: Statistics and Probability

Use a t-test to test the null hypothesis H0: µX = µY against the two-sided alternative...

Use a t-test to test the null hypothesis H0: µX = µY against the two-sided alternative Ha: µX ≠ µY. Use R program

(a) Generate 30 values from X ~ N (µX = 10, σX = 4) and 30 values from Y ~ N (µY = 10, σY = 4). . Use a t-test to test the hypotheses given above.

(b) Include a comment in your code that identifies the p-value and clearly state the conclusion of the test in part (a).

The conclusion is either “Reject H0” or “Do not reject H0”

(c) Repeat part (a) 4000 times, and retain the p-value for each of the 4000 tests. Each repetition should generate a new sample for x and a new sample for y.

Do not use a loop to perform the repetitions.

Solutions

Expert Solution

R code along with outout and explination is attached herewith.

DO Hit the like button if you like the solution.


Related Solutions

Suppose we want to test the null hypothesis H0 : p = 0.28 against the alternative...
Suppose we want to test the null hypothesis H0 : p = 0.28 against the alternative hypothesis H1 : p ≠ 0.28. Suppose also that we observed 100 successes in a random sample of 400 subjects and the level of significance is 0.05. What are the critical values for this test? a. -1.96 and 1.96 b. 0.05 and 0.01 c. -1.39 and 1.39 d. -1.6449 and 1.6449
Question 1. a) The P-value for a two-sided test of the null hypothesis H0: mu =...
Question 1. a) The P-value for a two-sided test of the null hypothesis H0: mu = 30 is 0.08 i.) Does the 95% confidence interval include the value of 30? Explain. ii.) Does the 90% confidence interval include the value of 30? Explain. b) A 95% confidence for a population mean is (57,65) i.) Can you reject the null hypothesis that mu = 68 at the 5% significance level? Explain. ii.) Can you reject the null hypothesis that mu =...
1. Test the null hypothesis that the coefficient of x1 is zero versus the two-sided alternative....
1. Test the null hypothesis that the coefficient of x1 is zero versus the two-sided alternative. What is t? (report to 2 decimal places) n = 43 y = 1.6 + 6.4x1 + 5.7x2 SEb1 = 2.9 Can we reject the null hypothesis? 2. Test the null hypothesis that the coefficient of x1 is zero versus the two-sided alternative. What is t? (report to 2 decimal places) n = 25 y = 1.6 + 6.4x1 + 5.7x2 SEb1 = 3.3...
Test the null hypothesis that the coefficient of x1 is zero versus the two-sided alternative. What...
Test the null hypothesis that the coefficient of x1 is zero versus the two-sided alternative. What is t? (report to 2 decimal places) n = 104 y = 1.6 + 4.8x1 + 3.2x2 + 5.2x3 SEb1 = 1.8
Consider a general one-sided hypothesis test on a population mean µ with null hypothesis H0 :...
Consider a general one-sided hypothesis test on a population mean µ with null hypothesis H0 : µ = 0, alternative hypothesis Ha : µ > 0, and Type I Error α = 0.02. Assume that using a sample of size n = 100 units, we observe some positive sample mean x > 0 with standard deviation s = 5. (a) Calculate the Type II Error and the power of the test assuming the following observed sample means: (i) x =...
A t statistic was used to conduct a test of the null hypothesis H0: µ =...
A t statistic was used to conduct a test of the null hypothesis H0: µ = 11 against the alternative Ha: µ ≠ 11, with a p-value equal to 0.042. A two-sided confidence interval for µ is to be considered. Of the following, which is the largest level of confidence for which the confidence interval will NOT contain 11? A 90% confidence level A 92% confidence level A 96% confidence level A 97% confidence level A 98% confidence level
For a hypothesis test of H0: p = 0.65 against the alternative Ha: p < 0.65,...
For a hypothesis test of H0: p = 0.65 against the alternative Ha: p < 0.65, the z test statistic is found to be -2.35. What can be said about his finding? The finding is significant at both α = 0.05 and α = 0.01. The finding is significant at α = 0.05 but not at α = 0.01. The finding is significant at α = 0.01 but not at α = 0.05. The finding is not significant at α...
Test the null hypothesis H0:μ=3.8against the alternative hypothesis HA:μ<3.8, based on a random sample of 25...
Test the null hypothesis H0:μ=3.8against the alternative hypothesis HA:μ<3.8, based on a random sample of 25 observations drawn from a normally distributed population with x¯=3.6 and σ=0.72. a) What is the value of the test statistic? Round your response to at least 3 decimal places.     b) What is the appropriate p-value? Round your response to at least 3 decimal places.     c) Is the null hypothesis rejected at: i) the 10% level of significance?      YesNoClick for List   ii) the...
Test the null hypothesis H0:μ=3.8against the alternative hypothesis HA:μ≠3.8, based on a random sample of 35...
Test the null hypothesis H0:μ=3.8against the alternative hypothesis HA:μ≠3.8, based on a random sample of 35 observations drawn from a normally distributed population with x¯=4 and σ=0.89. a) What is the value of the test statistic? Round your response to at least 3 decimal places.     b) What is the appropriate p-value? Round your response to at least 3 decimal places.     c) Is the null hypothesis rejected at: i) the 5% level of significance?      NoYesClick for List   ii) the...
Test the null hypothesis H0:μ=3.3against the alternative hypothesis HA:μ≠3.3, based on a random sample of 37...
Test the null hypothesis H0:μ=3.3against the alternative hypothesis HA:μ≠3.3, based on a random sample of 37 observations drawn from a normally distributed population with x¯=3.5 and σ=0.89. a) What is the value of the test statistic? Round your response to at least 3 decimal places.     b) What is the appropriate p-value? Round your response to at least 3 decimal places.     c) Is the null hypothesis rejected at: i) the 5% level of significance?      YesNoClick for List   ii) the...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT