Explore topic-wise InterviewSolutions in .

This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.

1.

In order to calculate confidence intervals and hypothesis tests, it is assumed that the errors are independent and normally distributed with mean zero and _______(a) Mean(b) Variance(c) SD(d) KNNI got this question in homework.The origin of the question is Linear Regression topic in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Right answer is (B) Variance

Easiest EXPLANATION: In order to calculate CONFIDENCE INTERVALS and hypothesis tests, it is assumed that the errors are independent and normally distributed with MEAN zero and variance.

2.

What do we do the curvilinear relationship in linear regression?(a) consider(b) ignore(c) may be considered(d) sometimes considerThe question was posed to me in examination.This question is from Linear Regression topic in division Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Correct answer is (B) ignore

The explanation: Linear REGRESSION models the straight-line relationship between Y and X. Any CURVILINEAR relationship is ignored. This ASSUMPTION is most easily EVALUATED by using a scatter plot.

3.

Although it may seem overly simplistic, _______ is extremely useful both conceptually and practically.(a) Linear regression(b) Logistic regression(c) Gradient Descent(d) Greedy algorithmsThe question was asked in exam.This interesting question is from Linear Regression topic in section Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

The correct choice is (a) LINEAR REGRESSION

To EXPLAIN: Linear regression is a simple approach to supervised learning. It assumes that the dependence of Y on X1, X2, . . . Xp is linear. linear regression is an incredibly powerful tool for analysing data.

4.

Which of the following is preferred for text analytics?(a) R(b) Python(c) S(d) EDRThe question was asked during an interview for a job.Enquiry is from Predictive Analytics topic in section Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Correct choice is (b) Python

Easiest EXPLANATION: pandas is an open source, BSD-licensed library providing high-performance, easy-to-use data STRUCTURES and data ANALYSIS TOOLS for the Python PROGRAMMING.

5.

If Linear regression model perfectly first i.e., train error is zero, then _____________________(a) Test error is also always zero(b) Test error is non zero(c) Couldn’t comment on Test error(d) Test error is equal to Train errorI had been asked this question in an internship interview.I'm obligated to ask this question of Linear Regression topic in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Correct answer is (C) Couldn’t comment on Test error

To explain I would say: Test Error depends on the test data. If the Test data is an exact REPRESENTATION of TRAIN data then test error is always zero. But this may not be the case.

6.

Which of the following package has temporary files?(a) Single(b) Source(c) Bundle(d) DoubleI got this question during an internship interview.The doubt is from Packages topic in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer» CORRECT answer is (b) Source

Best explanation: Source package MIGHT contain temporary files used to save TIME during development and the compilation artifacts in a source. These will be never found in a BUNDLE.
7.

In practice, Line of best fit or regression line is found when _____________(a) Sum of residuals (∑(Y – h(X))) is minimum(b) Sum of the absolute value of residuals (∑|Y-h(X)|) is maximum(c) Sum of the square of residuals ( ∑ (Y-h(X))2) is minimum(d) Sum of the square of residuals ( ∑ (Y-h(X))2) is maximumThis question was addressed to me during an internship interview.This question is from Linear Regression in section Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

The CORRECT option is (C) Sum of the square of residuals ( ∑ (Y-h(X))2) is minimum

The EXPLANATION is: Here we penalize higher error value much more as compared to the smaller one, such that there is a significant difference between MAKING big errors and small errors, which makes it EASY to differentiate and select the best fit line.

8.

Which of the following package provide namespace management functions not yet present in base R?(a) stringr(b) namespace(c) nbpMatching(d) messagewarningThis question was posed to me during an online exam.My enquiry is from Packages in portion Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

The CORRECT option is (B) namespace

To elaborate: The PACKAGE namespace is one of the most confusing parts of BUILDING a package. nbpMatching CONTAINS functions for non-bipartite optimal matching.

9.

Which function is used for seeing currently active libraries?(a) Curlib()(b) Currlib()(c) .libpaths()(d) Pathlibr()The question was asked in an internship interview.I'm obligated to ask this question of Packages topic in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Correct answer is (C) .libpaths()

To elaborate: A LIBRARY is simply a directory containing INSTALLED packages. EVERYONE can use the dot libPaths() for seeing which LIBRARIES are currently active.

10.

