Data Science Problem Set 1.docx - Data Science Problem Set...

This preview shows page 1 - 9 out of 9 pages.

Data Science Problem Set 1 1. 2.
3. 4.
5. 6.
7. 8.
9. 10.
R Script: A <- matrix(c(1,2,3,4), nrow=2, byrow=T) print(A) B <- matrix(c(5,6,7,8), nrow=2, byrow=T) print(B) print(A %*% B) A <- matrix(c(0.5,0.5,0.25,0.75), nrow=2, byrow=T) print(A) B <- matrix(c(0.33,0.67,0.67,0.33), nrow=2, byrow=T) print(B) print(A %*% B) A <- matrix(c(0.5,0.5,0.25,0.75), nrow=2, byrow=T) print(A) print(A %^% 2)
print(A %^% 3) A <- matrix(c(0.15,0.85,0.001,0.999), nrow=2, byrow=T) print(A) B <- matrix(c(0.02,0.98,0.19,0.81), nrow=2, byrow=T) print(B) print((A %^% 4)+(B %^% 7)) A <- matrix(c(1,2), nrow=1, byrow=T) print(A) B <- matrix(c(5,6,7,8), nrow=2, byrow=T) print(B) print(A %*% B) A <- matrix(c(0.8,0.92), nrow=1, byrow=T) print(A) B <- matrix(c(0.375,0.625,0.399,0.601),

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture