Day3 - 22Jan , 2013
Assignment 1
Read the set of data given in the .csv file and fit a linear model for the data set.
Comment on it s applicability.
Soln -:
Commands used -:
reg1 <- (DependentVariable ~ Independent Variable) - // to calculate regression coefficient
res1<-resid(reg1) - // to calculate residuals
resStd<-rstandard(reg1) - // to calculate standard residuals
Plot between Independent variable and residuals
Plot between Independent variable and standard residuals
Q-Q Normal plot
Q-Q normal plot fit with a line
-Regression applicability- :
As the plot is scattered , non-linear and shows a parabolic pattern , the application of linear regression is not feasible.
Assignment 1(b)
Data set with Alpha and Pluto
Read data from the csv file and calculate the regression
Plot between Independent variable and residuals
Plot between Independent variable and residuals
Q-Q Normal Plot
Q-Q Normal Plot fit with a line
-Regression applicability- :
As the plot is random with lots of points around the Q-Q normal plot line , linearity is visible. hence application of linear regression is possible
Assignment 2
To justify a NULL Hypothesis for a given data using ANOVA
Soln-:
Commands used -:
var_name.anv<-aov(<var_name>$<Dependent Variable> ~ <var_name>$<Nominal_scale_variable>)
summary(var_name.anv)
As shown , after reading the data from a csv file
The result shows the P value of the Hypothesis to be 0.687 which is very much greater than the assumed confidence interval.
hence Null hypothesis cannot be rejected.
Assignment 1
Read the set of data given in the .csv file and fit a linear model for the data set.
Comment on it s applicability.
Soln -:
Commands used -:
reg1 <- (DependentVariable ~ Independent Variable) - // to calculate regression coefficient
res1<-resid(reg1) - // to calculate residuals
resStd<-rstandard(reg1) - // to calculate standard residuals
Plot between Independent variable and standard residuals
Q-Q Normal plot
Q-Q normal plot fit with a line
-Regression applicability- :
As the plot is scattered , non-linear and shows a parabolic pattern , the application of linear regression is not feasible.
Assignment 1(b)
Data set with Alpha and Pluto
Read data from the csv file and calculate the regression
Plot between Independent variable and residuals
Plot between Independent variable and residuals
Q-Q Normal Plot
Q-Q Normal Plot fit with a line
-Regression applicability- :
As the plot is random with lots of points around the Q-Q normal plot line , linearity is visible. hence application of linear regression is possible
Assignment 2
To justify a NULL Hypothesis for a given data using ANOVA
Soln-:
Commands used -:
var_name.anv<-aov(<var_name>$<Dependent Variable> ~ <var_name>$<Nominal_scale_variable>)
summary(var_name.anv)
As shown , after reading the data from a csv file
The result shows the P value of the Hypothesis to be 0.687 which is very much greater than the assumed confidence interval.
hence Null hypothesis cannot be rejected.












No comments:
Post a Comment