Which of the following statement applies the function (FUN) to either rows (1) or columns (2) on object X?(a) apply(x,1,min)(b) apply(x,2,max)(c) col.max(x)(d) apply(X, MARGIN, FUN, …)I have been asked this question in quiz.This intriguing question comes from Commands in portion Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Correct option is (d) apply(X, MARGIN, FUN, …)

To explain I would say: apply(x,2,max) finds the MAXIMUM for each COLUMN.

11.

Which of the following will reverse the order of values in x?(a) rev(x)(b) max(x, na.rm=TRUE)(c) all(x)(d) x%in%yI got this question by my school teacher while I was bunking the class.My doubt is from Commands topic in division Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Correct option is (a) REV(X)

For explanation: rev provides a REVERSED version of its argument.

12.

Which of the following is similar to Moment.js?(a) stringr(b) lubridate(c) ploy(d) forecastThe question was asked in an international level competition.The above asked question is from Packages in portion Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

The CORRECT OPTION is (B) lubridate

To elaborate: lubridate is one of those magical LIBRARIES that just SEEMS to do exactly what you expect it to.

13.

The sum of squares of the difference between the observations and the line in the horizontal direction in the scatter diagram can be minimized to obtain the estimates is generally called?(a) reverse regression method(b) formal regression(c) logistic regression(d) simple regressionThe question was posed to me in a job interview.My question comes from Linear Regression in portion Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Correct choice is (a) reverse regression method

The best explanation: The sum of SQUARES of the difference between the observations and the LINE in the horizontal direction in the scatter diagram can be minimized to OBTAIN the estimates of 0 1 β and β. This is generally called a reverse or INVERSE regression method.

14.

Predicting y for a value of x that’s outside the range of values we actually saw for x in the original data is called ___________(a) Regression(b) Extrapolation(c) Intra polation(d) PolationThe question was asked in an international level competition.I need to ask this question from Linear Regression topic in section Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

The correct option is (b) Extrapolation

Explanation: PREDICTING y for a value of X that is WITHIN the interval of points that we saw in the original data is called interpolation. Predicting y for a value of x that’s OUTSIDE the RANGE of values we actually saw for x in the original data is called extrapolation.

15.

Function used for linear regression in R is __________(a) lm(formula, data)(b) lr(formula, data)(c) lrm(formula, data)(d) regression.linear(formula, data)The question was asked by my college professor while I was bunking the class.My query is from Linear Regression in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Right option is (a) lm(formula, DATA)

Easiest EXPLANATION: lm(formula, data) refers to a linear model in which formula is the object of the class “formula”, representing the RELATION between variables. Now this formula is on applied on the data to create a RELATIONSHIP model.

16.

Which of the following determine the least-squares regression line?(a) histo()(b) lm(c) barlm()(d) col.max(x)I got this question during an interview for a job.My question is taken from Visualizing Data topic in portion Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Right option is (B) lm

For EXPLANATION I would say: lm CALLS the lower LEVEL functions lm.fit.

17.

_________ uniforms and customizes plots of packages ggplot2, graphics and lattice.(a) uniCox(b) uniPlot(c) unknownR(d) unigraphI have been asked this question in an online interview.My query is from Packages topic in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Correct choice is (b) uniPlot

The best I can EXPLAIN: uniPlot() allows to change PARAMETERS of the packages GRAPHICS, lattice and GGPLOT2 and to make these changes persistent over one R SESSION.

18.

Which of the following is lattice command for producing a scatterplot?(a) plot()(b) lm()(c) xyplot()(d) anova()This question was addressed to me by my college director while I was bunking the class.My doubt stems from Visualizing Data in division Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer» CORRECT OPTION is (c) XYPLOT()

The EXPLANATION is: plot() produces a scatterplot.
19.

Which of the following finds row sums for each level of a grouping variable?(a) rowSums (x, na.rm = FALSE, dims = 1)(b) colMeans(x, na.rm = FALSE, dims = 1)(c) rowMeans(x, na.rm = FALSE, dims = 1)(d) rowsum(x, group, reorder = TRUE, …)The question was posed to me during a job interview.My enquiry is from Commands in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

The correct ANSWER is (c) rowMeans(X, na.rm = FALSE, dims = 1)

The EXPLANATION is: False value leads to unexpected result.

20.

