1 Stating the Hypothesis:

Null:\[H_o:\beta_{1}=0\space\space\]

Alternate:

\[H_a:\beta_{1}\neq0\space\space\]

Where,

Ho = The number of changeovers has no effect on the actual production output (Transfers)

Ha = The number of changeovers has a significant effect on the actual production output (Transfers)

\(\beta_{1}\) = The coefficient associated with the Changeovers variable. In this linear regression analysis, this coefficient represents the change in the response variable (Transfers) for a one-unit change in the predictor variable (Changeovers)

2 Creating a data frame:

data <- data.frame(
  Week = c(29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41),
  Transfers = c(1520300, 1495800, 1478900, 1091300, 1134400, 1483500, 
                1426000, 1366700, 1544600, 1424200, 1440200, 1500500, 1383900),
  Changeovers = c(5, 5, 6, 7, 5, 7, 3, 5, 6, 3, 7, 3, 5)
)

3 Using Simple Linear Regression Model

$$Y = \beta_{o}+\beta_{1}X+\epsilon$$

Where:

  • Y is the response variable (in this case, Transfers).

  • X is the predictor variable (in this case, Changeovers).

  • \(\beta_{0}\)​ is the intercept (estimated value of Y when \(\beta_{0}\)=0)

  • \(\beta_{1}\)​ is the slope (change in Y for a one-unit change in X)

  • \(\epsilon\) represents the error term (the difference between the observed value and the predicted value).

model <- lm(Transfers ~ Changeovers, data=data)

4 View Summary of the Model

summary(model)
## 
## Call:
## lm(formula = Transfers ~ Changeovers, data = data)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -282463  -25811   54841   87163  152863 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  1499581     152072   9.861  8.5e-07 ***
## Changeovers   -17974      28466  -0.631    0.541    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 144300 on 11 degrees of freedom
## Multiple R-squared:  0.03498,    Adjusted R-squared:  -0.05275 
## F-statistic: 0.3987 on 1 and 11 DF,  p-value: 0.5407
--> Result: The p-value (0.5407) is higher than the conventional significance level of 0.05, suggesting that the model as a whole is not statistically significant and hence we cannot reject the Null Hypothesis.In practical terms, this means that the number of changeovers does not appear to be a strong predictor of the actual production output (Transfers).

5 Scatter plot of Changeovers vs. Transfers

plot(data$Changeovers, data$Transfers, main="Changeovers vs. Transfers", xlab="Changeovers", ylab="Transfers", pch=16)

# Add a regression line
abline(lm(data$Transfers ~ data$Changeovers), col="red")

# Add text annotation for the coefficient
coef_text <- sprintf("For every additional unit of Changeovers,\nwe expect Transfers to decrease by\napproximately %.0f units", -17974)
text(4, 150000, coef_text, pos=3)

--> For every additional unit of Changeovers, we expect Transfers to decrease by approximately 17974 units. However, this coefficient is not statistically significant, as indicated by the high p-value (0.541). the lack of statistical significance (high p-value) suggests that we cannot confidently say that Changeovers has a significant impact on Transfers, even though the coefficient suggests a negative association in case there were a significant relationship. This indicates that while there might be an estimated impact, it's not strong enough to be considered statistically significant in this dataset.