Quiz on R programming

R Intermediate Quiz




1
Which symbol should you use to place comments in R?
 

  1. *
  2. /
  3. $
  4. #

Answer : #

 
2
Formula for Simple Linear Regression

  1. y=ax+b
  2. y=ax^2+bx^2
  3. y=e^x
  4. y=a+b1x1+b2x2

Answer : y=ax+b

 
3
In simple Linear regression number of Indepent Variables

  1. 2
  2. 3
  3. 1
  4. 0

Answer : 1

 
4
Which chart is used to compare data side by side

  1. Bar
  2. Line
  3. Gauge
  4. KPI

Answer : Bar

 
5
if emp.data is Data frame then emp.data[,1:3] will return

  1. All rows with first 3 columns
  2. First 3 columns with all rows
  3. first and 3rd columns of all rows
  4. First and 3rd Rows of all columns

Answer : First 3 columns with all rows




6
Load data from CSV using one of the below method

  1. csv
  2. read.csv
  3. load
  4. Read

Answer : read.csv

 
7
The structure of the data frame can be seen by using

  1. str
  2. desc
  3. show
  4. ls

Answer : str

 
8
Which of the following unsupervised Machine Learning Algorithm?

  1. K-means Clustering
  2. Simple Linear Regression
  3. Multiple Linear Regression
  4. Logistic Regression

Answer : K-means Clustering

 
9
By default head function in R returns first

  1. 5 Rows
  2. 6 Rows
  3. 7 Rows
  4. 3 Rows

Answer : 6 Rows

 
10
Which function is used to create model in linear regression

  1. glm
  2. lm
  3. k-means
  4. clust

Answer : lm




11
Strong Positive correlation coefficient has value

  1. close to 0
  2. close to 5
  3. close to 1
  4. close to -1

Answer : close to 1

 
12
Strong Negative correlation coefficient has value

  1. close to 0
  2. close to 5
  3. close to 1
  4. close to -1

Answer : close to -1

 
13
Which function is used to  partition n observations into K clusters

  1. glm
  2. lm
  3. k-means
  4. clust

Answer : k-means

 
14
Which function is used to create model in Logistic regression

  1. glm
  2. lm
  3. k-means
  4. clust

Answer : glm

 
15
Confusion Matrix is related to

  1. Simple Linear Regression
  2. Multiple Linear Regression
  3. Logistic Regression
  4. Clustering

Answer : Logistic Regression