The parameter β0 is termed as intercept term and the parameter β1 is termed as slope parameter. These parameters are usually called as _________(a) Regressionists(b) Coefficients(c) Regressive(d) Regression coefficientsThe question was posed to me in an interview.I need to ask this question from Linear Regression topic in portion Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Right option is (d) Regression coefficients

To explain: The PARAMETER β0 is termed as intercept TERM and the parameter β1 is termed as slope parameter. These parameters are usually CALLED as regression coefficients.

21.

Analysis of variance in short form is?(a) ANOV(b) AVA(c) ANOVA(d) ANVAThis question was posed to me in final exam.I want to ask this question from Linear Regression topic in division Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

The correct option is (C) ANOVA

Explanation: If the ANOVA test DETERMINES that the MODEL explains a significant portion of the variability in the data, then we can consider testing each of the hypotheses and correcting for MULTIPLE COMPARISONS.

22.

Which of the following method make vector of repeated values?(a) rep()(b) data()(c) view()(d) read()This question was addressed to me by my college director while I was bunking the class.Query is from Visualizing Data topic in portion Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer» RIGHT ANSWER is (b) data()

The best I can EXPLAIN: data() load (OFTEN into a data.frame) built-in dataset.
23.

Which of the following is one of the most important aspects of a good package?(a) Title(b) Description(c) Documentation(d) LibrariesThis question was addressed to me in examination.This is a very interesting question from Packages topic in section Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer» CORRECT CHOICE is (c) Documentation

The best I can explain: Documentation is one of the most important aspects of a good package. Without it, users won’t KNOW how to use your package. Documentation is very MUCH useful for the future.
24.

Which function is used for loading packages?(a) Library(b) Interface(c) Loader(d) LinkerThe question was asked by my college director while I was bunking the class.My doubt is from Packages in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

The CORRECT choice is (a) Library

Best explanation: library() FUNCTION is USED to load a package. library() is not useful when we are developing a package SINCE you have to install the package first. A library is a SIMPLE directory containing installed packages.

25.

A bundled package is a package that’s been compressed into a ______ file.(a) Double(b) Triple(c) Single(d) No fileI got this question during an online exam.This interesting question is from Packages in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Correct choice is (C) Single

To explain: A bundled package is a package that’s been compressed into a single FILE. A SOURCE package is just a DIRECTORY with components like R/, DESCRIPTION, and so on.

26.

______ specializes in functions for analytical Customer Relationship Management.(a) adagio(b) ada(c) aCRM(d) adegThis question was addressed to me in an interview for job.My question is based upon Packages in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Correct answer is (C) ACRM

Easiest explanation: Convenience FUNCTIONS for data preparation and modeling are OFTEN used in aCRM.

27.

Which of the following is a library for statistical quality control?(a) gcc(b) qcc(c) anc(d) pncI had been asked this question in quiz.The question is from Packages in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Right answer is (b) QCC

To elaborate: qcc can help you monitor transaction volumes, visitors or LOGINS on your WEBSITE, DATABASE operations, and lots of other processes.

28.

Which of the following will add the title “R language” to the graph?(a) titleAdd( “R language”)(b) title( “R language”)(c) titleBar( “R language”)(d) var(x, na.rm=TRUE)This question was posed to me during an online interview.This key question is from Commands topic in portion Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer» RIGHT OPTION is (b) title( “R language”)

The explanation is: This function can be used to ADD LABELS to a plot.
29.

Which of the following is Mac menu command?(a) browse.workspace(b) browse.works(c) browser.workspace(d) a statistical transformationThe question was posed to me during an interview for a job.I want to ask this question from Commands topic in division Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

The correct answer is (a) browse.workspace

To explain I would say: It is a MAC menu command that CREATES a WINDOW with INFORMATION about all variables in the workspace.

30.

_________is a JavaScript charting library and feature-rich API set that lets you build interactive Flash or HTML5 charts.(a) InstantAtlas(b) Alterian(c) ZingChart(d) paleoTSI got this question in my homework.The question is from Predictive Analytics in chapter Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer» RIGHT answer is (c) ZingChart

The BEST EXPLANATION: ZingChart lets you create HTML5 Canvas charts and more.
31.

______ is simplest class of analytics.(a) Descriptive(b) Predictive(c) Prescriptive(d) SummarizationThe question was asked by my college director while I was bunking the class.My question is based upon Predictive Analytics topic in section Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

