Wednesday, 23 January 2013

IT Business Lab Class 3

IT Business Lab Class 3

Assignment 1
Using mileage and groove data,   fiting regression and estimating residuals
> plot(k1,res)
> qqnorm(res)
> qqline(res)


Assignment 2:
Using alpha and pluto data, fiting regression and estimating residuals

 

a) Residual value

plot(p1,res1)






















b) Standard residual

















>qqnorm(res1)


>qqline(res1) 





















Assignment 3
Null Hypothesis using ANOVA
Result:-
The P value is 0.687%.
  p value more than 0.5, hence we cannot reject the null hypothesis.

Tuesday, 15 January 2013

IT Business Lab Class 2




Assignment 1 : C Binding

> b<-c(19,10,3,7,3,123,24,56,87)
> dim(b)<-c(3,3)
> solve(b)
> invb<-solve(b)
> t1<-t(invb)

> x<-invb[,3]
> y<-t1[,3]
> z<-cbind(x,y)
> z
                 x             y
[1,] -0.0031519951 -0.0120268314
[2,]  0.0081163874  0.0228125646
[3,]  0.0001280498  0.0001280498
>




Assignment 2: Multiplication

> b<-c(19,10,3,7,3,123,24,56,87)
> dim(b)<-c(3,3)
> solve(b)
> invb<-solve(b)
> t1<-t(invb)


> m<-b%*%t1
> m
           [,1]       [,2]        [,3]
[1,]  1.0030436  0.2171626 -0.06574865
[2,]  0.4070112  0.4769461 -0.04465983
[3,] -2.9170533 -1.1885878  2.78100529
>



Assignment 3: Regression


 q<-read.csv(file.choose(),header=T)
> open1<-q[,2]
> high1<-q[,3]
> regr<-lm(high1~open1,data=q)
> regr

Call:
lm(formula = high1 ~ open1, data = q)

Coefficients:
(Intercept)        open1 
  1578.3358       0.7355 







assignment 4: normal distribution data and plot

 x<-seq(-27,27,by=3)
> x
 [1] -27 -24 -21 -18 -15 -12  -9  -6  -3   0   3   6   9  12  15  18  21  24  27

> y<-dnorm(x,mean=0,sd=6)
> plot(x,y,type='b')
>



Tuesday, 8 January 2013

IT Business Lab Class 01

IT Business Lab Assignment 01


Question 01: Histogram



Question 02: Naming




Question 03: Scatter





Question 04: Range

> x<-read.csv(file.choose(),header=T)
> b<-x[,5]
> c<-c(a,b)
> range c
Error: unexpected symbol in "range c"
> range(c)
[1] 4888.20 6016.15