Question

Question Type 1 The following data sets each contain 3 random observations of two variables. For each data set, answer the fo

Question 1

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

#code in R


wage <- c(16.20,12.36,14.4,12)
educ <- c(13,13,12,12)
t.test(wage,mu=15)
t.test(educ,mu = 12)
cor(wage,educ)
model <- lm(wage~educ)
summary(model)
predict(model,data.frame(educ=15))

#running the code

> wage <- c(16.20,12.36,14.4,12)
> educ <- c(13,13,12,12)
> t.test(wage,mu=15)

        One Sample t-test

data:  wage
t = -1.2916, df = 3, p-value = 0.287
alternative hypothesis: true mean is not equal to 15
95 percent confidence interval:
 10.63552 16.84448
sample estimates:
mean of x 
    13.74 

> t.test(educ,mu = 12)

        One Sample t-test

data:  educ
t = 1.7321, df = 3, p-value = 0.1817
alternative hypothesis: true mean is not equal to 12
95 percent confidence interval:
 11.58131 13.41869
sample estimates:
mean of x 
     12.5 

> cor(wage,educ)
[1] 0.3195994
> model <- lm(wage~educ)
> summary(model)

Call:
lm(formula = wage ~ educ)

Residuals:
    1     2     3     4 
 1.92 -1.92  1.20 -1.20 

Coefficients:
            Estimate Std. Error t value Pr(>|t|)
(Intercept)    0.240     28.325   0.008    0.994
educ           1.080      2.264   0.477    0.680

Residual standard error: 2.264 on 2 degrees of freedom
Multiple R-squared:  0.1021,    Adjusted R-squared:  -0.3468 
F-statistic: 0.2275 on 1 and 2 DF,  p-value: 0.6804

> predict(model,data.frame(educ=15))
    1 
16.44 

i)

95% confidence interval for wage =

 10.63552 16.84448

95% confidence interval for education =

11.58131 13.41869

ii)

correlation =

0.3195994

iii)

b0 = 0.24

b1 = 1.08

y^ = 0.240 + 1.08 x

iv)

16.44 

v)

R^2 = 0.1021

Add a comment
Know the answer?
Add Answer to:
Question 1 Question Type 1 The following data sets each contain 3 random observations of two variables. For each data set, answer the following questions: Question (a) The data below is a random samp...
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