100% Pass
What to examine when assessing the bivariate relationship between a Factor predictor
variable and a binary target variable? - ✔✔A table to asses (with rows as factor levels)
the mean probabilities, counts of observations of each factor, and counts of each
observation of each binary target.
What to examine when assessing the bivariate relationship between a Continuous
predictor variable and a binary target variable? - ✔✔- A graph with separate histograms
for a continuous variable, one for those with target binary = 0 and one for those with
binary = 1;
- Box plots summarized based on binary target;
- Tables summarizing the mean, median, and count of the predictor based on each
binary target
What to examine when assessing the bivariate relationship between a Factor predictor
variable and a Continuous target variable? - ✔✔Box Plots and tables summarizing the
mean, median, and count of the target based on each factor
100% Pass Guarantee Katelyn Whitman All Rights Reserved © 2025 1
,What to examine when assessing the bivariate relationship between a Continuous
predictor variable and a Continuous target variable? - ✔✔Scatter plots. Correlation
between each variable [cor() in R].
What to examine when assessing (univariate analysis) a Continuous predictor variable?
- ✔✔Assess the histogram of the distribution. Check the skewness (does it need to have
a log transformation).
- Check for extreme (unreasonable) outliers
- Check for obvious errors in data
- Check for obvious duplicates
What to examine when assessing (univariate analysis) a Factor predictor variable? -
✔✔Assess Bar chart. (Count of observations per factor level)
What data questions should be considered while reading the project statement? - ✔✔Is
the project statement more interested in interpretable models or more accurate
complicated models?
What type of variable is the target variable?
What type of variable are the predictor variables?
Are there any outliers that need to be removed?
Are there any Factor variables that could be combined?
100% Pass Guarantee Katelyn Whitman All Rights Reserved © 2025 2
,R-Code; Histogram Continuous Variable - ✔✔ggplot(df, aes(x = variable)) +
geom_histogram(bins = 30) +
labs(x = "variable")
R-Code; Bar chart for a factor variable - ✔✔ggplot(df, aes(x = variable)) +
geom_bar() +
labs(x = "variable")
R-Code; Table for binary target and factor variable - ✔✔data %>%
group_by(variable) %>%
summarise(
zeros = sum(Target == 0),
ones = sum(Target == 1),
n = n(),
proportion = mean(Target)
)
R-Code; Separate histograms for a continuous variable and a binary target - ✔✔ggplot(
data,
100% Pass Guarantee Katelyn Whitman All Rights Reserved © 2025 3
, aes(
x = variable,
group = Target,
fill = as.factor(Target),
y = ..density..
)
)+
geom_histogram(position = "dodge", bins = 30)
R-Code; Relevel Factor variables - ✔✔table <- as.data.frame(table(df$variable))
max <- which.max(table[, 2])
level.name <- as.character(table[max, 1])
df$variable <- relevel(df$variable, ref = level.name)
R-Code; Remove all observations in entire data set of a variable greater than or equal to
50 - ✔✔data <- data[data$variable <= 50, ]
R-Code; Remove all observations of a factor variable = "value" - ✔✔toBeRemoved <-
which(data$factor=="value")
data <- data[-toBeRemoved, ]
100% Pass Guarantee Katelyn Whitman All Rights Reserved © 2025 4