aNet.ai
Data Science/Lab work
0day streak0XP · Lv 1
← Lab 1 overview and setup
Lab 1 · Section 4 of 6

Explain pass rates by study mode

Part 4 · TODO 3, chart and four explanations

First · connect to the lecture

The mean of complete 0/1 outcomes is a rate. The denominator is course registrations, linking directly to the later lecture on counts and rates.

Week 1 Lab 1 summary; Week 5 rates and unknown outcomes, PDF pp. 5–24

Your task

Choose the study-mode column in TODO 3, inspect the table and chart, and state the denominator in words.

Evidence to include

Quote both group sizes and pass rates from your output, then give a noncausal interpretation.

Notebook questions and code

Read here; run in your downloaded notebook. Start with its setup cells and run in order. Use your own ID and outputs where requested.

Download Lab 1 notebook

Part 4: Make one simple summary

The next task calculates a course-registration pass rate by study mode.

This denominator is enrolments, not students. A student taking four courses contributes four registration rows.

Predict: Is this the same as “the percentage of students who passed”? Explain before you run the code.

Python · cell 17 — read here, run in your notebook
# TODO 3 - Replace the blank with the column that divides rows into full-time and part-time groups.
# Hint: look at one_student_table.head().

pass_rate_by_mode = (
    joined.groupby(_____)["passed"]
    .agg(n="size", pass_rate="mean")
    .assign(pass_rate=lambda x: (100 * x["pass_rate"]).round(1))
    .reset_index()
)
pass_rate_by_mode
Python · cell 18 — read here, run in your notebook
ax = pass_rate_by_mode.plot.bar(
    x="study_mode", y="pass_rate", legend=False,
    title="Course-registration pass rate by study mode"
)
ax.set_ylabel("Pass rate (%)")
ax.set_xlabel("Study mode")
plt.show()

Explain the output

  1. Report the two group sizes and pass rates.
  2. State the denominator in plain English.
  3. Complete this sentence:

“In this dataset, the course-registration pass rates differ by study mode. This describes ________. It does not prove that ________.”

  1. Give one possible reason, other than study mode itself, that could help explain a difference.

Saved only in this browser. This note doesn’t fill in the downloaded notebook; “reviewed” is a personal checklist, not a grade.

aNet.ai · Data Science Fundamentals · Weeks 1–5 · practice material, not an official examProgress saved in this browser