Problem Sets and Exams

This post provides background and details on problem sets and exams in Gov 1005.

All problem set and exam solutions are submitted via Github Classroom. For problem sets, you will create, at least, two new files: ps_N.Rmd and ps_N.html, where N is replaced by the number of the problem set. You must use exactly these names. Replace “ps” with “exam” for exam submissions. Your projects may also contain other files, either distributed by us as part of the assignment or added by you.

  • The two documents you are submitting are very different.
    • The Rmd file is a technical document, an accurate record of your work which allows you (and us!) to reproduce your html easily. It should be well-organized, nicely formatted and clean. Non-technical readers will not understand it, but that is OK.
    • The html file is a presentation document, designed for non-technical readers. No R code or weird warnings or obscure messages mar its pleasing appearance.
  • It must be possible for us to replicate your work. That is, we will clone your repo and open your Rmd file. When we knit it, we should produce your html. If we can’t, we will take off points. (The Course Assistants will be happy to test your work before you submit it. Visit them during Study Hall!)

Question Types

There are three main types of questions on the problem sets: Mad Libs, tables, and graphics. For these, you do not write any prose. Some exam questions, on the other hand, require a paragraph or so of explanation.

Mad Libs

A Mad Libs style question provides a sentence with an X which you must replace with the correct answer. For example, the question might state:

The state with the most rows is X. (format state like Massachusetts, not MA)

You copy/paste that sentence as your answer, but replace the X with inline R code that determines the correct replacement for X dynamically. Do not include the words in the parentheses. They are there for explanation. Do not simply copy/paste the correct answer. In your Rmd, you might write:

The state with the most rows is `r x %>% group_by(state) %>% count() %>% arrange(desc(n)) %>% slice(1) %>% pull(state)`.

When you knit your Rmd file, this will turn into:

The state with the most rows is Massachusetts.

This is (you hope!) the answer that we are looking for.

Obviously, x needs to be a tibble which you have already created and which has state as a variable name. Sometimes, so much code is needed to answer the Mad Lib that it is placed in its own code chunk, with the answer saved as an object.

y <- x %>% 
  group_by(state) %>% 
  count() %>% 
  arrange(desc(n)) %>% 
  slice(1) %>% 
  pull(state)

But that object is still placed in the inline code:

The state with the most rows is `r y`.

Late Days

You may use your late days on the problem sets, with a maximum of 1 late day per problem set. When using GitHub, there is no “submission”" button. Rather, we download the latest commit you’ve pushed as of 11:55 PM on Wednesday and grade that. If you want to use a late day for a problem set, email a teaching fellow before the due date. Otherwise, we will grade your latest commit as of the deadline.

Late days may not be used on exams. We grade whatever is in your Github repo as of the deadline.

Colleagues

Always list, at the very end of the problem set, the names of any students with whom you worked on the problem set. If there were none, write None. We define “worked with”" very broadly. It would certainly include anyone you sat next to or across from at a Study Hall, even if you only exchanged a few words.

David Kane
Preceptor in Statistical Methods and Mathematics
comments powered by Disqus