Wednesday, January 23, 2013

ITLAB : Day 3

Assignment 1 
Mileage depends on Grooves. Fit the 'lm' model into the data provided and comment on the applicability.

data<-read.csv(file.choose(),header=T)
reg<-lm(data$mileage~data$groove)
res<-resid(reg)
plot(data$groove,res)

Standardizing the residuals:
sres<-rstandard(reg)
plot(data$groove,sres)


QQ plot of the residuals:
qqnorm(res)
qqline(res)

From the image it can be seen that the qq plot is of Type I and almost a straight line. Hence linearity is valid and the variable is linear in nature.

Assignment 2:
The percentage content of Plutonium depends on the amount of Alpha particles. Fit the 'lm' model into the data provided and comment on the applicability.

data<-read.csv(file.choose(),header=T)
reg<-lm(data$pluto~data$alpha)
res<-resid(reg)
plot(data$alpha,res)


Standardizing the residuals:
sres<-rstandard(reg)
plot(data$alpha,sres)



QQ plot of the residuals:
qqnorm(res)
qqline(res)



From the image it can be seen that the qq plot is of Type I and almost a straight line. Hence linearity is valid and the variable is linear in nature.

Assignment 3:
Compute and comment on the anova analysis of the data provided.

Null Hypothesis: Ho: All chairs have same mean rating for comfort level.

data.anova<-aov(data$ComfortLevel~data$Chair)
summary(data.anova)


As we can see from the summary that the P-value is 0.687. Since this value is very high , we cannot reject the null hypotheses.

No comments:

Post a Comment