Question

We wish to compare the expected values, μΧ andHy of two independent normal populations, say X and Y, with known standard deviations σχ-8.3 and Ơy-10.1 . we take a random sample of size 13 from X ( X1M, ,x13 ) and a random sample of size 7 from Y ( Yi,½, , ) 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 Hx -Hy. Call the sample means of X and Y, Xbar and Ybar respectivelyxbar and ybar realized values). Assume that all distributions are normal. Use R for computations. 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 Ah-uy? g) Create a 96% confidence interval for Ax- h) What is the length of your 96% confidence interval for,h-ly? Enter a number i) What would the p value have been if we used this data to test Ho:x -Hy 0 against the alternative Hay0? k) Copy your R script for the above into the text box herePLEASE INSERT R SCRIPT

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

R-Output

  
> X = c(0.51,-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 = c(21.22,12.61,15.04,14.51,10.91,-4.90,22.71)
>
>
> ##given
>
> sig_x = 8.3
> sig_y = 10.1
>
> #a)
> mean(X)
[1] 11.26692
>
>
> #b)
> var_of_xbar = sig_x/length(X)
> var_of_xbar
[1] 0.6384615
>
>
> #c)
> mean(Y)
[1] 13.15714
>
>
> #d)
> var_of_ybar = sig_y/length(Y)
> var_of_ybar
[1] 1.442857
>
>
> #f)
> qt(1-0.04/2, 13-7)
[1] 2.612242
>
>
> #g)
> fit = t.test(X,Y, conf.level = 0.96)
> fit$conf.int
[1] -11.713954 7.933515
attr(,"conf.level")
[1] 0.96
>
> #h)
>
> lenthofCI = 7.93351 - (-11.713954)
> lenthofCI
[1] 19.64746
>
> #I) p-value
> fit$p.value
[1] 0.6673191
>
>
>
>
>
>
>
>

#########################################################################

R-Script -


X = c(0.51,-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 = c(21.22,12.61,15.04,14.51,10.91,-4.90,22.71)

##given

sig_x = 8.3
sig_y = 10.1

#a)
mean(X)


#b)
var_of_xbar = sig_x/length(X)
var_of_xbar


#c)
mean(Y)


#d)
var_of_ybar = sig_y/length(Y)
var_of_ybar


#f)
qt(1-0.04/2, 13-7)


#g)
fit = t.test(X,Y, conf.level = 0.96)
fit$conf.int

#h)

lenthofCI = 7.93351 - (-11.713954)
lenthofCI

#I) p-value
fit$p.value

Add a comment
Know the answer?
Add Answer to:
PLEASE INSERT R SCRIPT We wish to compare the expected values, μΧ andHy of two independent...
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
  • #5 Need this solved along with the R code asap. Thank you very much in advance...

    #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...

  • We wish to compare the expected values, Hx and Hy of two independent normal populations, say...

    We wish to compare the expected values, Hx and Hy of two independent normal populations, say X and Y, with known standard deviations Ox = 7.3 and Oy = 11.1. We take a random sample of size 10 from X (X1, X2, ...,X10 ) and a random sample of size 8 from Y( V1, V2, ...,Y8) as follows: X: 6.96, 26.95, 17.86, 11.53, 10.81, 27.00, 21.10, 11.30, 19.80, 16.86 Y: 10.50, 33.50, 17.22, 31.57, 8.20, 21.94, 43.21, 20.78 We are...

  • *ANSWER USING R-SCRIPT* We desire to know the probability that a voter supports a controversial rose...

    *ANSWER USING R-SCRIPT* We desire to know the probability that a voter supports a controversial rose proposal. From a random sample of 3100, x =1331 voters support the rose proposal. Let phat be the sample proportion supporting the rose proposal. Answer the following: a) what is the variance of p hat b) As a function of p, what is the standard deviation of p hat c) Calculate p hat d) Let ptot be the random variable representing the voters in...

  • Please solve the questions using R language and attach the script with it!!! zoom it if...

    Please solve the questions using R language and attach the script with it!!! zoom it if the picture is not clear. Please solve the questions using R language and attach the script with it!!! Please solve the questions using R language and attach the script with it!!! What is the probability that a penny I have will land "heads" when tossed? To analyze this question I randomly toss the coin, n=3901 times. On x = 2500 of these tosses, the...

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