The correct option is (a) DESCRIPTIVE

Easiest explanation: Descriptive is the SIMPLEST CLASS of analytics. Predictive analytics can only forecast what might HAPPEN in the future because all predictive analytics are probabilistic in nature.

32.

In a simple linear regression model (One independent variable), If we change the input variable by 1 unit. How much output variable will change?(a) by 1(b) no change(c) by intercept(d) by its slopeThe question was asked at a job interview.The question is from Linear Regression topic in division Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

The CORRECT answer is (d) by its SLOPE

To explain I WOULD say: For linear regression Y=a+bx+ERROR. If neglect error then Y=a+bx. If X increases by 1, then Y = a+b(x+1) which implies Y=a+bx+b. So Y increases by its slope.

33.

The IBM _________ analytics appliances combine high-capacity storage for Big Data with a massively-parallel processing platform for high-performance computing.(a) Watson(b) Netezza(c) InfoSight(d) LityxEQThe question was asked during a job interview.Asked question is from Predictive Analytics in division Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer» RIGHT option is (a) Watson

To explain: IBM Watson is a SYSTEM BASED on cognitive computing. With the addition of Revolution R Enterprise for IBM Netezza, you can use the power of the R language to BUILD predictive models on Big Data.
34.

Which of the following contains pre-built predictive tools?(a) alteryx(b) fossilx(c) paleoTS(d) ssasI have been asked this question during an interview.Query is from Predictive Analytics in division Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Right ANSWER is (a) alteryx

Easy explanation: Alteryx Analytics, with deep INTEGRATION of the R statistics and PREDICTIVE language, offers a way to bridge these TWO worlds of ease of use and SOPHISTICATED predictive analytics.

35.

The job of the __________ file is to store important metadata about your package.(a) Description(b) Interface(c) Thinker(d) LoaderThis question was posed to me in semester exam.The above asked question is from Packages topic in portion Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Correct CHOICE is (a) Description

Easiest explanation: The job of the DESCRIPTION file is to STORE the metadata about your PACKAGE. When you first start WRITING packages, you’ll mostly use these metadata to RECORD what packages are needed to run your package.

36.

Which of the following is the formal requirement?(a) Package(b) Function(c) Letters(d) InterfacesI have been asked this question in exam.My query is from Packages in division Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Correct answer is (c) Letters

For EXPLANATION: There are three formal requirements: the name can only consist of letters, NUMBERS and PERIODS, i.e., it must start with the letter and it should not END with a PERIOD.

37.

which of the following statement gives cumulative sum?(a) cumsum(x,na=rm=TRUE)(b) cumprod(x)(c) cummax(x)(d) cummin(x)I got this question during an internship interview.This is a very interesting question from Commands in section Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer» RIGHT option is (a) cumsum(x,na=rm=TRUE)

The EXPLANATION is: cummax() function RETURNS the cumulative MAXIMA.
38.

_______ is not useful when developing a package since you have to install the package first.(a) Function(b) Library(c) Interface(d) ClassThis question was posed to me in an interview.My question comes from Packages in section Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Correct answer is (b) LIBRARY

The EXPLANATION: library() is not useful when DEVELOPING a package SINCE you have to install the package first. A library is a simple directory containing installed PACKAGES.

39.

______ is an integrated hosted analytics platform for marketing insights, predictive models, and marketing optimization”(a) LityxEQ(b) WatSon(c) LityxIQ(d) InfoSightI had been asked this question during an internship interview.I'm obligated to ask this question of Predictive Analytics topic in portion Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer» RIGHT answer is (c) LityxIQ

The best I can explain: LityxIQ allows marketers to automate the loading and MANAGING multiple data sources, automatically build and manage predictive models, and OPTIMIZE marketing BUDGET and MEDIA decisions.
40.

An .Rproj file is a ____ file.(a) Pdf(b) Jpeg(c) Text(d) PngI got this question during an online exam.My question comes from Packages topic in division Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

The CORRECT option is (c) Text

Easy explanation: An .Rproj file is a text file. If you don’t use RStudio, you can get many of the benefits by starting a new R session and ENSURING that the DIRECTORY is set to the PACKAGE directory.

41.

