In: Statistics and Probability
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.
R code along with outout and explination is attached herewith.
DO Hit the like button if you like the solution.