Sarp 1 Marks
Sarp 1 Marks
• a) CRAN
• b) CRWO
• c) GNU
• d) CRDO
• a) RStudio
• b) Studio
• c) Heck
• d) KStudio
game consoles
• c) Error
• b) String
• c) Data strings
• d) Raw data
• a) >
• b) >>
• c) <
• d) <<
• a) Problem solving
• b) Statistics
• c) Probability
• a) Functions
• b) Loops
• c) Addition
• d) Assignment
• a) Character
• b) Numeric
• c) Integer
• d) Word
10.What will be the output of the following code?
• c) 0 1 2 3 4 5 6
• d) 6 5 5 3 2 1
> sqrt(-17)
• a) -4.02
• b) 4.02
• c) NaN
• d) 3.67
12._______ function returns a vector of the same size as x with the elements
• a) sort()
• b) orderasc()
• c) orderby()
• d) sequence()
• b) sequence()
• c) order()
• d) orderasc()
• a) c()
• b) D()
• c) E()
• d) F()
15.In R using the function, ________ one can check the data type of a vector.
• a) typeof()
• b) castof()
• c) function()
• d) C()
fun1 = function(x, y) {
z=x+y
z=x-y
z=x*y
z=x/y
}
print(fun1(10, 5))
• a) 15
• b) 5
• c) 50
• d) 2
• b) Beans Banana
• c) Apple Carrot
• d) Error
• b) “class”
• c) “procedure”
• d) “system”
• a) 2
• b) 3
• c) 4
• d) 5
fun1 = function(x, y) {
return(x * y)
}
print(fun1(c(1:4), c(3:4)))
• a) 3 8 9 16
• b) 1 2 3 4
• c) 3 4
• d) Error
CO2
distribution in R?
• a) rnorm()
• b) runif()
• c) rexp()
• d) rbinom()
2. What is the default mean and standard deviation of the normal distribution
• a) mean = 1, sd = 1
• b) mean = 0, sd = 1
• c) mean = 0, sd = 0
• d) mean = 1, sd = 0
of a normal distribution in R?
• a) dnorm()
• b) pnorm()
• c) qnorm()
• d) rnorm()
distribution in R?
• a) dchisq()
• b) pchisq()
• c) qchisq()
• d) rchisq()
between 0 and 1 in R?
• a) runif(100, 0, 1)
• b) rnorm(100, 0, 1)
• c) rpois(100, 0, 1)
• d) rbinom(100, 0, 1)
distribution in R?
• a) rexp()
• b) runif()
• c) rnorm()
• d) rpois()
binomial distribution?
• a) size
• b) prob
• c) n
• d) lambda
distribution in R?
• a) rpois()
• b) ppois()
• c) dpois()
• d) qpois()
9. If you want to generate random numbers from a beta distribution in R,
• a) rbeta()
• b) rnorm()
• c) rbinom()
• d) rexp()
distribution in R?
• a) rt()
• b) qt()
• c) pt()
• d) dt()
• a) hist()
• b) boxplot()
• c) plot()
• d) barplot()
• a) Maximum value
• d) 100th percentile
• b) boxplot(data, main="Title")
• c) boxplot(data, heading="Title")
• d) boxplot(data, label="Title")
• a) qqnorm()
• b) qqplot()
• c) qqline()
• d) qq()
• a) To create a QQ plot
• a) qqnorm(data1, data2)
• b) qqplot(data1, data2)
• c) qqline(data1, data2)
• d) qq(data1, data2)
• a) hist()
• b) boxplot()
• c) barplot()
• d) plot()
18.How do you specify the number of bins in a histogram in R?
• a) hist(data, bins=10)
• b) hist(data, breaks=10)
• c) hist(data, n_bins=10)
• d) hist(data, segments=10)
• a) title
• b) main
• c) heading
• d) label
• a) hist(data, color="blue")
• b) hist(data, col="blue")
• c) hist(data, fill="blue")
• d) hist(data, barcolor="blue")
• a) Categorical data
• b) Continuous data
• c) Nominal data
• d) Ordinal data
• a) The mode
• b) The median
• c) The frequency or count of each category
• d) The variance
• a) Pie Chart
• b) Histogram
• c) Bar Plot
• d) Dot Chart
• c) Frequency distribution
• d) Variance only
• b) Compare means
• d) Analyze variance
27.What information can you derive from the interquartile range (IQR) in a
box plot?
• c) The outliers
CO3
known value?
• B) One-Sample T Test
• A) Two-Sample T Test
• C) ANOVA
• D) Chi-Squared Test
• D) To assess variance
5. If you want to compare the variances of two samples, which test would
you use?
• A) One-Sample T Test
• B) F-Test
• C) Chi-Squared Test
effects?
• A) One-Sample T Test
• B) Two-Sample T Test
• C) ANOVA
• D) Kruskal-Wallis Test
hypothesis
9. A researcher uses the wilcox.test function on two samples and gets a p-value
• d) They find the correlation between the groups and the other variables
• D) Both B and C
• A) t.test()
• B) cor.test()
• C) lm()
• D) mean()
t-test in R?
• A) x
• B) m
• C) y
• D) paired
16.How can you specify a one-sided t-test in R using the t.test() function?
• D) Both A and B
17.Which output from the t.test() function provides the calculated t-value for
the test?
• A) p.value
• B) estimate
• C) statistic
• D) conf.int
18.If you have a dataset data1 and you want to test if its mean is significantly
• A) t.test(data1, mu = 10)
• C) t.test(data1, mu = TRUE)
19.What does the p.value output from the t.test() function indicate?
CO4
regression model?
predicted values.
• B) No linear relationship.
model?
regression model?
• A) Residuals
• B) Fitted values
• C) Outliers
• D) Variance
regression?
• A) To estimate the slope of the regression line.
regression model?
positive.
linear regression?
equation?
intervals in regression?
variation.
• B) Confidence intervals are narrower because they ignore individual data
points.
CO5
2. You conduct a One-Way ANOVA and find a p-value of 0.03. What does this
imply?
• A) There is no significant difference between the group means
to be valid?
• D) Both A and C
5. You perform Bartlett's Test and obtain a p-value of 0.07. What does this
indicate?
to be valid?
• D) Both A and C
Test to be valid?
• D) Both A and C
• A) Categorical data
• C) Nominal data
• B) Independence of residuals
• C) Homoscedasticity
15.In the context of regression analysis, what is the purpose of the ANOVA
table?
16.In an ANOVA table for regression, what does the "Mean Square Regression"
represent?
• B) The average of the squared deviations of the predicted values from the mean
17.If the R-squared value in the ANOVA table is 0.75, what does this suggest
18.If an ANOVA table shows a very small p-value (< 0.001) for the model, what
dependent variable
analysis?
• A) Scatter plot
• B) Box plot
• C) Heatmap
• D) 3D scatter plot
CO6
polynomial regression?
terms be constructed?
variable
model?
• A) lm()
• B) glm()
• C) polynomial()
• D) polyfit()
• D) Both A and B
7. In the R function lm(y ~ poly(x, 3), data = dataset), what does the number 3
indicate?
R?
• A) plot()
• B) ggplot2::geom_smooth()
• C) curve()
9. What does the function call I(x^2) achieve in the formula lm(y ~ x + I(x^2),
data = dataset)?
• A) It converts x to a factor
10.In R, how can you calculate the predicted values from a polynomial
regression model?
• A) Using predict()
• B) Using fitted()
• C) Using lm.predict()
• D) Both A and B
• A) graphics
• B) ggplot2
• C) dplyr
• D) tidyr
12.If you want to examine the summary statistics (coefficients, standard errors,
etc.) of a polynomial regression model fitted using lm(), which function would
you use?
• A) summary()
• B) coefficients()
• C) print()
• D) anova()
replication?
15.In a two-way ANOVA with replication, which of the following effects are
tested?
effect indicate?
• B) The effect of one factor depends on the level of the other factor
replication?
• A) It can analyze the effect of two categorical variables and their interaction
on a continuous outcome
18.In the context of a two-way ANOVA with replication, what is the null
19.In two-way ANOVA with replication, if both main effects and the interaction
• C) Each factor has a significant effect, and the effect of one factor depends
20.In two-way ANOVA with replication, which term represents the variation due
• A) Between-group variation
• B) Within-group variation
• C) Interaction variation
• D) Residual variation
the following p-value combinations would suggest that only the main effects