Question

#5

Need this solved along with the R code asap. Thank you very much in advance for the work. Right click and Open image in a new tab if it is too small to see.

we wish to compare the expected values, μ× andWy of two independent normal populations, say X and Y, with known standard deviations ox-8.3 and ay-10.. we take a random sample of size 13 from X (XiX2. .Xi3) and a random sample of size 7 from Y (Y,Y) as follows: X: 0.54,-3.67, 1.41, 23.51, 20.77, 15.90, 16.70, 2.48, 12.27, 2.64, 22.12, 14.03, 17.80 Y: 21.22, 12.61, 15.04, 14.51, 10.91, -4.90, 22.71 we are interested in examining їх су дії the sample means o x and Y Xbar and Ybar respectively xbar and y ar realized values Assume a al distributions are normal computations. e r a)Calculate xbar b) Calculate the variance of Xbar c) Calculate ybar d) Calculate the variance of Ybar e) Calculate the variance of Xbar Ybar f) What is the critical value used for a 96% confidence interval for μΧ-ey? g) Create a 96% confidence interval for Ax-uy. h) what is the length of your 96% confidence interval for, x- y? | ) What would the p value have been if we used this data to test Hoix -Hy-0 against the alternative Ha 4 -Hy02 k) Copy your R script for the above into the text box here

0 0
Add a comment Improve this question Transcribed image text
Answer #1

> x=c(0.54,-3.67,1.41,23.51,20.77,15.9,16.7,2.48,12.27,2.64,
+ 22.12,14.03,17.8)
>
> y=c(21.22,12.61,15.04,14.51,10.91,-4.9, 22.71)
>
> # a) The mean of x is
> Xbar=mean(x)
> Xbar
[1] 11.26923
>
> # b) Variance of Xbar is
>
> V.Xbar=8.3^2/length(x)
> V.Xbar
[1] 5.299231
>
> # c) The mean of Y is
> Ybar=mean(y)
> Ybar
[1] 13.15714
>
> # d) Variance of Ybar is
>
> V.Ybar=10.1^2/length(y)
> V.Ybar
[1] 14.57286
>
> # e) Var of Xbar-Ybar is
>
> V.dif=V.Xbar+V.Ybar
> V.dif
[1] 19.87209
>
>
> # f) The critical value for 96% Confidence interval of \muX-\muY is
> z=qnorm(.98, 0,1)
> z
[1] 2.053749
>
> # g) 96% CI for \muX-\muY
> Lower_limit=Xbar-Ybar-z*sqrt(V.dif)
> Lower_limit
[1] -11.04314
>
> Upper_limit=Xbar-Ybar+z*sqrt(V.dif)
> Upper_limit
[1] 7.267314
>
>
> # h) Length of 96% CI is
>
> Length=Upper_limit-Lower_limit
> Length
[1] 18.31045
>
> ## i) The p-value for \muX-\muY>0
>
> P.value=pnorm((Xbar-Ybar)/sqrt(V.dif), 0,1)
> P.value
[1] 0.3359629

## k)

x=c(0.54,-3.67,1.41,23.51,20.77,15.9,16.7,2.48,12.27,2.64,
22.12,14.03,17.8)

y=c(21.22,12.61,15.04,14.51,10.91,-4.9, 22.71)

# a) The mean of x is
Xbar=mean(x)
Xbar

# b) Variance of Xbar is

V.Xbar=8.3^2/length(x)
V.Xbar

# c) The mean of Y is
Ybar=mean(y)
Ybar

# d) Variance of Ybar is

V.Ybar=10.1^2/length(y)
V.Ybar

# e) Var of Xbar-Ybar is

V.dif=V.Xbar+V.Ybar
V.dif


# f) The critical value for 96% Confidence interval of \muX-\muY is
z=qnorm(.98, 0,1)
z

# g) 96% CI for \muX-\muY
Lower_limit=Xbar-Ybar-z*sqrt(V.dif)
Lower_limit

Upper_limit=Xbar-Ybar+z*sqrt(V.dif)
Upper_limit


# h) Length of 96% CI is

Length=Upper_limit-Lower_limit
Length

## i) The p-value for \muX-\muY>0

P.value=pnorm((Xbar-Ybar)/sqrt(V.dif), 0,1)
P.value

Add a comment
Know the answer?
Add Answer to:
#5 Need this solved along with the R code asap. Thank you very much in advance...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT