Ask, collect and show · Statistics & Data Science | StemPy Lab
Course 3.2·Lesson 1 of 3
Ask, collect and show
A data project has six steps: ask one clear question, collect the data, clean it, show it, summarise it and report it. A month of daily highest temperatures is numerical data, measured, and a rainy day is a category. A frequency table counts the days in each group, and a line graph shows how the data changes over time.
about 30 min1 simulation2 practice questions2 Python programs6 questions to check yourself
This lesson is free to read. Enroll free to keep your place and take the tests.
Lesson 1 of 3Show all lessonsHide
Try the code and the simulations beside the lesson.
A project in six steps
A weather record is a good first project. It has numbers, categories, a change over time, and chance. The six steps are the same for any data.
Six boxes in two rows show the steps of a data project. Row one, from left to right: step 1 Ask, one clear question; step 2 Collect, a fair sample and a table; step 3 Clean, check strange values. An arrow leads from step 3 to row two, from left to right: step 4 Show, a table and a graph; step 5 Summarise, average, spread and chance; step 6 Report, numbers, a graph and one limit.
Ask one clear question.
Collect the data, in a table.
Clean it: check any value that looks strange.
Show it with a table and a graph.
Summarise it: the average, the spread and the chances.
Report it: the numbers, a graph and one honest limit.
Our question
What was the weather like in our town last month?
We have the highest temperature, in degrees Celsius, on each of 30 days in a row. We also know which days it rained: days 8,9,10,17,18,19,20,27,28 and 29.
What kinds of data?
The temperature is numerical, and it is measured, so it is continuous.
Rain or no rain is categorical. There are two categories, and they have no order.
The two kinds need different tools: a mean for the temperature, a count for the rain.
Try it in Python
A frequency table and a graph
Thirty numbers are hard to read, so we group the days: 27 to 29, 30 to 32 and 33 to 35 degrees.
A line graph shows the change over time
A histogram shows the shape, but it hides the order of the days. A line graph keeps the order.
A line graph of the highest temperature on each of 30 days, from 27 to 35 degrees Celsius. Dry days are orange dots and rainy days are blue triangles. A dashed red line marks the mean, 30.7 degrees. The temperature rises and falls in waves, and the rainy days come in runs when the temperature is low: days 8 to 10, 17 to 20 and 27 to 29.
You should find that the rainy days sit in the dips of the line: days 8 to 10, 17 to 20 and 27 to 29. The weather comes in spells, and we use this later.
Practise with new numbers
Common mistakes
Starting without a clear question. The question decides what to collect.
Calling a measured temperature discrete because it is written as a whole number.
Groups that overlap or leave gaps. Every day must go in exactly one group.
Using a histogram to show change over time. It loses the order of the days.
Remember these
The six steps: ask, collect, clean, show, summarise, report.
Temperature is numerical and measured. Rain or no rain is categorical.
A histogram shows the shape. A line graph shows the change over time.
Check yourself
Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.
Is the number of rainy days in a week discrete or continuous?
Which graph shows how the temperature changed from day to day?
What is the first step of any data project?
A month is grouped as 27 to 29, 29 to 31 and 31 to 35 degrees. What is wrong?
Enroll free in The Weather Project
Every lesson is open to read. Enrolling also lets you:
Mark lessons done and carry on where you stopped.
Take the tests of this lesson and its course.
Count the course towards the certificate for its chapter.