I want to know if Thing One influences Thing Two, and if so, how much influence
ID: 3232024 • Letter: I
Question
I want to know if Thing One influences Thing Two, and if so, how much influence it has. I also want to be 95% confident in the conclusion.
Regression Equation: yhat = Answer + Answer X
Confidence interval for B1: (Answer to Answer)
Using the regression for prediction - so if Thing One is 84, what is Thing Two?
Answer
F Test Answer
p-value for F test Answer
t test Answer
p-value for t test Answer
Assuming Thing One influences Thing Two, how much influence does it have?
Answer %
Does Thing One influence Thing Two? Answeryesno
(Please note, sometimes some of these numbers below appear as 'non numeric' in the spreadsheet. If you get that error, and you see that some numbers do not line up with the others, just retype the numbers that are lined up on the left instead of the right)
Please highlight the answers. Thanks
Thing One Thing Two 91 11 4 27 3 74 43 92 2 75 50 66 46 43 81 42 98 8 98 82 55 24 70 53 85 84 5 27 39 6 94 41 62 63 34 86 59 77 40 8 89 17 6 62 44 20 7 94 32 29 84 8Please highlight the answers. Thanks
Explanation / Answer
I am using R software to solve this problem.
First we can load the data into R environment as below:
Data <- read.table("Data.txt",header = T, sep = " ")
Now we can fit a linear model in R usng the lm() function. Here we want to investigate if thing one influences thing two. So ThingOne is the independent variable and Thing2 is the dependent variable.
#Fit a linear model
fit <- lm(ThingTwo ~ ThingOne, data = Data)
#Print summary
summary(fit)
Call:
lm(formula = ThingTwo ~ ThingOne, data = Data)
Residuals:
Min 1Q Median 3Q Max
-43.454 -28.059 2.599 18.842 45.384
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 57.9401 10.8883 5.321 1.85e-05 ***
ThingOne -0.2176 0.1809 -1.203 0.241
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 29.76 on 24 degrees of freedom
Multiple R-squared: 0.05685, Adjusted R-squared: 0.01755
F-statistic: 1.447 on 1 and 24 DF, p-value: 0.2408
So regression equation is:
ThingTwo = 57.9401 - 0.2176 * ThingOne
F statistic value is 1.447. And p value for F statistic is 0.2408
t test value is -1.203. And p value for t test is 0.241
Confidence interval can be found out using confint() function in R.
confint(fit)
2.5 % 97.5 %
(Intercept) 35.4678580 80.4124199
ThingOne -0.5909804 0.1557895
We can predict the ThingTwo value for ThingOne value of 84 using predict() function in R as below:
NewData <- data.frame(ThingOne = 84)
predict(fit,newdata = NewData)
= 39.66212
No,OneThing does not influence ThingTwo as the F test is not significant. p value associated with it is not significant. Also the p value for the t test is not coming significant.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.