Tuesday, 22 January 2013

IT Lab - 3

Assignment - 3


Question - 1
Perform regression analysis for the following data.


x<-file$groove
> x
[1] 394.33 329.50 291.00 255.17 229.33 204.83 179.00 163.83 150.33
> y<-file$mileage
> y
[1]  0  4  8 12 16 20 24 28 32
> reg1<-lm(y~x)
> res<-resid(reg1)
> res
         1          2          3          4          5          6          7          8          9
 3.6502499 -0.8322206 -1.8696280 -2.5576878 -1.9386386 -1.1442614 -0.5239038  1.4912269  3.7248633
> plot(x,res)



Question 2
Perform Regression for the following data and check the relation between the alpha and plutonium


x<-file$alpha
> y<-file$pluto


 reg1<-lm(y~x)
> res<-resid(reg1)
plot(x,res)







  Q3. Perform ANOVA for the following data



  The rating for the three types of chairs are almost similar as the p value is greater than .05

Wednesday, 16 January 2013

IT Lab-2

Assignment -2

1.Cbind taking two matrices

Command
z1<- c(1,2,3,4,5,6,7,8,9)
z2<- c(11,22,33,44,55,66,77,88,99)
dim(z1)<-c(3,3)
dim(z2)<-c(3,3)
x<-z1(,3)
y<-z2(,1)
cbind(x,y)


2. Multiplication of two matrices

Command
z1%*%z2


3. Regression of NSE Index data of 1st dec 2012 to 31st dec 2012

Data


Command
z<- read.csv(file.choose(),header="T")
zreg<-lm(Open~High,data=z)






4. Normal Distribution
Command

x<-seq(0,200)
> y<- dnorm(x,mean=100,sd=20)
> plot(x,y)
> plot(x,y,type="l")





Tuesday, 8 January 2013

IT LAB- 1

                                               IT Lab -1



Assignment 1
Draw Histogram
command hist(mergedata)
Output:


Command plot(z,type="h")
Output:
Assignment 2
Name the graph, X-axis,Y-axis

Command Plot (z,main="NSEGraph",xlab="Time",ylab="NIFTY50")
Output

Assignment 3
 Draw a scatter graph
Command Plot(zcol1,zcol4,type="h")
Output


 Assignment 4

Find the volatility of the given period
Command mergedata<- c(zcol1,zcol4)
range(mergedata)
Output