BA Viva Questions
BA Viva Questions
1. What is R?
Answer: R is a programming language and software environment used for statistical
computing, data analysis, and graphical representation.
3. What is CRAN in R?
Answer: CRAN (Comprehensive R Archive Network) is the official repository where R
packages are stored and shared.
CopyEdit
install.packages("package_name")
CopyEdit
CopyEdit
library(readxl)
CopyEdit
str(data)
summary(data)
CopyEdit
x <- 10
CopyEdit
v <- c(1, 2, 3)
CopyEdit
lst <- list(name="John", age=25)
CopyEdit
CopyEdit
CopyEdit
return(x^2)
}
21–26: Regression Models
CopyEdit
summary(model)
CopyEdit
vif(model)
26. How is multiple linear regression different from simple linear regression?
Answer: Multiple regression includes more than one independent variable.
11. What is ggplot2 and how does it differ from base R plotting?
Answer: ggplot2 is an advanced plotting system based on the grammar of graphics. It
allows more control and customization than base R plots.
hist(data$Age)
boxplot(data$Age)
CopyEdit
summary(model)
R
CopyEdit
cor(x, y)
cor.test(x, y)
Miscellaneous
18. What are R packages, and how do you install and load them?
Answer: Packages extend R's functionality.
CopyEdit
install.packages("dplyr")
library(dplyr)
CopyEdit
return(a + b)
10. How do you create custom sorting in Excel (e.g., sort by days of the week)?
Answer: Go to Sort > Custom List, enter your custom order like “Monday, Tuesday,
...” → Use it for sorting.
15. What is a moving average, and how can you calculate it in Excel?
Answer: A moving average smooths out short-term fluctuations.
Go to Insert > Chart > Trendline > Moving Average, or use formulas like
=AVERAGE(A2:A6) in a sliding window.
Statistical Analysis
16. How do you find the correlation between two columns in Excel?
Answer: Use the CORREL(array1, array2) function.