_________ searches for significant clusters in genetic data.(a) BayesCount(b) BayesComm(c) bayesclust(d) BayescolcountI have been asked this question in a job interview.My doubt stems from Packages in section Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer» RIGHT answer is (c) bayesclust

Explanation: Bayesclust is an R package for testing and SEARCHING for significant clusters. BAYESCOUNT is used for power calculations and Bayesian analysis of count distributions and FECRT data using MCMC.
42.

Which of the following contains functions for processing uniaxial minute-to-minute accelerometer data?(a) accelerometry(b) abc(c) accrued(d) combI have been asked this question during an online interview.This key question is from Packages topic in portion Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

The CORRECT answer is (a) accelerometry

For explanation: This PACKAGE contains a COLLECTION of FUNCTIONS that perform operations on time-series accelerometer data, such as identify non-wear time, flag minutes that are PART of an activity about, and find the maximum 10-minute average count value.

43.

__________ refers to a group of techniques for fitting and studying the straight-line relationship between two variables.(a) Linear regression(b) Logistic regression(c) Gradient Descent(d) Greedy algorithmsI have been asked this question in an online quiz.My query is from Linear Regression topic in section Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Correct option is (a) Linear regression

Easy explanation: Linear regression is an INCREDIBLY powerful TOOL for analysing DATA. we’ll focus on finding one of the simplest type of relationship: linear. This PROCESS is unsurprisingly called linear regression, and it has MANY applications.

44.

When there are more than one independent variables in the model, then the linear model is termed as _______(a) Unimodal(b) Multiple model(c) Multiple Linear model(d) Multiple Logistic modelI have been asked this question in exam.The doubt is from Linear Regression in portion Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

The CORRECT answer is (c) MULTIPLE Linear model

To explain: When there are more than ONE independent variables in the model, then the linear model is TERMED as the multiple linear REGRESSION model.

45.

In the mathematical Equation of Linear Regression Y = β1 + β2X + ϵ, (β1, β2) refers to __________(a) (X-intercept, Slope)(b) (Slope, X-Intercept)(c) (Y-Intercept, Slope)(d) (slope, Y-Intercept)I have been asked this question in homework.I want to ask this question from Linear Regression in division Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer» CORRECT choice is (C) (Y-Intercept, Slope)

To explain: Y-intercept is β1 and X-intercept is – (β1 / β2). Intercepts are defined for axis and FORMED when the coordinates are on the axis.
46.

Which of the following is lattice command for producing boxplots?(a) plot()(b) bwplot()(c) xyplot()(d) barlm()This question was posed to me in an interview.This interesting question is from Visualizing Data in division Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Correct answer is (B) BWPLOT()

Explanation: The FUNCTION bwplot() MAKES box-and-whisker plots for numerical VARIABLES.

47.

Which of the following is tool for checking normality?(a) qqline()(b) qline()(c) anova()(d) lm()The question was asked by my college professor while I was bunking the class.This intriguing question originated from Visualizing Data in portion Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

The correct ANSWER is (a) qqline()

For EXPLANATION: qqnorm is ANOTHER tool for checking normality.

48.

Which of the following is tool for chi-square distributions?(a) pchisq()(b) chisq()(c) pnorm(d) barchart()The question was asked in semester exam.The query is from Visualizing Data in portion Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer» RIGHT choice is (C) pnorm

For EXPLANATION I would SAY: pnorm() is tool for normal distributions.
49.

________ are built in R so that you get HTML.(a) Vignettes(b) Vighnaants(c) Bignats(d) ViddnetsThis question was addressed to me in an online quiz.This question is from Packages topic in section Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

Right answer is (a) VIGNETTES

To explain I would say: Vignettes are built for getting the HTML and PDF output instead of MARKDOWN or LaTeX INPUT. A BUNDLED package is a package that’s been compressed into a single file.

50.

.Rbuildignore prevents files in the ___________package from appearing in the bundled package.(a) single(b) source(c) bundle(d) doubleThis question was addressed to me in an internship interview.My doubt is from Packages topic in section Commands, Packages, Visualizing Data and Linear Regression of R Programming

Answer»

The correct CHOICE is (b) source

Explanation: .Rbuildignore prevents files from the source package and appearing in the bundled package. It allows to have some EXTRA DIRECTORIES in your source package that will not be INCLUDED in the package BUNDLE.