Which one of the following statements is not true with regard to the Student’s t-test?
a) The test is carried out via the t.test() command.
b) You can specify the test data as a formula of the form y ~ x.
c) By default, variance is assumed unequal, so you set var.equal = TRUE to force the assumption of equality.
d) You can carry out a matched pair test by adding paired = TRUE as an instruction.
e) You can carry out a one-sample test by specifying mean = n, where n is the mean to test against.
Sol:
with lm function in R we fit model of y on x
to perform t test in R ,with t.test function
to set equal variance set var.equaL=TRUE
to conduct paired t test set paired=TRUE
we can specify mu ,hypothesized mean as mu= in R
so statements ehich are not true is
Ex Rcode:
X <- c(31,35,19,20,23,27,25)
X
t.test(x,var.equal = TRUE,mu=56)
Output:
data: x
t = -46, df = 10, p-value = 5.677e-13
alternative hypothesis: true mean is not equal to 56
95 percent confidence interval:
7.771861 12.228139
sample estimates:
mean of x
10
b) You can specify the test data as a formula of the form y ~ x.
e) You can carry out a one-sample test by specifying mean = n, where n is the mean to test against.
Get Answers For Free
Most questions answered within 1 hours.