Wednesday, 16 January 2013

IT Lbs: Assignment Set 2

Today we have learnt about creation,inverse,transpose and multiplication of matrices.Then we moved on to regression and residual analysis by taking NSE historical data for NIFTY index for a certain period.Finally we had an introductory idea about how to plot normally distributed curve.

Question 1:

Create two matrices of say size 3 X 3 and select the column 1 from one matrix and column 3 from second matrix. After selecting the columns in objects say x and y merge these two columns using cbind to create a new matrix .

Syntax & Output: 



Question 2:

Multiplication of two matrices. The two matrices which were created in the previous question were multiplied and results were seen.

Syntax : z1%*%z2

Output:





Question 3:

Read historical data of NIFTY indices from NSE for the period 1st Dec 2012 to 31st Dec 2012. Find regression and residuals.

Syntax:




Output:

Question 4: Generate a normal distribution data and plot it.

Syntax:




Output:





No comments:

Post a Comment