Privacy note: We capture your IP address to provide customised and focused services. See our Privacy Policy.

Data Science & Statistics with Python — Alpha School

Lesson 1: The Data Science Workflow and Asking Good Questions

Data science is not mostly about clever mathematics. It is mostly about a disciplined way of working: start with a question, find or collect data that could answer it, clean and explore that data, analyse it, and communicate what you found — honestly, including what you did not find. The tools change; the workflow does not. A data scientist who follows the workflow carefully will beat a cleverer analyst who skips steps, because most real failures happen early, in a vague question or a misunderstood dataset, not in the final calculation.

Everything starts with the question, and a good question has three qualities. It is specific enough to answer: "are students happier?" is vague, while "did average reported stress fall after the new timetable began?" can be measured. It is answerable with data you can actually get. And it matters to someone — a decision hangs on the answer. Before touching any data, write the question down in one sentence, and write down what you would do differently depending on the answer. If the answer would change nothing, the question is not worth asking.

The Workflow, Step by Step

The workflow has five stages. First, define the question and the population it is about — all students, or only one year group? Second, collect the data, whether from a survey, a public dataset, or records that already exist, and note exactly where it came from. Third, clean it: fix errors, handle missing values, and make the format consistent. Fourth, explore and analyse: look at the shape of the data, test your question, and check your assumptions. Fifth, communicate: write up the answer in plain language, with a figure or two, and state the limits of what the data can say.

Two habits run through every stage. Keep notes as you go — what you changed, what you removed, and why — so that anyone could repeat your work. And keep the raw data untouched: do your cleaning on a copy, so a mistake can always be undone. These habits feel slow at first and save hours later, and they are the difference between an analysis and a guess.

A Worked Example

Imagine a worked example: a school wants to know whether a later start time would help students. A vague question would be "is the start time a problem?" A good question is "do students who start at 9:00 report less morning tiredness than students who start at 8:00, and does that differ by year group?" The population is the school's students; the data is a short survey plus attendance records; the analysis compares tiredness scores between the two groups; the communication is a one-page summary for the headteacher, with the limits stated — the survey is self-reported, and tiredness has many causes besides start time. Notice how the question shapes every later step: it decides what data to collect, what to compare, and what the answer can and cannot prove.

Questions That Changed Decisions

Good questions have changed real decisions in ways worth remembering. A hospital that asked "which patients are most likely to be readmitted, and why?" redesigned its discharge process and reduced return visits. A city that asked "where do buses run late, and for whom?" redrew its timetables around the routes that served the most people. In each case the analysis was not especially complicated; the hard part was asking a question specific enough to answer and important enough to act on. The mathematics came second, and the decision came first.

It is also worth noticing how often a good question reveals that the data you have is not the data you need. The hospital discovered it needed follow-up phone records, not just discharge notes; the city discovered it needed passenger counts, not just scheduled times. That discovery is not a failure of the workflow — it is the workflow working. A question that sends you back to collect better data has done its job, and a project that refuses to go back will answer the wrong question well.

Key Terms

Data science
The disciplined workflow of turning data into answers: question, collect, clean, analyse, communicate.
Population
The whole group a question is about, such as all students in a school.
Raw data
Data exactly as collected, before any cleaning; it should never be overwritten.
Reproducibility
Being able to repeat an analysis exactly, from the same data and the same steps.
Analysis
The stage of exploring data and testing a question with it.
Communication
Presenting findings clearly, with their limits, so a decision can be made.

Discussion Questions

  1. Why is 'are students happier?' a weak question? Rewrite it so it can be answered with data.
  2. If the answer to a question would change nothing you do, should you still analyse the data? Why?
  3. Why keep the raw data untouched? What could go wrong if you clean the only copy?

Practice Questions

  1. What are the five stages of the data science workflow?
  2. Give three qualities of a good data science question.
  3. In the worked example, what is the population?
  4. Why should you write down what you would do differently depending on the answer?
  5. Why keep notes on every cleaning step?
Show answers
  1. Define the question; collect the data; clean it; explore and analyse it; communicate the findings.
  2. It is specific enough to answer, it is answerable with data you can actually get, and it matters — a decision hangs on the answer.
  3. The school's students. The question is about them, so the data must represent them.
  4. To check the question matters: if no answer would change anything, the question is not worth asking. It also keeps the analysis focused on the decision.
  5. So anyone — including you later — can repeat the work exactly and check what was changed and why. That is reproducibility.
Keep reading to complete this lesson