Wednesday, 23 January 2013

SESSION 3-IT BAL


                                                                        Session  # 3
                                                                  Date: 22nd JANUARY , 2013

Assignment 1A
Based on the groove and mileage data: mileage is affected by groove.
Fit lm and comment on the applicability of lm
Plot 
      a) Res vs independent variable
      b) Sres vs Independent variable
      c) qqplot and add a qqline.


Solution:





As the residual plot is not a random but shows somewhat a parabolic pattern so it can be stated that linear model is not applicable in the case.

Assignment 1B
Based on alpha pluto data: pluto is dependent variable and alpha is the independent variable.
Fit lm and comment on the applicability of lm
      a) Plot Res vs independent variable

Output:


b) Plot Sres vs independent variable

Output:


Since the above plot does not show any pattern and random in nature so we can safely apply the linear model.

c) qqplot and qqline

Output:



Assignment 2

Based on the chair type and comfort level data: Determine whether the comfort level given by all the types of chairs are same using the ANOVA technique.


Output:


As seen from the solution the p value comes out to be 0.687,which is greater than 5%,our confidence interval of 95%.So we can not reject the null hypothesis.



ASHWINI KUMAR RAO
12BM60047

Wednesday, 16 January 2013

Business Application Lab - Day 2



                                                    Business Application Lab - Day 2
Ashwini Kumar Rao
12BM60047


 Assignment 1:
Creating a two matrices and using them for matrix binding

z1<-c(1:9)
z1<-c(1,2,3,4,5,6,7,8,9)
dim(z1)<-c(3,3)


z2<-c(1:9)
z2<-c(32,5,15,48,10,18,1,12,23)
dim(z2)<-c(3,3)

x<-z1[,3]
y<-z2[,1]

z3<-cbind(x,y)





Assignment 2:
Multiplication of matrices

Using the matrices created in the first assignment
z3<-z1%*%z2
z3


Assignment 3:
Regression of nse data and residuals calculation

nse<-read.csv(file.choose(),header=T)
open<-nse[,2]
high<-nse[,3]

reg<-lm(high~open,data=nse)
reg
residuals(reg)





Assignment 4: Normal Distribution Plot
x<-seq(-8,8,length=200)
y<-dnorm(x,mean=0,sd=1)
plot(x,y,col="orange")


Tuesday, 8 January 2013

IT Business Application Lab

          IT  Business Application Lab :Assignment 1





Assignment 1:
Draw a histogram concatenating 3 data points.

Solution:

>x<-c(1,2,3)
>plot(x,type="h")

Output :




Assignment 2:  
Drawing a line graph with points and naming the graph and the axis.

Solution:
Step 1:
Let z be the variable that contains data from the .csv file selected.
Reading from the csv file

> z<-read.csv(file.choose(), header=T)

This command asks the user to select the file from the saved location.

Step 2:
Let, zcol1 be the variable that contains contents of column 3 and all rows from the excel datasheet.

> zcol1<-z[,3]
> plot(zcol1 , type="b" , main="NSE Graph" , xlab="Time" , ylab="indices")


Output:






Assignment 3:


Create a scatter plot by using share HIGH and LOW values from the NSE Historical data as obtained from the .csv file.

Solution :

HIGH values are obtained from column 3 from the csv file
> zcol1<-z[,3]
LOW values are obtained from column 4 from the csv file
> zcol2<-z[,4]

Now,To plot the scatter plot
> plot(zcol1,zcol2)

Output:





Assignment 4:


To find the volatility between the share values obtained from NSE historical data and obtain the range for the same.

Solution :-
To obtain the volatility , we require the highest value in the HIGH values column and the lowest value among the LOW values column.

Merging both the columns into one vector variable 'y' to get the HIGH and LOW values together can be done by using the following command:

> y<-c(zcol1,zcol2)
> summary(y)
   Min.    1st Qu.  Median    Mean   3rd Qu.    Max.
   4888    5660    5723        5758    5884       6021

Now as we have got the max and min values we can find the range hence the required volatility.

> range(y)

[1] 4888.20 6020.75

Output: