Midterm Exam 2 – Open Book Section – Part 2 Instructions…

Midterm Exam 2 – Open Book Section – Part 2 Instructions Save the .ipynb file in your working directory – the same directory where you will download the data files into. Read the question and create the code necessary within the code chunk section immediately below each question. Type your answer to the questions in the text block provided immediately after the response prompt. Once you’ve finished answering all questions, submit the file as a HTML on Canvas.  Ready? Let’s begin… Data Sets For Questions 1-5: Use the dataset “fraud_detection”. For Question 6: Use the dataset “poisson_data”.  The files of the two datasets are provided below: fraud_detection.csv poisson_data.csv Jupyter Notebook Python starter template: Spring2025_Midterm2_Python_Starter_Template-2.ipynb   Jupyter Notebook R starter template: Spring2025_Midterm2_R_Starter_Template-2.ipynb

Q1 Data Exploration (9 points) Use the dataset “fraud_…

Q1 Data Exploration (9 points) Use the dataset “fraud_detection” for this question. a.(3 points) What is the overall proportion of fraudulent vs. non-fraudulent transactions? Is the dataset imbalanced? b. (3 points) Compare the percentage of fraud cases with respect to the type of device used for transaction? Use also a visual approach to compare the percentage values. Which devices are more vulnerable? c. (3 points) If we group transactions by Transaction_Hour, can we identify fraud-prone time windows? Also use a visual apporach for your analysis.

Questions must be Multiple Choice (one answer choice) or Mul…

Questions must be Multiple Choice (one answer choice) or Multiple Answer (more than one answer choice). If the question is multiple, answer choices can not be “A or B” etc (This makes it difficult when answer choices are shuffled). A choice *can* be “all of the above.”  Use the following format for credit. Ensure that your correct answer is CLEARLY MARKED for credit. Question: What color is the grass Answers: 1) Green