Homework 1

Data Analytics Thinking, R Fundamentals, and Descriptive Statistics

Homework 1 questions based on Lectures 1–4 and Classworks 1–3.
Author

Byeong-Hak Choe

Published

September 12, 2026

Instructions

ImportantDue and submission

Due: Wednesday, September 23, 2026, at 11:59 P.M. Eastern Time.

Submit your answers via Brightspace.

WarningGenerative AI is not permitted

Homework 1 is designed to strengthen the decision-making, R, and descriptive-statistics foundations you will need throughout DANL 101. Complete the multiple-choice, fill-in-the-blank, and R programming questions independently.

Do not use generative AI—including ChatGPT, Copilot, Gemini, Claude, or AI features built into other software—to generate, revise, explain, debug, or check any answer or code.

DANL 101 will include guided work with generative AI later in the semester. Use it only when the instructor explicitly permits it for a specific assignment. If you are unsure whether a tool is allowed, ask the instructor before using it.

  • Answer all 35 questions; the numbering matches the Brightspace quiz.
  • For each multiple-choice question, select the one best answer.
  • For each fill-in-the-blank question, enter the requested word, phrase, value, or R code.
  • Each R programming question asks about one specific blank. Enter only the code requested for that blank, even when the code block shows other blanks. Write and test your code in an R script before submitting it.

Part I: Multiple Choice

Question 1

Which question is the most decision-ready?

  1. What patterns are in the location data?
  2. Which of two available sites is more likely to break even within 12 months after accounting for demand and costs?
  3. Which site looks the most interesting?
  4. How busy are cafés?

Question 2

“Why were some comparable cafés more profitable than others?” is which kind of analytical question?

  1. Predictive
  2. Prescriptive
  3. Diagnostic
  4. Descriptive

Question 3

Which conclusion is best supported by the season-ticket renewal example?

  1. Stated intent is useful for prediction, but actual renewal also varies within an intent category.
  2. Customers always do exactly what they say they will do.
  3. A predicted non-renewer is necessarily the customer most likely to be persuaded by outreach.
  4. Seat-location tier has no relationship with renewal.

Question 4

Which situation is the best example of a business intelligence system rather than a one-time analysis?

  1. Explain why one subway line’s journey performance fell last month.
  2. Calculate one mean from one vector and never update it.
  3. Choose a chart color for a single presentation.
  4. Each month, update consistently defined service metrics by line, review a dashboard, and decide where to investigate.

Question 5

Which item turns a measured quantity into a decision-ready KPI?

  1. A decorative dashboard icon
  2. A clear goal, definition, desired direction or target, time window, comparison, owner, and linked response
  3. A larger number than last year, regardless of the goal
  4. A metric that is easy to calculate, even if nobody acts on it

Question 6

Which tool-role pairing is correct?

  1. SQL — a working environment mainly used to write R scripts
  2. RStudio — a programming language for querying databases
  3. Git — a system for recording project history
  4. GitHub — a spreadsheet for quick calculations

Question 7

After score <- 8.8 has been run, what does the R expression score == 8.8 do?

  1. Assigns 8.8 to score
  2. Converts score to character
  3. Creates a factor with 8.8 levels
  4. Compares score with 8.8 and returns a logical value

Question 8

Consider status <- factor(c("New", "Returning", "New")). Which statement is correct?

  1. status contains two values and three levels.
  2. class(status) returns "numeric".
  3. status contains three values and has two distinct levels.
  4. status cannot contain a repeated category.

Question 9

For a numeric variable containing an extreme value, which measure of center is generally less sensitive to that extreme value?

  1. Mean
  2. Median
  3. Range
  4. Variance

Question 10

In a standard boxplot created in R, which two values mark the lower and upper edges of the rectangular box (not the whiskers)? Select one answer.

  1. The minimum to the maximum
  2. The mean minus one standard deviation to the mean plus one standard deviation
  3. The first quartile (Q_1) to the third quartile (Q_3)
  4. The smallest possible outlier to the largest possible outlier

Question 11

