PA Exam Master Grades …Edufiles
Code to remove variables-CORRECT ANSWERS✔✔rm( )
Clustering and PCA are what type of algorithms-CORRECT ANSWERS✔✔Unsupervised that find and
simplify variation in the data without you, as the user, having to do it
Code for Histogram-CORRECT ANSWERS✔✔ggplot(data=data) + geom_histogram(aes(x=variable))
Code for Histogram using density-CORRECT ANSWERS✔✔ggplot(data=data) +
geom_density(aes(x=variable), fill="color")
Code for Scatterplot-CORRECT ANSWERS✔✔ggplot(data=data, aes(x=variable, y=variable)) +
geom_point(aes(color="color))
Code for Boxplot-CORRECT ANSWERS✔✔ggplot(data=data, aes(x=variable, y=variable)) +
geom_boxplot()
Code for Violion-CORRECT ANSWERS✔✔ggplot(data=data, aes(x=variable, y=variable)) + geom_violin()
,Code for Line Graph-CORRECT ANSWERS✔✔ggplot(data=data, aes(x=variable, y=variable)) +
geom_lime()
Code for RMSE-CORRECT ANSWERS✔✔predict.variable <- predict(regression, data, type="response")
rmse.variable <- sqrt(sum(predict.variable - data$variable)^2)/nrow(data)
rmse.variable
Code to add labels-CORRECT ANSWERS✔✔labs(x=" ", y=" ", title=" ")
Code for weighted Histogram-CORRECT ANSWERS✔✔ggplot(data, mapping=aes(x, fill=variable) +
geom_hist(aes(weight=expo),alpha=#)
or
ggplot stays the same + geom_hist(aes(weight,fill=variable),alpha=#)
Note for the Exam 1-CORRECT ANSWERS✔✔For missing data you can eliminate the record and
comment on a more sophisticated approach
Technique 1 for dealing with missing values-CORRECT ANSWERS✔✔Remove the column if there is so
many missing values if it is no longer useful in the model
Technique 2 for dealing with missing values-CORRECT ANSWERS✔✔Remove the row when missing
values are few and random enough so that removing them will not introduce a bias or reduce the
effectiveness of the model.
, Technique 3 for dealing with missing values-CORRECT ANSWERS✔✔Replace the missing value with
mean, median or mode. You can either use this based off the other data or randomly select ad replace.
Either way this approach assumes the missing values are completely random.
Technique 4 for dealing with missing values-CORRECT ANSWERS✔✔Replace missing values with an
assigned category/value.This should be used if data is missing systematically.
Technique 5 for dealing with missing values-CORRECT ANSWERS✔✔Predict the missing value using the
other variables (imputation) uses a model or models based on combinations of variables to fill in the
missing values. We can only use this if we assume there is a true value associated with each missing
value and that value was omitted.
Note for the Exam 2-CORRECT ANSWERS✔✔During the exam you will not be asked to take samples
from the data other than to create training and validation sets.
Note for Exam 3-CORRECT ANSWERS✔✔During the exam you must pick an appropriate time frame and
sample such that you have a good representation of the intended population in your dataset.
Purpose of ASOP 23-CORRECT ANSWERS✔✔The purpose of this actuarial standard of practice (ASOP) is
to provide guidance to the actuary when performing the following:
a. selecting the data that underlie the actuarial work product;
b. relying on data supplied by others;
c. reviewing data;
d. using data;
e. preparing data to be used by other actuaries in an actuarial work product; and
f. making appropriate disclosures with regard to data quality.
Code for a linear model-CORRECT ANSWERS✔✔lm(dependent~independent + independent + ... ,
data=data)
Code to remove variables-CORRECT ANSWERS✔✔rm( )
Clustering and PCA are what type of algorithms-CORRECT ANSWERS✔✔Unsupervised that find and
simplify variation in the data without you, as the user, having to do it
Code for Histogram-CORRECT ANSWERS✔✔ggplot(data=data) + geom_histogram(aes(x=variable))
Code for Histogram using density-CORRECT ANSWERS✔✔ggplot(data=data) +
geom_density(aes(x=variable), fill="color")
Code for Scatterplot-CORRECT ANSWERS✔✔ggplot(data=data, aes(x=variable, y=variable)) +
geom_point(aes(color="color))
Code for Boxplot-CORRECT ANSWERS✔✔ggplot(data=data, aes(x=variable, y=variable)) +
geom_boxplot()
Code for Violion-CORRECT ANSWERS✔✔ggplot(data=data, aes(x=variable, y=variable)) + geom_violin()
,Code for Line Graph-CORRECT ANSWERS✔✔ggplot(data=data, aes(x=variable, y=variable)) +
geom_lime()
Code for RMSE-CORRECT ANSWERS✔✔predict.variable <- predict(regression, data, type="response")
rmse.variable <- sqrt(sum(predict.variable - data$variable)^2)/nrow(data)
rmse.variable
Code to add labels-CORRECT ANSWERS✔✔labs(x=" ", y=" ", title=" ")
Code for weighted Histogram-CORRECT ANSWERS✔✔ggplot(data, mapping=aes(x, fill=variable) +
geom_hist(aes(weight=expo),alpha=#)
or
ggplot stays the same + geom_hist(aes(weight,fill=variable),alpha=#)
Note for the Exam 1-CORRECT ANSWERS✔✔For missing data you can eliminate the record and
comment on a more sophisticated approach
Technique 1 for dealing with missing values-CORRECT ANSWERS✔✔Remove the column if there is so
many missing values if it is no longer useful in the model
Technique 2 for dealing with missing values-CORRECT ANSWERS✔✔Remove the row when missing
values are few and random enough so that removing them will not introduce a bias or reduce the
effectiveness of the model.
, Technique 3 for dealing with missing values-CORRECT ANSWERS✔✔Replace the missing value with
mean, median or mode. You can either use this based off the other data or randomly select ad replace.
Either way this approach assumes the missing values are completely random.
Technique 4 for dealing with missing values-CORRECT ANSWERS✔✔Replace missing values with an
assigned category/value.This should be used if data is missing systematically.
Technique 5 for dealing with missing values-CORRECT ANSWERS✔✔Predict the missing value using the
other variables (imputation) uses a model or models based on combinations of variables to fill in the
missing values. We can only use this if we assume there is a true value associated with each missing
value and that value was omitted.
Note for the Exam 2-CORRECT ANSWERS✔✔During the exam you will not be asked to take samples
from the data other than to create training and validation sets.
Note for Exam 3-CORRECT ANSWERS✔✔During the exam you must pick an appropriate time frame and
sample such that you have a good representation of the intended population in your dataset.
Purpose of ASOP 23-CORRECT ANSWERS✔✔The purpose of this actuarial standard of practice (ASOP) is
to provide guidance to the actuary when performing the following:
a. selecting the data that underlie the actuarial work product;
b. relying on data supplied by others;
c. reviewing data;
d. using data;
e. preparing data to be used by other actuaries in an actuarial work product; and
f. making appropriate disclosures with regard to data quality.
Code for a linear model-CORRECT ANSWERS✔✔lm(dependent~independent + independent + ... ,
data=data)