How can I find if I should t-test or chi-squared test if I am given a problem like the following?
Consider testing $H_0: \sigma^2_X = \sigma^2_Y$ against $H_1: \sigma^2_X ≠ \sigma^2_Y$ from two independent samples from normal populations with unknown means $\mu_X$ and $\mu_Y$ and standard deviations $\sigma_X$ and $\sigma_Y$. The $X$'s are 11.4, 9.7, 11.4, 13.3, 7.4, 8.5, 13.4, 17.4, 12.7. The $Y$'s are 3.2, 2.7, 5.5, -0.9, -1.8. Find the value of the test statistic.
P.S.: I know how to do the
t.test when I just one hypothesis ($H_0$)! How should I write R script to do the above problem when I have more than one hypothesis? What are some good external R related script to this question that I can cover for seeing similar example?
> X = c( 11.4, 9.7, 11.4, 13.3, 7.4, 8.5, 13.4, 17.4, 12.7) > Y = c(3.2, 2.7, 5.5, -0.9, -1.8) > ?t.test > t.test(X, Y) Welch Two Sample t-test data: X and Y t = 5.9114, df = 8.306, p-value = 0.0003089 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: 6.092637 13.805141 sample estimates: mean of x mean of y 11.68889 1.74000 > chisq.test(X, Y) Error in chisq.test(X, Y) : 'x' and 'y' must have the same length