Linear Statistical Models, End Term
Let be i.i.d. samples from population , where . Find the distribution of . [2 Marks]
(a) What is the difference between “variability within classes” and “variability between classes”? [2 Marks]
(b) Suppose our objective is “To study the heights of students in three different classrooms (Class A, Class B, and Class C)”.
How will you define the “variability within classes” and “variability between classes” for the objective. [2 Marks]
Differentiate between the random effect model and fixed effect model for one-way classification. Define all the notations and assumptions properly. [6 Marks]
Owner of a manufacturing company has purchased three new machines of different types and wishes to determine whether one of them is faster than the others in producing a certain output. Five hourly production figures are observed at random from each machine and the results are given in the following table.
| Machine | Machine | Machine |
|---|---|---|
| 25 | 10 | 20 |
| 30 | 15 | 30 |
| 25 | 25 | 25 |
| 25 | 20 | 25 |
| 20 | 30 | 25 |
(i). Compute the treatment means for each of the given treatment and the overall mean of the given observations. [2 Marks]
(ii). Find the Sum of squares between groups (or sum of squares due to treatments), i.e., and Sum of squares within groups (sum of squares due to error), i.e. . [4 Marks]
(iii). Compute mean sum of squares between groups and within groups, i.e. and . [2 Marks]
(iv). If the owner wishes to test whether the machines are significantly different in their mean speeds, then write down the null and alternative hypothesis to be tested for it. [2 Marks]
(v). Perform hypothesis testing for the above defined hypothesis and conclude your results. [4 Marks]
(vi). Write down the ANOVA table for the above given model. [3 Marks]
1. Let $X_1, X_2, \ldots, X_n$ be i.i.d. samples from population $X$, where $X \sim \mathrm{N}(\mu, \sigma^2)$. Find the distribution of $\overline{X} = \dfrac{\sum\limits_{i=1}^{n} X_i}{n}$. [2 Marks] 2. (a) What is the difference between “variability within classes” and “variability between classes”? [2 Marks] (b) Suppose our objective is “To study the heights of students in three different classrooms (Class A, Class B, and Class C)”. How will you define the “variability within classes” and “variability between classes” for the objective. [2 Marks] 3. Differentiate between the random effect model and fixed effect model for one-way classification. Define all the notations and assumptions properly. [6 Marks] 4. Owner of a manufacturing company has purchased three new machines of different types and wishes to determine whether one of them is faster than the others in producing a certain output. Five hourly production figures are observed at random from each machine and the results are given in the following table. | Machine $M_1$ | Machine $M_2$ | Machine $M_3$ | |---|---|---| | 25 | 10 | 20 | | 30 | 15 | 30 | | 25 | 25 | 25 | | 25 | 20 | 25 | | 20 | 30 | 25 | (i). Compute the treatment means for each of the given treatment and the overall mean of the given observations. [2 Marks] (ii). Find the Sum of squares between groups (or sum of squares due to treatments), i.e., $SSB$ and Sum of squares within groups (sum of squares due to error), i.e. $SSW$. [4 Marks] (iii). Compute mean sum of squares between groups and within groups, i.e. $MSB$ and $MSW$. [2 Marks] (iv). If the owner wishes to test whether the machines are significantly different in their mean speeds, then write down the null and alternative hypothesis to be tested for it. [2 Marks] (v). Perform hypothesis testing for the above defined hypothesis and conclude your results. [4 Marks] (vi). Write down the ANOVA table for the above given model. [3 Marks] 5. The “House Price” dataset contains four features: “Size (in sq ft)”, “Bedrooms”, “Age (in years)”, and “Price (in dollars)”. The target feature is “Price (in dollars)”, while the remaining three variables are predictors. Each feature has 8 observations. An analyst has obtained the following two regression outputs using the “House Price” dataset. (i). Consider the following regression outpout : Call: lm(formula = Price ~ Size, data = house_data) Residuals: Min 1Q Median 3Q Max -49265 -6535 10245 16585 34395 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 83386.17 52422.10 1.591 0.16279 Size 136.60 25.23 5.414 0.00164 ** --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 33230 on 6 degrees of freedom Multiple R-squared: 0.8301, Adjusted R-squared: 0.8018 F-statistic: 29.32 on 1 and 6 DF, p-value: 0.001641 (a) Write the fitted regression model. [1 Mark] (b) Write null and alternative hypotheses and check if we can reject the null hypothesis at 5% significance level, i.e., $\alpha = 0.05$. Also, what can you conclude about the relationship between the variables `Size` and `Price`. [3 Marks] (c) Predict the “Price” of the house when Size of the house is 2000 (sq ft). [2 Marks] (ii). Consider the following regression output: Call: lm(formula = Price ~ Size + Age, data = house_data) Residuals: 1 2 3 4 5 6 7 8 23433 4631 31302 -24289 -49722 -6287 2622 18310 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 71444.50 50724.06 1.408 0.21803 Size 166.31 33.41 4.978 0.00418 ** Age -4434.20 3469.40 -1.278 0.25733 --- Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Residual standard error: 31600 on 5 degrees of freedom Multiple R-squared: 0.8719, Adjusted R-squared: 0.8207 F-statistic: 17.02 on 2 and 5 DF, p-value: 0.005868 (a) Write the fitted regression model. [1 Mark] (b) Predict the “Price” of the house when Size is 2000 (sq ft) and Age is 10 (years). [2 Marks] (c) What difference will you observe while predicting the “Price” of the house in the part 5(i)(c) and 5(ii)(b). Give the reason as well. [2 Marks]