On the NYC311 Service Request Maps dashboard set to Community Board → FY2026 → March → Noise - Commercial, Brooklyn CD1 has 410 requests and Brooklyn CD2 has 67 requests. Which statement accurately compares the two districts?

  1. CD1 had 343 more requests and about 6.1 times as many requests as CD2.
  2. CD1 had 477 more requests and about 6.1 times as many requests as CD2.
  3. CD2 had 343 more requests and about 6.1 times as many requests as CD1.
  4. CD1 had 343 more requests and exactly 343 times as many requests as CD2.

Question 12

On the NYC311 Service Request Maps dashboard set to Community Board → FY2026 → March → Noise - Commercial, Brooklyn CD1 has 410 requests and Brooklyn CD2 has 67 requests. What is the most responsible way for an NYC agency manager to interpret and use these request counts?

  1. Immediately give CD1 about 6.1 times as much funding because the counts prove its commercial noise is 6.1 times worse.
  2. Treat the difference as a reason to investigate the request records before changing staffing or funding.
  3. Conclude that the agency employees serving CD1 are performing worse than those serving CD2.
  4. Ignore the difference because 311 request data can never provide useful information.

Question 13

On the NYC311 Service Request Maps dashboard set to Community Board → FY2026 → March → Noise - Commercial, Brooklyn CD1 has 410 requests and Brooklyn CD2 has 67 requests. Before sending more staff or funding to either district, which additional set of evidence would be most useful?

  1. Requests per commercial venue, unique complaint locations, repeat-request patterns, and verified noise violations in each district
  2. The same two March request totals displayed in a different chart
  3. The order in which CD1 and CD2 appear on the dashboard
  4. The number of digits in each district’s request count

Part II: Fill in the Blanks

Question 14

Complete the data analytics workflow.

Ask → Collect → [Blank 1] → Explore → Visualize → [Blank 2] → Decide

For this question, enter only the term for Blank 1.

Question 15

Complete the data analytics workflow.

Ask → Collect → [Blank 1] → Explore → Visualize → [Blank 2] → Decide

For this question, enter only the term for Blank 2.

Question 16

A question that asks “What happened?” is what kind of analytical question?

Question 17

A question that asks “What should we do?” is what kind of analytical question?

Question 18

A useful analytical question is [Blank], comparable, and actionable.

Enter only the term that replaces the blank.

Question 19

Complete the business intelligence cycle.

Operations data → Defined metrics → [Blank 1] → Decision → [Blank 2]

For this question, enter only the term for Blank 1.

Question 20

Complete the business intelligence cycle.

Operations data → Defined metrics → [Blank 1] → Decision → [Blank 2]

For this question, enter only the term for Blank 2.

Question 21

What records changes and project history on a computer?

Question 22

What provides an online copy of a Git repository for sharing and collaboration?

Question 23

Enter only the code that replaces the blank so this function call returns 3.14.

round(3.14159, digits = ____)

Question 24

R’s var(x) calculates sample variance using what expression in the denominator?

Question 25

Taking the square root of variance gives what measure, expressed in the original unit of the variable?

Part III: R Programming — Fill in the Code Blanks

Question 26

Compute the weighted mean of scores <- c(85, 90, 88, 92, 87) with corresponding weights weights <- c(1, 2, 1, 1, 3). Enter only the R code that replaces [?], not the full line.

scores <- c(85, 90, 88, 92, 87)
weights <- c(1, 2, 1, 1, 3)
weighted_mean <- [?]

Question 27

Compute the interquartile range (IQR) of x <- c(5, 7, 6, 9, 100, 8, 5, 7, 6) manually, without using the IQR() function.

x <- c(5, 7, 6, 9, 100, 8, 5, 7, 6)
q1 <- [Blank 1](x, 0.25)
q3 <- [Blank 2](x, [Blank 3])
iqr_value <- q3 - q1

Enter only the function name that replaces Blank 1.

Question 28

Compute the interquartile range (IQR) of x <- c(5, 7, 6, 9, 100, 8, 5, 7, 6) manually, without using the IQR() function.

