Quiz 04: Policies and Information

Location, Date, and Time

Conflicts: There will be no conflict quiz as students are able to choose the time and date of their quiz.

Quiz Content

All quizzes are cumulative. Previous material can reappear on a later quiz.

3.2: Missingness

  • What kinds of the data structures exist in R? How are they related to each other?
  • What are the different ways to subset data? Why does R allow subsetting to work in this manner?
  • How do preserving and simplifying subsets differ? (c.f. Train/Salt shaker example)
  • What are the differences between brackets and dollar signs?
  • Why and when does coercion occur when working with R data types?
  • How do NULL and NA differ from each other? When should one be used over the other?
  • Describe the different types of missing data.

3.3: Loop-the-Loops

  • Why simulate?
  • Why are computers good at iteration and humans aren’t?
  • How do loops use sequences to process data?
  • What kind of iteration structures exist? What kind of iterative task is each loop good at?
  • What are some drawbacks to sequences in a for loop?
  • Why can you write a for loop as a while loop but not vice versa?
  • Why can’t you always write a while loop as a repeat loop?
  • What happens in a while loop if the condition is always evaluating to TRUE?

3.4: Bootstrap

  • When should bootstrapping be used?
  • What are the different types of bootstrapping? How does the underlying assumptions change between types?
  • What is the strategy for implementing each type of bootstrap?
  • Why is it better to allocate a vector of NA values instead of directly specifying a specific data type to hold the bootstrapped statistics?

4.1: Tidy data

  • What is the pipe operator (%>%) read as?
  • Do all functions have to receive data in their first argument to be used with the pipe operator?
  • Explain what the Anna Karenina Principle is and how it is related to tidy data.
  • List the three tenets of tidy data.
  • Describe the common “messy” forms of data. How does one of these forms relate to contingency tables (e.g. frequency tables)?
  • How are tidy tenets aligned with “long” and “wide” data?

Materials Provided

Students will have access to:

Materials Needed

  • Preferably, a rested mind and non-broken hands that can type.


  • All answers must be reasonably simplified.
  • Decimals answers must contain two significant digits.
  • Grading will be done as follows:
    • A correct answer will receive all points.
    • An incorrect answer will receive proportionally appropriate partial credit.

If you have a technical issue while answering questions or need assistance with opening or starting the quiz, please alert the proctor.

Do not leave the CBTF without filing an issue with the proctor if something goes wrong.


Have a testing accommodation? Please see how the CBTF handles Letters of Accommodation.

The short version: Please bring a copy of the Letter of Accommodation to the CBTF Proctors prior to the test taking place.

Academic Integrity

In short, don’t cheat. Keep your eyes on your own quiz. Do not discuss the quiz with your friends after you have taken it. Any violation will be punished as harshly as possible.

Advice for Studying

The best way to study for a STAT 385 quiz is by writing and reading code. Try to take an idea in STAT 385 and apply it to your own work.

With this being said, there are four other resources that may assist your studies:

  • Topic Outline (Above)
  • Lecture Code
  • Homework
  • Practice Midterm Questions

Again, the best way to study is to do programming in some fashion. Whether that be writing code or explaining how code works to someone else.

Do not spend time memorizing lecture slides. You will not see any verbatim questions.

Do not try pulling an all-nighter. You can schedule your quiz anytime between a time window. To program efficiently, you need sleep despite the quote:

“Programmers are an organism that turns caffeine into code.”

Frequently Asked Questions

What kind of question types are on the quiz?

There are generally four types of problems:

  • True / False
  • Multiple Selection (e.g. select ALL correct answers from a list)
  • Fill in the blank
  • Writing Code

How many problems are on the quiz?

Only one question with 15012391 subquestions. In all seriousness, do not fixate on a number. There will be a reasonable amount of questions for the time period.

How long will it take to do the quiz?

Depending on your background, the quiz may take:

  • Prior R in-depth experience: 25 minutes
  • Some R experience: 35 minutes
  • No R experience: 50 minutes

Avoid fixating on time. Life will come and go more quickly than you realize. Focus more on the content.

When will the quiz be returned?

As all problems are automatically graded, we should be able to post the quiz results after the examination window closes.

Will the quiz be curved?


We got our grades back, now will the quiz be curved?

No. Curving is only done sparingly at the end of the semester. Individual assignments are not modified.