Skip to content

Midterm 2 Practice Problems Release Notes

PMT2 = "Practice Midterm 2 problems"

Success

While we're releasing all of the solutions with the notebooks, we recommend you don't use those until you finish the whole practice exam, or if you get stumped on an exercise for an extended period of time. Learning how to resolve and hunt down those issues on your own is the skill you need to build in order to prepare for the exam.

Note

You're free to discuss these practice exams openly and share your code with classmates. Connecting with others on Piazza may help you think through alternative approaches to problems.


NOTE NEW EXAM FORMAT -- PLEASE READ!!!

Prior to the Fall 2024 semester, most problems were written to be able to be solved with either Pandas or SQL, with varying levels of difficulty. Starting with the Fall 2024 MT2, each exercise specifies that you use either Pandas, or SQL.

This requirement means students need to prepare for both in order to answer all of the exercises.


Practice Exam Solutions

Special Example Exam: PMT2-EX1(MT2 SQLite and Pandas)

Official Solution

  • Note: this is a quick demo created to show you what Pandas or SQL-only exercises look like
  • Topic: Star Wars
  • Key skills: SQL, Pandas

PMT2-SP25

Official Solution

TA Walkthrough Video

TA Walkthrough Solution

More solutions from TA testing - placeholder, releasing by 10/15

  • 11 exercises; 22 available points; 14 points required for 100%; Time limit 4 hours
  • Topic: Data Deidentification. This exam mimics the process of exploring and extracting data from a university database for third-party research.
  • Key skills: SQL, Basic Python, pandas, and NumPy

PMT2-FA24

Official Solution

TA Walkthrough Video

TA Walkthrough Solution

More solutions from TA testing - placeholder, releasing by 10/15

  • 10 exercises; 17 available points; 12 points required for 100%; Time limit 4 hours
  • Topic: Netflix and Bills. In this notebook you will evaluate whether there is a relationship between the programming that is distributed by Netflix and the financial performance of the firm.
  • Key skills: General Python', Tabular Data, Pandas, SQL and SQLite, NumPy

PMT2-SP24

Official Solution

TA Walkthrough Video

TA Walkthrough Solution

  • 7 exercises; 13 available points; 7 points required for 100%; Time limit 4 hours
  • Topic: NYC Roadmap - Traffic fatality density. In this notebook you will look through some NYC traffic data to build a KDE model.
  • Key skills: SQL, Pandas, Numpy

PMT2-FA23

Official Solution

TA Walkthrough Video

TA Walkthrough Solution

  • 9 exercises; 21 available points; 13 points required for 100%; Time limit 4 hours
  • Topic: "Punt, Kick, or Go for it?". In this notebook you will look through some NFL play results and create a risk/reward model.
  • Key skills: Pandas, Numpy

PMT2-SP23

Official Solution

TA Walkthrough Video

-- The TA Walkthrough solution presentation for this exam was split between 2 TAs, so the solution pages below represent the exercises that each TA presented. Students will need both for a complete solution.

TA Walkthrough Solution #1

TA Walkthrough Solution #2

  • 11 exercises; 21 available points; 12 points required for 100%; Time limit 4 hours
  • Topic: "Better Reads". In this notebook you will look through user-generated book reviews to uncover "communities of users".
  • Key skills: SQL, Pandas, Numpy

PMT2-FA22

Official Solution

TA Walkthrough Video

-- The TA Walkthrough solution presentation for this exam was split between 2 TAs, so the solution pages below represent the exercises that each TA presented. Students will need both for a complete solution.

TA Walkthrough Solution #1

TA Walkthrough Solution #2

  • 9 exercises; 19 available points; 12 points required for 100%; Time limit 4 hours
  • Topic: Capturing Data Changes for Slowly Changing Dimensions. In this notebook you will implement a common data engineering paridigm to maintain a historical record of some mock-up business data.
  • Key skills: Manipulating tabular data with Pandas and SQL, Strings
  • Note: Most exercises in this notebook are solvable with Pandas or SQLite. However, the solutions using SQLite need to be "massaged" to pass all of the test cells. Pandas is strongly recommended.

PMT2-SP22

Official Solution

TA Walkthrough Video

-- The TA Walkthrough solution presentation for this exam was split between 2 TAs, so the solution pages below represent the exercises that each TA presented. Students will need both for a complete solution.

TA Walkthrough Solution #1

TA Walkthrough Solution #2

  • 9 exercises; 17 available points; 12 points required for 100% (lowered from 14); Time limit 4 hours
  • Topic: Actor network analysis. In this notebook you will explore a dataset of film credits and create/analyze a relationship network of actors starring in the films.
  • Key skills: Pandas, native Python data structures, and incorporating new tools given appropriate documentation.

PMT2-FA21

Official Solution

TA Walkthrough Video

-- The TA Walkthrough solution presentation for this exam was split between 2 TAs, so the solution pages below represent the exercises that each TA presented. Students will need both for a complete solution.

TA Walkthrough Solution #1

TA Walkthrough Solution #2

  • 7 exercises; 13 available points; 9 points required for 100%; Time limit 4 hours
  • Topic: Campaign finance geography. In this notebook you will calculate how similar ZIP codes in the United States are to one another based their residents' donations to political candidates in the 2020 election cycle.
  • Key skills: Pandas, SQLite, sparse matrices