## usefulrange brightness contrast
## 1 96 54 56
## 2 50 61 80
## 3 50 65 70
## 4 112 100 50
## 5 96 100 65
## 6 80 100 80
## 7 155 50 25
## 8 144 57 35
## 9 255 54 26
plot(correlator.data)
multiple.regression <- lm(usefulrange ~ brightness + contrast, data=correlator.data)
summary(multiple.regression)
##
## Call:
## lm(formula = usefulrange ~ brightness + contrast, data = correlator.data)
##
## Residuals:
## Min 1Q Median 3Q Max
## -32.334 -20.090 -8.451 8.413 69.047
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 238.5569 45.2285 5.274 0.00188 **
## brightness 0.3339 0.6763 0.494 0.63904
## contrast -2.7167 0.6887 -3.945 0.00759 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 36.35 on 6 degrees of freedom
## Multiple R-squared: 0.7557, Adjusted R-squared: 0.6742
## F-statistic: 9.278 on 2 and 6 DF, p-value: 0.01459
Formula for multiple linear regression model:
\[ y = \beta_0 + \beta_1 X_1 + \beta_2 X_2\] where
y = Useful range (ng)
B0 = y-intercept
B1 = slope 1 B2 = slope 2 X1 = Brightness (%)
X2 = Contrast (%)
Inputting the values solved by our code chunk,
\[ y = 238.56 + 0.3339 X_1 + (-2.7167) X_2 \\ \\ = 238.56 + 0.3339 X_1 -2.7167 X_2\]
(summary(multiple.regression)$sigma)**2
## [1] 1321.273
As seen from the results by our code chunk,
\[ SE(\beta_0)= 45.2285 \\ SE(\beta_1)= 0.6763 \\ SE(\beta_2)= 0.6887\]
We will use our multiple regression model and will be inputting our values knowing that X1 = 80 and X2 = 75.
\[ y = 238.56 + 0.3339 X_1 -2.7167 X_2 \\ = 238.56 + 0.3339(80) - 2.7167(75) \\ y = 61.5195 \]
As seen in our code chunk, the p-value for this test is 0.01459. As we should know, the p-value for a variable is less than our significance level, we have enough evidence to reject our null hypothesis. Since we are given the significance level 𝛼=0.05,
\[ 0.01459 < 0.05 \]
Therefore,