Getting data

days <- c(91,105,106,108,88,91,58,82,81,65,61,48,61,43,33,36)
ind <- c(16.7,17.1,18.2,18.1,17.2,18.2,16,17.2,18,17.2,16.9,17.1,18.2,17.3,17.5,16.6)

Q1) Scatter plot of data

plot(ind,days, main = "Scatter plot of Days to index ")

Q2) Least square estimate of the parameter

model <- lm(days~ind)
model
## 
## Call:
## lm(formula = days ~ ind)
## 
## Coefficients:
## (Intercept)          ind  
##      -193.0         15.3

Estimate of our fitted regression line came out to be as intercept is “-193” and slope is “15.3”

Q3) Add Least square line to scatter plot

plot(ind,days, main = "Scatter plot of Days to index ")
abline(model)

## Q4) Model Adequacy

plot(model)

As we can see that in residual vs fitted plot we are able to see a pattern of decresing funnel shape , hence we can say our assumption of constant variance doesnt holds true here .

We can see from the normal plot that th data points fairly fall in a straight line , hence we can say that they are fairly normally distributed

We can see from the Sqrt(standardized residual) vs fitted values , we can see that there are none of the points which seems to far away and they also lie within the value of 1.5 on y axis . And hence we claim that there are no outliers which are significantlty affecting our regression model

Q5) Does Regression appers to be significant ?

using hypothesis test

\(Null Hypothesis :Ho : B_1 = 0\)

\(ALternative Hypothesis : Ha : B_1 \neq 0\)

summary(model)
## 
## Call:
## lm(formula = days ~ ind)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -41.70 -21.54   2.12  18.56  36.42 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)
## (Intercept) -192.984    163.503  -1.180    0.258
## ind           15.296      9.421   1.624    0.127
## 
## Residual standard error: 23.79 on 14 degrees of freedom
## Multiple R-squared:  0.1585, Adjusted R-squared:  0.09835 
## F-statistic: 2.636 on 1 and 14 DF,  p-value: 0.1267

As we can see that p value which is 0.1267 is greater than 0.05, hence we fail to reject Null Hypothesis and we claim here that Our regression model is not significant