Tuesday, January 22, 2013

Session 3

ASSIGNMENT 1
(a) Using milage-groove data, fit 'lm' and comment on the application of 'lm'
>>Plot residual vs independent
>>Standardized vs independent
>>qqplot and  qqline


As it is type 2 ,parabolic, we will not be able to do regression.

qqplot and qqline




(b) Using alpha-pluto.


As it is randomplot, thus we can have regression here.
 qqplot and qqline


residual value


ASSIGNMENT 2
Calculate P value


P value =0.687
as p value is more than 5%, we accept the null hypothesis .


Tuesday, January 15, 2013

Session 2

Session 2

(!) Create Matrix and combine two columns

Syntax
> z<-c(1:9)
> dim(z)<-c(3,3)
> z1<-c(4,6,7,8,2,3,0,1,9)
> dim(z1)<-c(3,3)
>x<-z[,3]
>y<-z1[,3]
>z3<-cbind(x,y)
>z3



2) Multiplication of two matrix

Syntax
>obj1<-z
>obj2<-z1
>obj1%*%obj2



3)Regression

Syntax
>z<-read.csv(file.choose(),header=T)
>high<-z[,3]
>low<-z[,2]
>reg1<-lm(high~open,data=z)
>reg1
>plot(reg1)
>residual(reg1)
>cbind(high,open)



4) To generate data for normal distribution and plot the graph

>z<-read.csv(file.choose(),header=T)
>z<-rnorm(150,0,1)
>y<-dnorm(z)
>plot(z,y)


Tuesday, January 8, 2013

IT-BAL-1st Session

Assignment 0-
Plot Zcol1 as histogram





Assignment 1-
Plot both lines and point

Assignment 2-
Plot low values as scatter plot

Assignment 3-
Maximum Volatility