Data Science Questions
Data Science Questions
(https://swayam.gov.in)
(https://swayam.gov.in/nc_details/NPTEL)
Unit 2 - Week 0
Course outline
Prerequisite (unit?
Assignment submitted on 2019-07-26, 20:51 IST
unit=5&lesson=6)
(https://drive.google.com/file/d/1i01j0AKMQPTrbPJtuIBMkyPasxa559NT/view?usp=sharing)Click here
Quiz : Assignment 0
(https://drive.google.com/file/d/1i01j0AKMQPTrbPJtuIBMkyPasxa559NT/view?usp=sharing) for R Set up guide pdf
(assessment?name=90)
FAQ (unit?
unit=5&lesson=97)
Note : This assignment is for practice and it will not be graded
Week 1
1) The value of “x” after running the R script given below is --------- 1 point
Week 2
x=6
Week 3 if(x==6){
x=x+1
Week 4 }else if(x<8){
x=x+2
Week 5 }else {
x=x+3}
Week 6 print(x)
6
Week 7
7
Week 8 8
9
DOWNLOAD VIDEOS
Yes, the answer is correct.
Score: 1
Accepted Answers:
7
2) Number of times the string "It’s gonna rain" will be printed when the code below is executed is---- 1 point
n=5
sum = 1
while(n!=0)
{
sum = sum*n
print(sum)
n=n-1
if(sum < 50)
{
print("It’s gonna rain")
}
else
{
print("It’s not gonna rain")
}
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=5&assessment=90 1/7
26/09/2019 Data Science for Engineers - - Unit 2 - Week 0
2
3
4
5
No, the answer is incorrect.
Score: 0
Accepted Answers:
5
3) In the R code given below, value at which value of “i” the loop breaks is ----------- 1 point
n=200
sum=0
for(i in seq(1,n,2)){
sum=sum+i
print(c(i,sum))
if(sum>15)
break
}
2
4
6
7
Yes, the answer is correct.
Score: 1
Accepted Answers:
7
x1<-matrix(1:9,3,3)
x2<-matrix(11:19,3,3)
m = rbind(apply(x1,1,min),apply(x2,1,mean))
y = apply(m,1,sum)
print(y)
15 45
27 30 33
20 35
6 45
Yes, the answer is correct.
Score: 1
Accepted Answers:
6 45
5) The expected output from the addition vectors “x” & “y” is --------- 1 point
x = c(1:4)
y = c(6,7)
print(x * y)
Error!
7 11
6 14 18 28
7 9 9 11
Yes, the answer is correct.
Score: 1
Accepted Answers:
6 14 18 28
6) The expected output from the code given below is? 1 point
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=5&assessment=90 2/7
26/09/2019 Data Science for Engineers - - Unit 2 - Week 0
Create a list using vec1, vec2 & vec3 & answer the questions (7 & 8) below.
vec1 = c(1,2,3)
vec2 = c("Orange","Mango","Apple")
vec3 = c("100", "200", "300")
Store the vectors in the list variable - “mylist”.
mylist[[2]][3] = "Grapes"
mylist[[2]][1] = "Grapes"
mylist[2,3] = "Grapes"
mylist[2]3 = "Grapes"
Yes, the answer is correct.
Score: 1
Accepted Answers:
mylist[[2]][1] = "Grapes"
8) Choose the correct command to add a new list with variable name “vec4” with values “Juice”, “Jam”, “Squash” to the existing list? 1 point
mylist=c(mylist,list(c("Juice","Jam","Squash")))
list(vec4 = c("Juice","Jam","Squash"), mylist)
mylist = list(“vec4” = c(“Juice”, ”Jam”, ”Squash”))
vec4=list(c(10,11,12))
Yes, the answer is correct.
Score: 1
Accepted Answers:
mylist=c(mylist,list(c("Juice","Jam","Squash")))
9) The correct command to build a square matrix with numbers from 20 to 28, arranged column wise and name it as “A” is ---------- 1 point
Answer all the questions from 10 to 12 using the matrix from Q.9:
10) The command to extract all the elements of third column from matrix “A” is ------------ 1 point
A[3,]
A[,3]
A(3,)
A{3}
Yes, the answer is correct.
Score: 1
Accepted Answers:
A[,3]
11) The command to extract the element in 2nd row, 3rd column from matrix “A”is------------ 1 point
A(2,3)
A[2,3]
A{2,3}
A[3,2]
Yes, the answer is correct.
Score: 1
Accepted Answers:
A[2,3]
12) The command to extract the diagonal elements of matrix “A” is ---- 1 point
diag(A)
diagonal[A]
diag[A]
diagonal(A)
Yes, the answer is correct.
Score: 1
Accepted Answers:
diag(A)
13) The output displayed on running the code given below? 1 point
x <- matrix(1:4, 2, 2)
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=5&assessment=90 3/7
26/09/2019 Data Science for Engineers - - Unit 2 - Week 0
[,1] [,2]
[1,] 10 20
[2,] 30 40
[,1] [,2]
[1,] 10 30
[2,] 20 40
[,1] [,2]
[1,] 30 40
[2,] 10 20
[,1] [,2]
[1,] 20 40
[2,] 10 30
Yes, the answer is correct.
Score: 1
Accepted Answers:
[,1] [,2]
[1,] 10 30
[2,] 20 40
14) Upon calling the function with func_add (1,2,3), the output is … 1 point
func_add= function(a,b,c=1)
{
result=a+b+c
return(result)
}
6
4
Error
3
Yes, the answer is correct.
Score: 1
Accepted Answers:
6
15) The output displayed on running the code given below is 1 point
x <- 1
f <- function() {
y <- 2
return(c(x, y))
}
f()
2
12
1
Error!
Yes, the answer is correct.
Score: 1
Accepted Answers:
12
16) What will be the output displayed on running the code given below? 1 point
func <- function(){
X<-3
Y<-x+3
return(c(X,Y))
}
print(Y)
36
6
Error: object 'Y' not found
366
Yes, the answer is correct.
Score: 1
Accepted Answers:
Error: object 'Y' not found
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=5&assessment=90 4/7
26/09/2019 Data Science for Engineers - - Unit 2 - Week 0
vec1 = c(1,2,3)
vec2 = c("Orange","Mango","Apple")
vec3 = c(100, 200, 300)
Answer the questions from 17 to 19 based on the data frame created above.
17) What is the command to extract the information from 1st & 2nd rows of the 2nd columns? 1 point
print(df[1:2,2])
print(df[,1,2])
print(df[1,2,])
print(df[,2])
Yes, the answer is correct.
Score: 1
Accepted Answers:
print(df[1:2,2])
18) The command to add a new row to the data frame “df” with the following values passed to each vector? 1 point
vec1= 4, vec2="Grapes", vec3="150"
rbind(data.frame(vec1=4,vec2="Grapes",vec3="150",df))
rbind(data.frame(vec1=4,vec2=" Grapes ",vec3="150"))
rbind(data.frame(vec1=4,vec2=" Grapes ",vec3="150”),df)
rbind(df,data.frame(vec1=4,vec2=" Grapes ",vec3="150"))
Yes, the answer is correct.
Score: 1
Accepted Answers:
rbind(df,data.frame(vec1=4,vec2=" Grapes ",vec3="150"))
19) The command to add a new column to the data frame “df” with vector 1 point
“vec4” taking values 10,20,30,40?
cbind(data.frame(vec4 = c(10,20,30,40),df))
cbind(df,data.frame(vec4 = c(10,20,30,40)))
cbind(df.data.frame(vec4 = c(10,20,30,40)))
cbind(data.frame(vec4 = c(10,20,30,40)),df)
Yes, the answer is correct.
Score: 1
Accepted Answers:
cbind(df,data.frame(vec4 = c(10,20,30,40)))
Answer the questions from 20 to 22 based on the data frame created at the end of Q19.
20) The correct way to extract all elements for which "vec3" is greater than 150 using the “subset” command is ---------- 1 point
21) The library needed to do melt & cast operations in R is---------- 1 point
cars
caret
gdata
reshape2
Yes, the answer is correct.
Score: 1
Accepted Answers:
reshape2
22) What is the output after recasting the data frame in single command by running the code below? 1 point
library(reshape2)
df_new=recast(df,id.var="vec2",variable~vec2)
print(df_new)
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=5&assessment=90 5/7
26/09/2019 Data Science for Engineers - - Unit 2 - Week 0
variable 1 2 3
vec1 2 1 1
vec3 1 2 1
vec4 1 1 2
variable 1 2 3 4
vec2 Orange Mango Apple Grapes
vec3 100 200 300 150
vec4 10 20 30 40
Yes, the answer is correct.
Score: 1
Accepted Answers:
variable Apple Mango Orange Grapes
vec1 3 2 1 4
vec3 300 200 100 150
vec4 30 20 10 40
23) The command to join data frame “b” to “a” by x1 is ----------- 1 point
left_join(a,b,by='x1')
left_join(b,a,by='x1')
left_join(by='x1',a,b)
left_join(by='x1',b,a)
Yes, the answer is correct.
Score: 1
Accepted Answers:
left_join(a,b,by='x1')
24) The command to join data frame “a” to “b” by x1 is ------------ 1 point
right_join(b,a,by='x1')
right_join(a,b,by='x1')
right_join(by='x1',a,b)
right_join(by='x1',b,a)
Yes, the answer is correct.
Score: 1
Accepted Answers:
right_join(a,b,by='x1')
25) The syntax to set the working directory in "R- studio" is ---------- 1 point
getwd("file path")
wd("file path")
currentwd("file path")
setwd("file path")
Yes, the answer is correct.
Score: 1
Accepted Answers:
setwd("file path")
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=5&assessment=90 6/7
26/09/2019 Data Science for Engineers - - Unit 2 - Week 0
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=5&assessment=90 7/7
26/09/2019 Data Science for Engineers - - Unit 3 - Week 1
(https://swayam.gov.in)
(https://swayam.gov.in/nc_details/NPTEL)
Unit 3 - Week 1
Course outline
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=7&assessment=92 1/5
26/09/2019 Data Science for Engineers - - Unit 3 - Week 1
sum=sum*n
Week 2
if(sum >50)
{
Week 3
print("Apple")
}
Week 4 else
{
Week 5 print("Mango")
}
Week 6 }
Week 7 3
2
Week 8 4
5
DOWNLOAD VIDEOS
Yes, the answer is correct.
Score: 1
Accepted Answers:
2
4) In the R code given below, the value of "i” at which the loop breaks is --------- 1 point
n=16
x = seq(1,n,2)
for (i in x) {
if (i == 5){
print(i)
break
}
}
3
15
5
25
Yes, the answer is correct.
Score: 1
Accepted Answers:
5
5) Which one of the following function is can be used to list the installed packages in R? 1 point
library( )
library[ ]
library{ }
All the above
Yes, the answer is correct.
Score: 1
Accepted Answers:
library( )
6) The value(s) of "y" at the end of the program given below is-------- 1 point
x1=matrix(10:18,3,3)
x2=matrix(11:19,3,3)
m =cbind(apply(x1,1,min),apply(x2,1,max))
print(m)
y =apply(m,1,mean)
print(y)
11 12 13
30 20 40
13.5 14.5 15.5
2 12
Yes, the answer is correct.
Score: 1
Accepted Answers:
13.5 14.5 15.5
topic.help
help(topic)
help{topic}
ctrl + l
Y h i
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=7&assessment=92 2/5
26/09/2019 Data Science for Engineers - - Unit 3 - Week 1
x =c(1:4)
y =c(6,3)
x *y
Error!
6 12 9 12
6 6 8 8
6 6 18 12
Yes, the answer is correct.
Score: 1
Accepted Answers:
6 6 18 12
10) The output displayed on running the code given below is 1 point
x=c(55,44,55,77)
x[c(FALSE,TRUE,FALSE,TRUE)]
55 44 55 77
44 77
Error
TRUE TRUE TRUE FALSE
Yes, the answer is correct.
Score: 1
Accepted Answers:
44 77
mylist=list("Apple","Mango","Orange",c("Jan","May","Nov"),"125","90","150")
mylist[[2]][2]
mylist[[4]][2]
mylist[[4]][1]
mylist[2]2
Yes, the answer is correct.
Score: 1
Accepted Answers:
mylist[[4]][2]
12) Using append command choose the correct command to add a new component with the name "Dec" to the vector containing month 0 points
names in the list defined below:
mylist=list("Apple","Mango","Orange",c("Jan","May","Nov"),"125","90","150")
13) The correct command to build a matrix with numbers from 1 to 12, arranged row wise of size 3x4 and name it as "A" is ----------- 1 point
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=7&assessment=92 3/5
26/09/2019 Data Science for Engineers - - Unit 3 - Week 1
11 16 21 26 31
⎡ ⎤
⎢ 12 17 22 27 32 ⎥
⎢ ⎥
Using the matrix, ⎢
⎢ 13 18 23 28
⎥
33 ⎥ answer the questions from 14 to 18.
⎢ ⎥
⎢ 14 19 24 29 34 ⎥
⎣ ⎦
15 20 25 30 35
14) Which of the following command used to display the full matrix a 1 point
print(a)
print(a[ ])
print(a[,])
All the above
Yes, the answer is correct.
Score: 1
Accepted Answers:
All the above
15) The expected output when the command a [1,4] is executed is 1 point
56
26
70
69
Yes, the answer is correct.
Score: 1
Accepted Answers:
26
16) The command to exclude the elements of 3rd row and select the rest of matrix is 1 point
a[-3,]
a[3,1:5]
a[3,]
a[2,0:4]
Yes, the answer is correct.
Score: 1
Accepted Answers:
a[-3,]
17) The command to extract the diagonal elements of matrix "a" 1 point
b = diag (a)
b = diagonal(a)
b=diag(x = a,nrow = 5,ncol = 5)
All the above
Yes, the answer is correct.
Score: 1
Accepted Answers:
b = diag (a)
as.matrix(a)
is.matrix([a])
as.mat(a)
is.matrix(a)
Yes, the answer is correct.
Score: 1
Accepted Answers:
is.matrix(a)
Transport1. = 10
1transport = 10
Transport% = 10
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=7&assessment=92 4/5
26/09/2019 Data Science for Engineers - - Unit 3 - Week 1
_bus.transport1 =10
Yes, the answer is correct.
Score: 1
Accepted Answers:
Transport1. = 10
.Rp
.R
.S
None of the above
Yes, the answer is correct.
Score: 1
Accepted Answers:
.R
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=7&assessment=92 5/5
26/09/2019 Data Science for Engineers - - Unit 4 - Week 2
(https://swayam.gov.in)
(https://swayam.gov.in/nc_details/NPTEL)
Unit 4 - Week 2
Course outline
( Continued 2 ) (unit? ⎣
0 0 0 0 2
⎦
unit=21&lesson=27)
4
Linear Algebra -
Distance,Hyperplanes 5
and 3
Halfspaces,Eigenvalues,Eigenvectors
( Continued 3 ) (unit?
1
unit=21&lesson=28) Yes, the answer is correct.
Score: 1
Week 2 Feedback Form
Accepted Answers:
(unit?
4
unit=21&lesson=29)
4) The system of equations 6x+y-2z=-8, 5x+3y-3z=4 and 12x+2y-4z=-16 1 point
FAQ (unit?
unit=21&lesson=99)
No solution
Quiz : Assignment 2A Unique solution
(assessment?name=93)
Infinite solutions
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=21&assessment=93 1/5
26/09/2019 Data Science for Engineers - - Unit 4 - Week 2
5) 7 8 9 4 1 point
Week 3 ⎡ ⎤ ⎡ ⎤
No solution
Week 5
Unique solution
Week 6 Infinite solutions
Two solutions
Week 7
Yes, the answer is correct.
Score: 1
Week 8 Accepted Answers:
No solution
DOWNLOAD VIDEOS
6) The system of equations 2x +6y -2z = -8, 12x -3y +6z = 9, 10x -5y - 15z = 5 has: 1 point
unique solution
No solution
Two solutions
Infinitely many solutions
Yes, the answer is correct.
Score: 1
Accepted Answers:
unique solution
7) In the system of equations2x − y + 3z = 1, −5x + 20y + 5z = 15, 6x − 3y + 9z = “?” , for what value of the “?” , the system of 1 point
equations have infinite solutions
1/3
3
1/2
1
Yes, the answer is correct.
Score: 1
Accepted Answers:
3
8) For a square matrix A, the product of the eigen values is equal to 1 point
|𝐀 |
mxm
0
1
Yes, the answer is correct.
Score: 1
Accepted Answers:
|𝐀 |
9) If Eigenvalue of a matrix A is λ , and A−1 exists, then Eigenvalue of A−1 is: 1 point
2
λ
1/λ
2
1/λ
6 −2 −6 14
⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ⎡ ⎤
α⎢ 24 ⎥ +β⎢ 4 ⎥ + γ ⎢ −8 ⎥ = ⎢ −24 ⎥
⎣ ⎦ ⎣ ⎦ ⎣ ⎦ ⎣ ⎦
−12 1 −6 20
α = −1, β = −4, γ = −2
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=21&assessment=93 2/5
26/09/2019 Data Science for Engineers - - Unit 4 - Week 2
α = 0, β = 0, γ = 0
α = 3, β = −1, γ = 11
α = 3, β = 1, γ = −5
11) For a system of Linear equations of the form AX , a unique solution exists if:
= B 1 point
rank(A)=rank(B)
rank(A)=rank(A,B)
rank(B)=rank(A,B)
rank(A)=rank(B)=n
No, the answer is incorrect.
Score: 0
Accepted Answers:
rank(A)=rank(A,B)
12) ⎡
t 1 2
⎤
1 point
For a matrix A = ⎢ 1 3 t ⎥ the determinant of A is
⎣ ⎦
6 t 2
3
−t + 14t − 38
3
t − 14t + 38
2
t + 16t + 16
2
t − 14t + 38
13) The eigen value λ a square matrix A can be calculated using: 1 point
|A| = 0
|A − λI | ≠ 0
|A − λI | = 0
|λI | = 0
-2
-4
3
5
Yes, the answer is correct.
Score: 1
Accepted Answers:
-2
15) ⎡
5 −3 7
⎤
1 point
The rank of the matrix A = ⎢ 7 −5 3⎥ is
⎣ ⎦
−5 1 3
1
2
3
0
Y h i
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=21&assessment=93 3/5
26/09/2019 Data Science for Engineers - - Unit 4 - Week 2
16) If A and B are any two square matrices of SAME dimensions then, BAB−1 is, 1 point
A
B
B=n
None of the above
Yes, the answer is correct.
Score: 1
Accepted Answers:
A
17) ⎡
0 −4 −8
⎤
1 point
The matrix ⎢ 4 0 5 ⎥ is
⎣ ⎦
8 −5 0
Symmetric matrix
Lower triangular matrix
Skew symmetric matrix
Null matrix
Yes, the answer is correct.
Score: 1
Accepted Answers:
Skew symmetric matrix
A is invertible
A is not invertible
A is non singular
None of the above
Yes, the answer is correct.
Score: 1
Accepted Answers:
A is not invertible
19) ⎡ 4 −2 0 ⎤
1 point
Eigenvalues of the matrix ⎢ −1 2 −1 ⎥are (Roundoff to 2 decimal places)
⎣ ⎦
0 −2 4
2
0
1
3
Yes, the answer is correct.
Score: 1
Accepted Answers:
3
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=21&assessment=93 4/5
26/09/2019 Data Science for Engineers - - Unit 4 - Week 2
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=21&assessment=93 5/5
26/09/2019 Data Science for Engineers - - Unit 4 - Week 2
(https://swayam.gov.in)
(https://swayam.gov.in/nc_details/NPTEL)
Unit 4 - Week 2
Course outline
unit=21&lesson=28)
− −
Week 2 Feedback Form 2/√ 29
[ ]
− −
(unit? 5/√ 29
unit=21&lesson=29)
–
FAQ (unit? 29/√ 5
[ ]
unit=21&lesson=99) –
29/√ 2
Quiz : Assignment 2A
(assessment?name=93)
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=21&assessment=94 1/3
26/09/2019 Data Science for Engineers - - Unit 4 - Week 2
− −
Quiz : Assignment 2B 3/√ 58
[ ]
(assessment?name=94) − −
7/√ 58
Week 5 ∘
θ = 90
Week 6
−1 15
θ = cos ( )
5√13
Week 7
−1 24
θ = cos (− )
Week 8 15√14
T T
v1 = ( 5 −2 3 ) , v2 = ( −2 4 6 )
v1 = ( 2 4 −2 ) , v2 = ( 1 4)
T T
v1 = ( 2 3) , v2 = ( −1 4 )
T T
v1 = ( 14 5 ) , v2 = ( 10 −2 )
6) → T
→
T → → 1 point
If a = [ 2 1 3 ] and b = [ 2 3 1 ] then a unit vector perpendicular to a and a is
T
−1 −1 1
[ ]
√6 √6 √6
T
1 −1 1
[ ]
√6 √6 √6
T
2 −1 −1
[ ]
√6 √6 √6
T
1 1 1
[ ]
√6 √6 √6
7) ⎛
x
⎞ ⎛
1
⎞
1 point
⎜ y ⎟ ⎜5 ⎟
The point ⎜ ⎟ = ⎜ ⎟ is in -----half space of the hyper plane 3x+3y-2z+4q=15
⎜ z ⎟ ⎜4 ⎟
⎝ ⎠ ⎝ ⎠
q 2
Positive
Negative
On the hyperplane
Cannot be decided
Yes, the answer is correct.
Score: 1
Accepted Answers:
Positive
8) The value of K for which the two vectors v1 and v2 are orthogonal is v1 = (4u⃗ − K v⃗ ), v2 = (3u⃗ + 2v⃗)
1 point
3/5
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=21&assessment=94 2/3
26/09/2019 Data Science for Engineers - - Unit 4 - Week 2
-5/3
-2
6
Yes, the answer is correct.
Score: 1
Accepted Answers:
6
9) If the projection of a⃗ on b⃗ and projection of b⃗ on are equal then the angle between a⃗ + b⃗ and a⃗ − b⃗ is
a⃗ 1 point
2π
− −
√ 41 units
− −
√ 83 units
− −
√ 54 units
− −
√ 35 units
Yes, the answer is correct.
Score: 1
Accepted Answers:
−−
√ 54 units
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=21&assessment=94 3/3
26/09/2019 Data Science for Engineers - - Unit 5 - Week 3
(https://swayam.gov.in)
(https://swayam.gov.in/nc_details/NPTEL)
Unit 5 - Week 3
Course outline
Hypotheses Testing
(unit? P (A) + P (B) − P (A ∩ B)
unit=31&lesson=35)
(unit?
unit=31&lesson=36) c c
P (A ) + P (B ) − 2P (A
c c
∩B )
Week 4 0.039
1.200
Week 5 0.430
0.050
Week 6
Yes, the answer is correct.
Score: 1
Week 7
Accepted Answers:
0.039
Week 8
4) Two tube lights are installed in a room. Probability of light A failing is 0.20 while the probability of light B failing is 0.15. What is the 1 point
DOWNLOAD VIDEOS probability that both the lights are working on a given day? (final value is rounded off to 2 decimal places)
0.50
0.54
0.80
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=31&assessment=91 1/5
26/09/2019 Data Science for Engineers - - Unit 5 - Week 3
0.68
Yes, the answer is correct.
Score: 1
Accepted Answers:
0.68
5) A mathematics problem is given to three students A, B, C whose chances of solving it are 1/4, 2/3, 1/2 respectively. If all of them try 1 point
independently, the probability that the problem is solved by any one of the students is: -
0.910
0.875
1.410
0.330
Yes, the answer is correct.
Score: 1
Accepted Answers:
0.875
6) E(5X + 2Y ) =? 1 point
25
28
20
30
Yes, the answer is correct.
Score: 1
Accepted Answers:
28
7) V ar (2X + 4Y ) is 1 point
74
380
144
160
Yes, the answer is correct.
Score: 1
Accepted Answers:
144
Download the data set “Toyota.csv (https://drive.google.com/file/d/18BznEh9bXFtn8W4za-cwfY_-J-LsOFWw/view)”. Load the data set in to
your R workspace with a variable name “x”.
Hints: Copy the dataset into your working directory to read the file seamlessly and use the function read.csv()
39941.25
26422.52
32485.23
22987.45
Yes, the answer is correct.
Score: 1
Accepted Answers:
39941.25
2750
7000
22750
117404
Yes, the answer is correct.
Score: 1
Accepted Answers:
22750
20
30
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=31&assessment=91 2/5
26/09/2019 Data Science for Engineers - - Unit 5 - Week 3
26
40
Yes, the answer is correct.
Score: 1
Accepted Answers:
26
5848635
4048635
1716945
1689845
Yes, the answer is correct.
Score: 1
Accepted Answers:
5848635
-0.588
-0.050
0.108
1.000
Yes, the answer is correct.
Score: 1
Accepted Answers:
-0.050
13) Which one of the following is best measure of central tendency for categorical data? 1 point
Mean
Median
Mode
None of the above
Yes, the answer is correct.
Score: 1
Accepted Answers:
Mode
14) A standard normal density function is shown below. The area of the shaded region is 1 point
0.006
0.457
0.594
0.933
Yes, the answer is correct.
Score: 1
Accepted Answers:
0.933
15) The possible values of the correlation coefficient lies between: 1 point
0 to -1
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=31&assessment=91 3/5
26/09/2019 Data Science for Engineers - - Unit 5 - Week 3
-1 to 1
-∞ to ∞
0 to ∞
Yes, the answer is correct.
Score: 1
Accepted Answers:
-1 to 1
16) Given that the random variable X follows a chi-square distribution with 4 degrees of freedom and P(X≤x)=0.5. Then the value of X is 1 point
3.357
-3.357
-3.325
3.325
Yes, the answer is correct.
Score: 1
Accepted Answers:
3.357
17) A sample of N observations are independently drawn from a normal distribution. The sample variance follows 1 point
Normal distribution
Chi-square with N degrees of freedom
Chi-square with N-1 degrees of freedom
t-distribution with N-1 degrees of freedom
Yes, the answer is correct.
Score: 1
Accepted Answers:
Chi-square with N-1 degrees of freedom
The internet usage (in GB) of men and women have been measured and stored in a csv file named “Internet Consumed3.csv
(https://drive.google.com/file/d/1TMbBAEDTNEnnkLVHNZZ2h5S0kPJ2RAXu/view)”. In order to assess whether their usage are equivalent, a
hypotheses test is conducted to test whether the mean of the differences is equal to zero or not.
18) The difference in the mean usage amount between men and women is:- 1 point
0.8520
0.2536
0.1725
0.1120
Yes, the answer is correct.
Score: 1
Accepted Answers:
0.1725
19) The value of the t-statistic for the hypotheses test is 1 point
0.456
0.404
-0.856
0.121
No, the answer is incorrect.
Score: 0
Accepted Answers:
0.121
41
18
40
d) 19
Yes, the answer is correct.
Score: 1
Accepted Answers:
40
21) The critical value of the test criterion for a level of significance of 5% is: 1 point
3.51
2.02
0.21
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=31&assessment=91 4/5
26/09/2019 Data Science for Engineers - - Unit 5 - Week 3
4.21
No, the answer is incorrect.
Score: 0
Accepted Answers:
2.02
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=31&assessment=91 5/5
26/09/2019 Data Science for Engineers - - Unit 6 - Week 4
(https://swayam.gov.in)
(https://swayam.gov.in/nc_details/NPTEL)
Unit 6 - Week 4
Course outline
unit=38&lesson=43)
′
unit=38&lesson=102)
′′
f (x̄ )
Quiz : Assignment 4
(assessment?name=96)
′′
−f (x̄ )
Assignment 4 solutions
(unit? Yes, the answer is correct.
unit=38&lesson=112) Score: 1
Accepted Answers:
Week 5 −f (x̄ )
4) When the feasibility regions defined by equality constraints and inequality constraints are compared, 1 point
Week 6
The regions defined by both are exactly the same
Week 7
The region defined by the inequality constraint is greater
The region defined by the equality constraint is greater
Week 8
none of the above
DOWNLOAD VIDEOS
Y h i
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=38&assessment=96 1/4
26/09/2019 Data Science for Engineers - - Unit 6 - Week 4
5) If f (x̄ ) is QUADRATIC function of x̄ ; and g(x̄ ), h(x̄ ) are LINEAR functions of x̄ , then the type of optimization problem is 1 point
7) If ANY of the functions among the objective function and constraint functions is NONLINEAR, then the problem is called a 1 point
min f (x)
x
′′
f (x) < 0
′′
f (x) = 0
′′
f (x) = 1
′′
f (x) > 0
min f (x)
x
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=38&assessment=96 2/4
26/09/2019 Data Science for Engineers - - Unit 6 - Week 4
′′
f (x) > 0
′′
f (x) < 0
′′
f (x) = 0
′′
f (x) = 1
11) If f (x) = 4x
5
+ 3x
4
+ 6x
3
+ 12x
2
+3 , then the first order necessary condition for either maxima or minima of f (x) is 1 point
4 3 2
16x + 9x + 18x + 24x = 0
4 3 2
20x + 12x + 18x + 24x + 3 = 0
4 3 2
20x + 12x + 18x + 24x = 0
3 2
8x − 18x − 24x = 0
0
0.25
2
-2.5
Yes, the answer is correct.
Score: 1
Accepted Answers:
-2.5
0,2
0,-2.5
0.25,2
2,-2.5
Yes, the answer is correct.
Score: 1
Accepted Answers:
0,2
2
0
0.25
2.5
No, the answer is incorrect.
Score: 0
Accepted Answers:
0.25
2
24x + 4x − 6 = 0
3 2
48x − 6x + 18x = 0
3 2
36x − 2x − 6x = 0
2
48x − 4x − 6 = 0
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=38&assessment=96 3/4
26/09/2019 Data Science for Engineers - - Unit 6 - Week 4
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=38&assessment=96 4/4
26/09/2019 Data Science for Engineers - - Unit 7 - Week 5
(https://swayam.gov.in)
(https://swayam.gov.in/nc_details/NPTEL)
Unit 7 - Week 5
Course outline
Week 3
for x̄ , to be the minimizer/maximizer of f (x̄ ) , the first order necessary condition is
∗
Week 4
∗
▽f (x̄ ) > 0
Week 5
Multivariate ∗
▽f (x̄ ) = 0
Optimization With
Equality Constraints ∗
▽f (x̄ ) < 0
(unit?
unit=45&lesson=46) none of the above
unit=45&lesson=47)
2) For an unconstrained multivariate optimization problem given below, 1 point
Introduction to Data
Science (unit? min f (x̄ )
unit=45&lesson=48) x̄
if H (x̄ ∗ ) is the Hessian of f (x̄ ) , evaluated at x̄ ∗ , for x̄ ∗ to be a MINIMIZER of f (x̄ ) , H (x̄ ∗ ) has to be
Solving Data Analysis
Problems - A Guided positive definite
Thought Process (unit?
negative semidefinite
unit=45&lesson=49)
negative definite
Week 5 Feedback Form
indefinite
(unit?
unit=45&lesson=50) Yes, the answer is correct.
Score: 1
Dataset (unit? Accepted Answers:
unit=45&lesson=52) positive definite
FAQ (unit? 3) For an unconstrained multivariate optimization problem given below, 1 point
unit=45&lesson=103)
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=45&assessment=100 1/4
26/09/2019 Data Science for Engineers - - Unit 7 - Week 5
Accepted Answers:
Week 8 negative definite
DOWNLOAD VIDEOS
Use the following information to answer questions 4 to 8
(Hint: Stationary point is a solution to the first order necessary conditions for maxima or minima of f(x,y))
(1/2,0)
(-1,0)
(-1/2,1)
(1,1)
Yes, the answer is correct.
Score: 1
Accepted Answers:
(1/2,0)
−5 2
[ ]
2 5
1 −4
[ ]
−2 1
4 −1
[ ]
−1 2
−6 2
[ ]
2 6
-1.585786, -4.414214
6.324555, -6.324555
5.414214, 5.585786
-3.828427, 1.828427
Yes, the answer is correct.
Score: 1
Accepted Answers:
6.324555, -6.324555
positive definite
indefinite
negative definite
negative semidefinite
Yes, the answer is correct.
Score: 1
Accepted Answers:
indefinite
maxima
minima
saddle point
None
No, the answer is incorrect.
Score: 0
Accepted Answers:
saddle point
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=45&assessment=100 2/4
26/09/2019 Data Science for Engineers - - Unit 7 - Week 5
Consider a function f (x 1 , x 2 ) = −x 1 x
2
2
2
− x x 2 + 100x 1 x 2
1
(-1,1)
(100/3,100/3)
(-1/3,-1/3)
(-100,-103)
Yes, the answer is correct.
Score: 1
Accepted Answers:
(100/3,100/3)
11) The Hessian matrix of f (x 1 , x 2 ) evaluated at the stationary point obtained in Q.10 is 1 point
400/3 −200/3
[ ]
−200/3 100/3
402 200
[ ]
200 100
−200/3 −100/3
[ ]
−100/3 −200/3
−400 −200
[ ]
−200 −100
positive definite
positive semidefinite
negative definite
negative semidefinite
No, the answer is incorrect.
Score: 0
Accepted Answers:
negative definite
maxima
minima
cannot be decided
none
Yes, the answer is correct.
Score: 1
Accepted Answers:
maxima
4 8
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=45&assessment=100 3/4
26/09/2019 Data Science for Engineers - - Unit 7 - Week 5
minima
maxima
cannot be decided
none
Yes, the answer is correct.
Score: 1
Accepted Answers:
maxima
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=45&assessment=100 4/4
26/09/2019 Data Science for Engineers - - Unit 8 - Week 6
(https://swayam.gov.in)
(https://swayam.gov.in/nc_details/NPTEL)
Unit 8 - Week 6
Course outline
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=53&assessment=111 1/4
26/09/2019 Data Science for Engineers - - Unit 8 - Week 6
Quiz : Assignment 6
(assessment?name=111) The dataset ‘income_data.csv (https://drive.google.com/open?id=1A1S8rmo2_XVPM1BQBB32OCu1MWkO_hGS)’ contains data on the Cost
Of Living (COL) and the Population Density(PD) from different states. Build a linear regression model and answer questions 5-8.
Assignment 6 solutions
(unit?
unit=53&lesson=115)
Week 7
Week 8
5) The regression model is given by (Round off to two decimal places) 1 point
DOWNLOAD VIDEOS
C OL = 202.97 + 0.03 ∗ P D
P D = 14.49 − 0.81 ∗ C OL
C OL = −110.72 − 54.25 ∗ P D
P D = 14.49 + 0.81 ∗ C OL
6) A F test is used to compare the reduced regression model involving only the intercept β 0 and the full model involving both β 0 and β 1 . 1 point
For the same
income dataset model, the numerator and denominator degrees of freedom for the F- statistic are, respectively: -
1 and 36
1 and 37
37 and 2
197 and 1
No, the answer is incorrect.
Score: 0
Accepted Answers:
1 and 36
7) The adjusted R2 value calculated for the model built above is: (Round off to two decimal places) 1 point
0.87
0.10
0.13
0.01
Yes, the answer is correct.
Score: 1
Accepted Answers:
0.13
8) The number of outlier(s) from the residual plot that lie out of the 2σ limits 1 point
10
1
2
None
No, the answer is incorrect.
Score: 0
Accepted Answers:
2
9) The relationship between the dependent and independent variables in a simple linear regression is described by 1 point
F-statistic
predicted value and error
standardised residuals
coefficient and intercept
Yes, the answer is correct.
Score: 1
Accepted Answers:
coefficient and intercept
10) The standard assumption of ordinary least squares regression is that: 1 point
N h i i
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=53&assessment=111 2/4
26/09/2019 Data Science for Engineers - - Unit 8 - Week 6
Pearson
Spearman
Kendall
Spearman and Kendall
No, the answer is incorrect.
Score: 0
Accepted Answers:
Spearman
13) The Pearson’s correlation coefficient between two parameters is calculated to be 0.10. What can be inferred from the correlation 1 point
coefficient regarding the
relationship between the two parameters?
14) The coefficient of correlation between variables X and Y will have a negative sign when 1 point
15) In a simple linear regression, the rate of change of the dependent variable is determined by which of the following constants: 1 point
coefficient
intercept
residual error
z-factor
No, the answer is incorrect.
Score: 0
Accepted Answers:
coefficient
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=53&assessment=111 3/4
26/09/2019 Data Science for Engineers - - Unit 8 - Week 6
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=53&assessment=111 4/4
26/09/2019 Data Science for Engineers - - Unit 9 - Week 7
(https://swayam.gov.in)
(https://swayam.gov.in/nc_details/NPTEL)
Unit 9 - Week 7
Course outline
Logisitic Regression
Yes, the answer is correct.
Score: 1
Implementation in R
Accepted Answers:
(unit?
The ratio of the probability of an event occurring to the probability of the event not occurring
unit=65&lesson=72)
Dataset (unit?
4) The confusion matrix for a binary classifier gives 1 point
unit=65&lesson=73)
Only True Positives and True Negatives
Week -7 Feedback Form Only False Positives and False Negatives
(unit?
unit=65&lesson=74) Only True Positives, False Positives and False Negatives
True Positives, False Positives, True Negatives and False Negatives
FAQ (unit?
unit=65&lesson=105)
Y h i
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=65&assessment=114 1/5
26/09/2019 Data Science for Engineers - - Unit 9 - Week 7
Quiz : Assignment 7
Yes, the answer is correct.
Score: 1
(assessment?name=114)
Accepted Answers:
Assignment 7 solutions True Positives, False Positives, True Negatives and False Negatives
(unit?
unit=65&lesson=117)
5) In confusion matrix, the misclassification rate is given by 1 point
Week 8
F alse N egative+F alse positive
DOWNLOAD VIDEOS
T rue N egative+F alse positive
-1 and 1
-1 and 0
-2 and 2
0 and 1
Yes, the answer is correct.
Score: 1
Accepted Answers:
0 and 1
8) The coefficient of COL from the full model is: - (rounded off to 3 decimal places) 1 point
7.162
-6.410
0.800
-10.302
Y h i
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=65&assessment=114 2/5
26/09/2019 Data Science for Engineers - - Unit 9 - Week 7
9) The t value corresponding to the coefficient of URate from the full model is: - (rounded off to 3 decimal places) 1 point
3.506
1.035
0.701
2.163
Yes, the answer is correct.
Score: 1
Accepted Answers:
2.163
10) The significant variables after building the full model are: - 1 point
11) The adjusted R2 value of the full model is: - (rounded off to 3 decimal places) 1 point
0.431
0.660
0.327
0.783
Yes, the answer is correct.
Score: 1
Accepted Answers:
0.327
13) The standard error associated in the estimation of the coefficient of COL is:- 1 point
-0.003
4.698
0.267
9500.000
Yes, the answer is correct.
Score: 1
Accepted Answers:
4.698
14) The numerator and denominator degrees of freedom for the F-statistic computed using the intercept model and the model built using 1 point
the variables URate,
Pop, COL and PD are respectively: -
4 and 194
6 and 33
6 and 34
4 and 33
No, the answer is incorrect.
Score: 0
Accepted Answers:
4 and 33
15) The overall F statistic (rounded off to 3 decimal places) between the full model built using all six variables and the reduced model built 1 point
by dropping Taxes
and RTWL is:
0.366
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=65&assessment=114 3/5
26/09/2019 Data Science for Engineers - - Unit 9 - Week 7
0.844
0.283
0.946
Yes, the answer is correct.
Score: 1
Accepted Answers:
0.366
Load the data set to your R workspace using a suitable variable name.
16) To predict the future of a company, i.e. bankruptcy or solvency, what would the dependent and independent variables be? 1 point
2
4
5
3
Yes, the answer is correct.
Score: 1
Accepted Answers:
4
18) Which command would be used to build a logistic regression model between the independent variables and the dependent variable? 1 point
lm ( )
abline ( )
glm ( )
None of the above
Yes, the answer is correct.
Score: 1
Accepted Answers:
glm ( )
19) The estimate of intercept (rounded off to 3 decimal places) of the model is 1 point
0.087
5.707
-6.681
0.322
Yes, the answer is correct.
Score: 1
Accepted Answers:
0.322
20) The standard error of the variable X3 (rounded off to 3 decimal places) of the model developed is 1 point
0.045
9.743
0.060
1.877
Yes, the answer is correct.
Score: 1
Accepted Answers:
0.045
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=65&assessment=114 4/5
26/09/2019 Data Science for Engineers - - Unit 9 - Week 7
21) The p- value for the variable X2 (rounded off to 3 decimal places) is 1 point
0.303
0.060
0.004
-1.030
Yes, the answer is correct.
Score: 1
Accepted Answers:
0.004
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=65&assessment=114 5/5
26/09/2019 Data Science for Engineers - - Unit 10 - Week 8
(https://swayam.gov.in)
(https://swayam.gov.in/nc_details/NPTEL)
Unit 10 - Week 8
Course outline
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=76&assessment=116 1/3
26/09/2019 Data Science for Engineers - - Unit 10 - Week 8
Assignment 8 solutions decrease the number of mis classified samples but increase overfitting risk
(unit?
5) K means clustering classifies variables based on :- 1 point
unit=76&lesson=118)
dependent and independent variables
DOWNLOAD VIDEOS
the eigen values
distance between the points and a cluster centre
None of the above
No, the answer is incorrect.
Score: 0
Accepted Answers:
distance between the points and a cluster centre
7) Which of the following statement is NOT TRUE about kNN algorithm? 1 point
It is a non-parametric algorithm
It is an instance based learning algorithm
Explicit training and testing phases are involved while implementing kNN
None of the above
Yes, the answer is correct.
Score: 1
Accepted Answers:
Explicit training and testing phases are involved while implementing kNN
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=76&assessment=116 2/3
26/09/2019 Data Science for Engineers - - Unit 10 - Week 8
Both A and B
13) Which of the following is TRUE with respect to K means clustering? 1 point
The inter cluster distance is minimized and intra cluster distance is maximized
The inter cluster distance is maximized and intra cluster distance is minimized
Both inter cluster and intra cluster distance are minimized
Both inter cluster and intra cluster distance are maximized
Yes, the answer is correct.
Score: 1
Accepted Answers:
The inter cluster distance is maximized and intra cluster distance is minimized
14) The method that kNN adopts to label a NEW TEST POINT is 1 point
15) The value of cluster seeds (initial centroids) used in a K means clustering algorithm:- 1 point
https://onlinecourses.nptel.ac.in/noc19_cs60/unit?unit=76&assessment=116 3/3