x <- c(5, 7, 6, 9, 100, 8, 5, 7, 6)
q1 <- [Blank 1](x, 0.25)
q3 <- [Blank 2](x, [Blank 3])
iqr_value <- q3 - q1

Enter only the function name that replaces Blank 2.

Question 29

Compute the interquartile range (IQR) of x <- c(5, 7, 6, 9, 100, 8, 5, 7, 6) manually, without using the IQR() function.

x <- c(5, 7, 6, 9, 100, 8, 5, 7, 6)
q1 <- [Blank 1](x, 0.25)
q3 <- [Blank 2](x, [Blank 3])
iqr_value <- q3 - q1

Enter only the probability value that replaces Blank 3.

Question 30

Assume x, q1, q3, and iqr_value from Questions 27–29 are already defined. Identify values below the lower fence using the 1.5 × IQR rule.

lower_bound <- q1 - 1.5 * iqr_value
upper_bound <- q3 + 1.5 * iqr_value
outliers_lower <- [Blank 1]
outliers_upper <- [Blank 2]

Enter only the R code that replaces Blank 1.

Question 31

Assume x, q1, q3, and iqr_value from Questions 27–29 are already defined. Identify values above the upper fence using the 1.5 × IQR rule.

lower_bound <- q1 - 1.5 * iqr_value
upper_bound <- q3 + 1.5 * iqr_value
outliers_lower <- [Blank 1]
outliers_upper <- [Blank 2]

Enter only the R code that replaces Blank 2.

Question 32

Calculate the skewness of x <- c(3, 5, 8, 12, 14, 15, 18, 20) without using an external R package. Skewness is defined as

\text{Skewness} = \frac{N}{(N-1)(N-2)} \sum_{i=1}^{N}\left(\frac{x_i-\bar{x}}{s}\right)^3,

where s is the sample standard deviation of x.

NoteHow to read the summation

For this vector, N=8, \bar{x}=11.875, and s\approx 6.0813. The summation symbol means “calculate one cubed standardized deviation for every value, then add all eight terms.” Written without summation notation, the calculation is

\begin{aligned} \text{Skewness} =\frac{8}{(8-1)(8-2)}\Bigg[& \left(\frac{3-11.875}{6.0813}\right)^3 +\left(\frac{5-11.875}{6.0813}\right)^3 +\left(\frac{8-11.875}{6.0813}\right)^3 +\left(\frac{12-11.875}{6.0813}\right)^3 \\ &+\left(\frac{14-11.875}{6.0813}\right)^3 +\left(\frac{15-11.875}{6.0813}\right)^3 +\left(\frac{18-11.875}{6.0813}\right)^3 +\left(\frac{20-11.875}{6.0813}\right)^3 \Bigg]. \end{aligned}

The eight cubed terms add to approximately -1.2268, so

\text{Skewness} \approx \frac{8}{7\cdot 6}(-1.2268) \approx -0.2337.

In R, vectorized arithmetic creates these eight terms, and sum() adds them.

x <- c(3, 5, 8, 12, 14, 15, 18, 20)
N <- length(x)
mean_x <- mean(x)
sd_x <- sd(x)
skewness <- [?]

You do not need to memorize the skewness formula; translate the provided formula into R code.

Question 33

Calculate the mode of v <- c(2, 3, 5, 5, 6, 7, 3, 5) with the mfv() function from the R package modeest.

v <- c(2, 3, 5, 5, 6, 7, 3, 5)
mode_v <- [Blank 1]::[Blank 2](v)

Enter only the package name that replaces Blank 1.

Question 34

Calculate the mode of v <- c(2, 3, 5, 5, 6, 7, 3, 5) with the mfv() function from the R package modeest.

v <- c(2, 3, 5, 5, 6, 7, 3, 5)
mode_v <- [Blank 1]::[Blank 2](v)

Enter only the function name that replaces Blank 2.

Question 35

Calculate z, the vector of standardized values for x <- c(10, 20, 30, 40, 50). Enter only the R code that replaces [?]. For each value,

z_i = \frac{x_i-\bar{x}}{s},

where s is the sample standard deviation of x.

x <- c(10, 20, 30, 40, 50)
z <- [?]
Back to top