Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

we wish to compare the expected values, and Hy of two independent normal populat

ID: 3314334 • Letter: W

Question

we wish to compare the expected values, and Hy of two independent normal populations, say X and Y, with known standard deviations Ax = 1.1 and = 1.3. we take a random sample of size 12 from x ( X1,x2, ,x12 ) and a random sample of size 9 from Y (Yi,Y2, ,Y9 ) as follows: x: 3.84, 6.18, 5.85, 5.82, 3.66, 3.83, 4.09, 7.25,5.69, 3.99, 6.17, 5.36 Y: 5.34, 6.43, 5.61, 5.17, 6.93, 3.37, 6.06, 4.15, 5.83 we are interested in examining Ak-uy. Call the sample means of X and Y, Xbar and Ybar respectively(xbar and ybar realized values). Assume that all distributions are normal. Use R for computations. a)Calculate xbar 5.144 b) Calculate the variance of Xbar 1.448 x c) Calculate ybar 5.432 d) Calculate the variance of Ybar. 1.224619 X e) Calculate the variance of Xbar-Ybar.[1.3542 × f) what is the critical value used for a 95% confidence interval for Ax-uy? 1.96 g) Create a 95% confidence interval for Ax-ly. ( 2.14762 X , 2.14762 i) what is the length of your 95% confidence interval for Ax-Hy? 2.0056 j) What would the p value have been if we used this data to test Ho:x Hy against the alternative Ha:Px-Hy> 0? 5767 × ) k) Copy your R script for the above into the text box here. >x-c(3.84, 6.18, 5.85,5.82, 3 66, 3.83, 4.09, 7.25, 5.69, 3.99,6.17,5.36) >yc-c(5.34, 6.43, 5.61, 6.17, 6.93,3.37, 6.06, 4.15, 5.83) xbarc-mean(x)

Explanation / Answer

Please see the R script as below

x <- c(3.84,6.18,5.85,3.66,3.83,4.09,7.25,5.69,3.99,6.17,5.36)
y <- c(5.34,6.43,5.61,5.17,6.93,3.37,6.06,4.15,5.83)

## ttest

t <- t.test(x,y,conf.level = 0.95,alternative = "two.sided")
t

##range

t$conf.int


# range is

t$conf.int[2] - t$conf.int[1]

The results are

> t$conf.int
[1] -1.4547381 0.7557482
attr(,"conf.level")
[1] 0.95
>
>
> # range is
>
> t$conf.int[2] - t$conf.int[1]
[1] 2.210486

> t

   Welch Two Sample t-test

data: x and y
t = -0.66479, df = 17.834, p-value = 0.5147
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-1.4547381 0.7557482

sample estimates:
mean of x mean of y
5.082727 5.432222