ISyE_6414_Fall26_Final_Exam with 100% Correct Answers
Final Exam Part 2
Fall Semester 2026
Instructions
This R Markdown/Jupyter Notebook file includes the questions, the empty code chunk sections for your
code, and the text blocks for your responses. Answer the questions below by completing the R
Markdown/Jupyter Notebook file. You may make slight adjustments to get the file to knit/convert but
otherwise keep the formatting the same. Once you’ve finished answering the questions, submit your
responses in a single knitted file as HTML only.
There are 23 questions divided among 7 sections. The number of points for each question is provided.
Partial credit may be given if your code is correct but your conclusion is incorrect or vice versa.
Next Steps:
1. Save the .Rmd/.ipnyb file in your R working directory - the same directory where you will download
the “diabetes.csv” data file into. Having both files in the same directory will help in reading the
“diabetes.csv” file.
2. Read the question and create the R code necessary within the code chunk section immediately below
each question. Knitting this file will generate the output and insert it into the section below the code
chunk.
3. Type your answer to the questions in the text block provided immediately after the response prompt.
4. Once you’ve finished answering all questions, knit this file and submit the knitted file as htm l on
Canvas.
• Make sure to start submission of the exam at least 10 minutes before the end of the exam time. It is
your responsibility to keep track of your time and submit before the time limit.
• If you are unable to knit your file as HTML for whatever reason, you may upload your
Rmd/ipynb/PDF/Word file instead. However, you will be penalized 10%.
• If you are unable to upload your exam file for whatever reason, you may IMMEDIATELY attach the
file to the exam page as a comment via Grades-> Final Exam Open Book Section (R) - Part 2 ->
Comment box.
• Note that you will be penalized 10% (or more) if the submission is made within 5 minutes after the
exam time has expired and a higher penalty if more than 5 minutes. Furthermore, you will receive
zero points if the submission is made after 15 minutes of the exam time expiring. We will not allow
later submissions or re-taking of the exam.
• If you upload your file after the exam closes, let the instructors know via a private Piazza post. Please
DON’T attach the exam file via a private Piazza post to the instructors since you could compromise
the exam process. Any submission received via Piazza will not be considered.
1
,Mock Exam ple Qu estion - 4pts
This will be the exam question - each question is already copied from Canvas and inserted into individual
text blocks below, you do not need to copy/paste the questions from the online Canvas exam.
2
, # Example code chunk area. Enter your code below the comment`
data = data
Mock Response to Qu estion : This is the section where you type your written answers to the question.
Depending on the question asked, your typed response may be a number, a list of variables, a few
sentences, or a combination of these elements.
testing
Ready? Let’s begin. W e w ish you the best of luck!
Fin al Exam Par t 2 - Data Set Background
For this exam, you will be building a model to predict whether a hospital patient (female) has diabetes
based on patient information.
The diabetes.csv dataset consists of the following 9 variables:
1. Pregnancies: the number of pregnancies the patient has experienced in her lifetime
2. Glucose: plasma glucose concentration (2 hour oral test)
3. BloodPressure: diastolic blood pressure (mm Hg)
4. SkinThickness: triceps skin fold thickness (mm)
5. Insulin: 2 hour serum insulin (mu U/ml)
6. BMI: Body mass index (weight in kg/(height in m)ˆ2)
7. DiabetesPedigree: Diabetes pedigree function
8. Age: Age in years
9. Outcome: 0 if the patient does not have diabetes, 1 if the patient has diabetes
Read the data and answer the questions below. Assume a significance level of 0.05 for hypothesis tests
unless stated otherwise.
Read Data
# Load relevant libraries (add here if needed)
library(car)
## Loading required package: carData
library(caret)
## Warning: package ’caret’ was built under R version 4.1.2
## Loading required package: ggplot2
3
Final Exam Part 2
Fall Semester 2026
Instructions
This R Markdown/Jupyter Notebook file includes the questions, the empty code chunk sections for your
code, and the text blocks for your responses. Answer the questions below by completing the R
Markdown/Jupyter Notebook file. You may make slight adjustments to get the file to knit/convert but
otherwise keep the formatting the same. Once you’ve finished answering the questions, submit your
responses in a single knitted file as HTML only.
There are 23 questions divided among 7 sections. The number of points for each question is provided.
Partial credit may be given if your code is correct but your conclusion is incorrect or vice versa.
Next Steps:
1. Save the .Rmd/.ipnyb file in your R working directory - the same directory where you will download
the “diabetes.csv” data file into. Having both files in the same directory will help in reading the
“diabetes.csv” file.
2. Read the question and create the R code necessary within the code chunk section immediately below
each question. Knitting this file will generate the output and insert it into the section below the code
chunk.
3. Type your answer to the questions in the text block provided immediately after the response prompt.
4. Once you’ve finished answering all questions, knit this file and submit the knitted file as htm l on
Canvas.
• Make sure to start submission of the exam at least 10 minutes before the end of the exam time. It is
your responsibility to keep track of your time and submit before the time limit.
• If you are unable to knit your file as HTML for whatever reason, you may upload your
Rmd/ipynb/PDF/Word file instead. However, you will be penalized 10%.
• If you are unable to upload your exam file for whatever reason, you may IMMEDIATELY attach the
file to the exam page as a comment via Grades-> Final Exam Open Book Section (R) - Part 2 ->
Comment box.
• Note that you will be penalized 10% (or more) if the submission is made within 5 minutes after the
exam time has expired and a higher penalty if more than 5 minutes. Furthermore, you will receive
zero points if the submission is made after 15 minutes of the exam time expiring. We will not allow
later submissions or re-taking of the exam.
• If you upload your file after the exam closes, let the instructors know via a private Piazza post. Please
DON’T attach the exam file via a private Piazza post to the instructors since you could compromise
the exam process. Any submission received via Piazza will not be considered.
1
,Mock Exam ple Qu estion - 4pts
This will be the exam question - each question is already copied from Canvas and inserted into individual
text blocks below, you do not need to copy/paste the questions from the online Canvas exam.
2
, # Example code chunk area. Enter your code below the comment`
data = data
Mock Response to Qu estion : This is the section where you type your written answers to the question.
Depending on the question asked, your typed response may be a number, a list of variables, a few
sentences, or a combination of these elements.
testing
Ready? Let’s begin. W e w ish you the best of luck!
Fin al Exam Par t 2 - Data Set Background
For this exam, you will be building a model to predict whether a hospital patient (female) has diabetes
based on patient information.
The diabetes.csv dataset consists of the following 9 variables:
1. Pregnancies: the number of pregnancies the patient has experienced in her lifetime
2. Glucose: plasma glucose concentration (2 hour oral test)
3. BloodPressure: diastolic blood pressure (mm Hg)
4. SkinThickness: triceps skin fold thickness (mm)
5. Insulin: 2 hour serum insulin (mu U/ml)
6. BMI: Body mass index (weight in kg/(height in m)ˆ2)
7. DiabetesPedigree: Diabetes pedigree function
8. Age: Age in years
9. Outcome: 0 if the patient does not have diabetes, 1 if the patient has diabetes
Read the data and answer the questions below. Assume a significance level of 0.05 for hypothesis tests
unless stated otherwise.
Read Data
# Load relevant libraries (add here if needed)
library(car)
## Loading required package: carData
library(caret)
## Warning: package ’caret’ was built under R version 4.1.2
## Loading required package: ggplot2
3