L8 Cycle 1 Checkpoint

DATA SCIENCE · CYCLE 1 · L8 · TEXTBOOK CHAPTER

Cycle 1 Checkpoint

Day 20 of your 31-day collection is the place to stop and check. By now you can ask a measurable question, read and choose a chart, and find what is wrong in a messy sheet. This chapter gathers those ideas, then turns to your own rows.

After this chapter, you can

Why It Matters

In week one the class asked a real question: did the University of Virginia (UVA) get harder to get into? The answer took every stage of the data cycle.

UVA received 40,839 applications for fall 2019 and 56,528 for fall 2023. That is a 38% increase. Its admit rate went from 23.9% to 16.9%, a drop of 7.0 points.

So it looks harder. But UVA admitted 9,778 students in 2019 and 9,533 in 2023, only 245 fewer. The rate fell because many more people applied.

StageIn the UVA investigation
Question/Problem FormulationDid UVA get harder to get into?
Data Acquisition and CollectionIPEDS: three free federal files
Data Processing1,813 colleges joined on their ID
Data Visualization and RepresentationFour bars on one scale
Data Modeling and AnalysisFive schools and a counterexample
Data CommunicationWhat the file supports, and what it does not

Your project takes the same six stages, on your own data. This chapter checks that you can do each one.

The Idea

Eight parts. Parts 1 to 6 are what you should know from L1 to L7. Parts 7 and 8 are new: your own sheet on day 20, and a test of two groups.

1. Three Kinds of Question

Sorting a question

A question is measurable (M) when somebody could start collecting it tomorrow without asking you anything. It is pin one word (P) when it would be measurable once one word is pinned down. It is vague (V) when it asks for a judgment that has no unit: bad, better and stressed have no unit, so there is no single word to fix.

QuestionSortWhy
How many minutes does my bus take from Yorktown to my stop each afternoon?Mthing, unit, who and when all present
How many minutes do I spend on homework on a busy night?Ppin busy: it decides which nights count
Is my phone bad for me?Vno unit for bad; the fix replaces the question
Are Yorktown seniors stressed?Va who is not enough: what goes in the notebook?

If fixing one word makes it measurable, it is P. If the fix replaces the question, it is V. Important and measurable are different things.

2. The Four Words

Repairing a question

A measurable question answers four things. The thing: what gets written down, and in what units. The who: who or what each row is about. The when: how often, and over what stretch of time. The shape: what the finished answer looks like: one number, a comparison between groups, or a trend.

WordVague: Does the weather affect my mood?
The thing4 p.m. high in °F from one weather source; my mood, 1 to 5, at 9 p.m.
The whome, one row per day
The whenevery school day, 9 September to 9 October
The shapea comparison of my median mood on warm days against cool days

That repair names all four, and it gives 21 school days in the window. Every row is something a stranger could do without asking you a question.

The notebook test: if two students would write different things in the same column, the thing is not pinned down. “I will track the weather and my mood every day” names two of the four. It has no unit for mood and no shape.

3. The Six Stages

The data cycle

Every project goes round six stages. It goes back when a later stage shows an earlier one was wrong. The names are exact.

StageWhat it does
1Question/Problem FormulationName the driving question.
2Data Acquisition and CollectionGet the data and write down how.
3Data ProcessingChange the data so it is usable, by rules you write down.
4Data Visualization and RepresentationTurn the data into charts and tables.
5Data Modeling and AnalysisCompute and test what the data says.
6Data CommunicationTell an audience what the data shows and what it does not.

Typing tonight’s value into RAW is Data Acquisition and Collection. Any change after that, made on CLEAN with a CLEANING LOG row, is Data Processing. Making the chart is Data Visualization and Representation. Deciding what sentence goes next to it is Data Communication.

4. Percent Change and Points

Percent change

Percent change is change divided by the starting value, times 100. New minus old first. Then divide by old.

percent change = new − oldold × 100

A negative answer means it fell. Give it with its sign or with the word: −30% and 30% decrease say the same thing.

A percentage point, a point for short, is the gap between two percentages. Percent change works on any number, rates included.

UVA received 40,839 applications in 2019 and 56,528 in 2023. The change is 15,689. Divided by the start, 40,839, that is 0.384, a 38% increase.

UVA’s admit rate went from 23.9% to 16.9%, a drop of 7.0 points. “7 percent” would be a different claim: 7.0 ÷ 23.9 is a 29% fall in the rate.

Bar chart of applications received at five Virginia colleges, a gray bar for 2019 and a blue bar for 2023, each labeled with its value. UVA 40,839 and 56,528. Virginia Tech 31,974 and 47,208. JMU 23,579 and 35,750. George Mason 19,554 and 22,579. William and Mary 14,680 and 17,548.
Applications at five Virginia colleges, 2019 and 2023. Source: US Department of Education, IPEDS ADM2019 and ADM2023. Example 1 and question 3 read this chart.

5. Job First, Picture Second

Choosing a chart by its job

Every chart has a job. A line chart does Data Over Time: it shows the rise and fall between points in sequence. A bar chart does Comparisons between groups. A pie chart does Proportions, parts of one whole.

A defense names the job and ties it to the claim. “A line chart, because the claim is about how traffic changed year to year and the line shows the 2020 drop” is a defense. “Because it is easy to read” is a description. Every chart is easy to read when it fits.

Two charts of the same 11 numbers, daily traffic on Yorktown Blvd from 2015 to 2025. On the left, a line chart: 6,600 vehicles per day in 2015, a sharp drop to 5,400 in 2020, and 5,400 in 2025. On the right, a pie chart with 11 slices of nearly the same size, one for each year.
Yorktown Blvd, one VDOT counter, 2015 to 2025, as a line and as a pie. Source: VDOT annual average daily traffic. The pie’s 11 slices are each between 7% and 11% of the whole, and it cannot show that 2020 was the drop.

You want to show how the traffic on Yorktown Blvd changed from 2015 to 2025. Name the job before you picture a chart. The 11 years are in order, so the job is Data Over Time, and the chart is a line chart. The line shows 6,600 vehicles a day in 2015, the drop to 5,400 in 2020, and 5,400 again in 2025.

The pie holds the same 11 numbers and cannot make the claim. Its 2020 slice is 8% of the whole and its 2015 slice is 10%. No reader sees a drop in that. A Column chart of the 11 years comes second: the reader has to compare bar heights to find the drop the line shows right away.

6. Valid, Complete, Unique

The messy sheet

A column is valid when every value is formatted and stored the same way, in one consistent structure, and inside a sensible range. A column is complete when no required value is missing. Rows are unique when nothing is entered twice and there are no extra entries.

These three words name every defect. Negative minutes practiced: valid. A blank: complete. The same day typed twice: unique. A letter o where a zero belongs: valid, because Sheets reads “4o” as text and drops it from every AVERAGE.

7. Your Own Sheet on Day 20

The self-check

Collection runs from Wednesday 9 September to Friday 9 October, 31 days. Monday 28 September is day 20. A sheet on plan has a row for every collection day since 9 September or a written reason for every gap. It has a RAW tab and a CLEAN tab, and a cleaning log with at least one line in it.

Count your rows. Then project to 9 October at your normal weekly pace. If that number is under 15, the project needs a change today, while there is still time to make one.

Your planRows on 28 SepRows on 9 Oct
Once per calendar day1930
Once per weekday1322
Once per school day1220
Twice per school day2440
Three times a day (meals)5790
Once every Sunday34

The table counts rows at the morning bell, for a student who logs at night. 28 September counts through Sunday 27 September. 9 October counts through Thursday 8 October. There is no school on Monday 21 September and Wednesday 7 October. Four rows are too few to tell a story.

If the sheet is behind, one of four moves fits. To backfill is to enter an existing record by hand and log it.

MoveWhen it fits, and what you do
KeepA row or a reason for every day, finishing at 15 rows or more. Keep going.
NarrowThe question was too big but the rows are real. Cut it down to what the column you actually filled measures.
SwitchThe measure takes effort at a bad moment. Replace it with a count, a yes or no, or a 1 to 5 rating taken once a day at a fixed time.
BackfillA record already exists: a watch app, a calendar, a practice log. Enter it by hand and log that it was backfilled.

8. Compare Two Groups

A hypothesis, and a number to settle it

A hypothesis is a guess about your own data that a number can settle, written before you look. Four moves, in this order:

MoveWhat it is
1HypothesisI think my thing, unit is higher on group than on group.
2Helper columnA formula column on CLEAN. Every row gets a group.
3Pivot tableOne row per group: each group’s AVERAGE and COUNTA.
4VerdictOne sentence with both averages and both counts.
Three verdictsWhen
Supportedyour group is higher; every group has 4 or more rows
Not supportedyour group is not higher; every group has 4 or more rows
Not enough dataa group has fewer than 4 rows

A group is the rows that share one value, such as every row that says Weekend. The hypothesis is written first, so the data can prove it wrong.

Worked Examples

Example 1 · Percent change, with the wrong answer named. Use the applications chart in part 4. (a) How many applications did Virginia Tech receive in 2019? (b) What is the percent change in Virginia Tech’s applications from 2019 to 2023? (c) Virginia Tech’s admit rate went from 70.0% to 57.0%. Say the change.

Create a strategy

Read both values off the chart with their year. Subtract new minus old, divide by the old value, multiply by 100. For two percentages, subtract and answer in points.

Apply the idea

(a) The gray bar for Virginia Tech is labeled 31,974.

(b) 2023 is 47,208. Change: 47,208 − 31,974 = 15,234. Divide by the start: 15,234 ÷ 31,974 = 0.476. Applications rose 48%.

(c) 57.0 − 70.0 = −13.0. The admit rate fell 13.0 points.

Reflect and check

The wrong answer to expect is 15,234 ÷ 47,208 = 0.323, or 32%. That divides by the end value. It is called the wrong base. You started at 31,974, so you divide by 31,974. “15,234 more” is the change before dividing. Divide it by the start to make it a percent.

Example 2 · A messy-sheet audit. Audit this made-up water log. Find four problems. For each, give the row and label it valid, complete or unique.

RowDateCups of waterNotes
29/156
3Sept 165
49/1760
59/1760
69/18
79/227
Create a strategy

Go column by column, then row by row. Ask three questions of every cell. Is it formatted like its neighbors and inside a sensible range (valid)? Is it there (complete)? Has it been entered before (unique)?

Apply the idea
RowThe problemThe word
3“Sept 16” while every other date reads 9/15 style. Sheets sorts the two formats differently.valid
460 cups in one day is outside any sensible range. Most likely it is 6.0 with the point missed.valid
5It repeats row 4 exactly, date and value.unique
69/18 is blank with no note.complete
Reflect and check

Row 7 jumps from 9/18 to 9/22. Under a once-per-school-day plan, that weekend and the Monday with no school are a planned gap. Under a once-per-calendar-day plan, 9/19, 9/20 and 9/21 are three more complete problems. A missed day keeps its row: a blank cell, and “missed” in Notes.

Example 3 · Compare two groups. Ana logs her time outside, in minutes, from 9 to 20 September. She wrote her hypothesis first: “I think my time outside, in minutes, is higher on weekend days than on weekdays.” Is it supported?

Create a strategy

Four moves, in order. The hypothesis is written: it names the thing with its unit, and two groups. Next, two helper columns on CLEAN give every row a group. Then a pivot table gives each group’s AVERAGE and COUNTA. Last, the verdict.

Apply the idea

Column D shows the weekday of each date. Column E turns it into a group. Column C, Notes, is left off here.

RowDateTime outside (min)DayDay type
29/9/202620WedWeekday
39/10/202635ThuWeekday
49/11/202615FriWeekday
59/12/202660SatWeekend
69/13/202645SunWeekend
79/14/202630MonWeekday
89/15/202625TueWeekday
99/16/202640WedWeekday
109/17/202610ThuWeekday
119/18/202625FriWeekday
129/19/202690SatWeekend
139/20/202665SunWeekend

The pivot table, with Day type in Rows:

Day typeAVERAGE of Time outside (min)COUNTA of Time outside (min)
Weekday258
Weekend654
Grand Total38.3333333312

The verdict: “Supported: weekend days averaged 65 minutes over 4 days, weekdays 25 over 8, and both groups have 4 or more.”

Reflect and check

The count shows how many rows each average stands on. With 3 weekend days the verdict would be not enough data, no matter what the averages said. Check the Grand Total by hand: 8 × 25 + 4 × 65 = 460, and 460 ÷ 12 = 38.3. It is the mean of all 12 days, so it sits between the two groups.

In Sheets: Helper Columns and a Pivot Table

The same steps as in class, on Ana’s log. The dates are in column A and the minutes in column B.

  1. Click the CLEAN tab. Nothing on RAW is ever changed.
  2. Click cell D1. Type: Day
  3. Click cell E1. Type: Day type
  4. Click cell D2. Type: =TEXT(A2,"ddd")
  5. Double-click the small blue square at the bottom right of D2 to fill down.
  6. Click cell E2. Type: =IF(OR(D2="Sat",D2="Sun"),"Weekend","Weekday")
  7. Fill E2 down the same way.
  8. Add one row to the CLEANING LOG for the new columns. Why: to compare groups in a pivot table.
  9. Click any cell in the data.
  10. Insert > Pivot table.
  11. Leave New sheet picked. Click Create.
  12. Rows > Add > Day type.
  13. Values > Add > Time outside (min). Set Summarize by to AVERAGE.
  14. Values > Add > Time outside (min) again. Set Summarize by to COUNTA.

D2 shows Wed, so E2 shows Weekday. D5 shows Sat, so E5 shows Weekend. For sleep, the groups are nights: a Sunday night comes before a school day, so the weekend nights are "Fri" and "Sat".

When your log has more rows, edit the pivot table’s range to your last row.

The Same in Python

Python comes in L19b, in Cycle 2. Once you have read it, come back and run Ana’s four weekend days here.

In Sheets this is: the pivot table’s AVERAGE and COUNTA in the Weekend row.

In English:

  1. Get the pandas toolbox and call it pd.
  2. Make a column of the four numbers, and call it weekend.
  3. Print the mean of weekend.
  4. Print how many values weekend holds.

Predict: Example 3’s pivot table shows both. What will lines 3 and 4 print? Then add a fifth weekend day of 15 minutes to the list, say which way the mean will move, and run it again.

Can’t run it here? Show what it prints
65.0 4

pandas writes a whole mean as a decimal: 65.0 is the 65 from Example 3. With 15 added to the list it prints 55.0 and 5.

In your project

Your Cycle 1 project is your own data, collected for about a month in one Google Sheet with RAW, CLEAN, CLEANING LOG and ABOUT tabs. Its charts and a one-page Google Doc tell the story.

On day 20, count your rows of data, header row not counted. Then project to 9 October. If that number is under 15, change the project today: narrow, switch or backfill.

Then test one hypothesis on your CLEAN tab. Pick two groups your question cares about, write the hypothesis first, and build the pivot table. Your Doc says what you expected and what you found: the hypothesis, then the verdict with both averages and both counts. A 1 to 5 rating takes MEDIAN, never AVERAGE.

Check Yourself

Answer each one before you look. The tag says which lesson each question is from. The last one is from this chapter.

Sort this question: “How many songs do I skip on a long bus ride?” L1

You decide which sentence goes next to your chart. Which stage is that, and why? L1

Use the applications chart in part 4 of The Idea. What is the percent change in George Mason’s applications from 2019 to 2023? Round to the nearest whole percent. L2

William & Mary’s admit rate went from 37.7% to 32.7%. Which sentence says the change? L2

You want to show the share of your 31 collection days that were sunny, cloudy and rainy. Which chart, with which defense? L3

A student writes: “I will count my cups of water every day from 9 September to 9 October.” Which of the four words is missing? L4

This chart was made from real numbers: the students admitted in 2023 at the same five colleges. How many of the six checks on the Chart Label Checklist does it pass? L5

A bar chart with no title and no axis titles. Four dark blue bars and one orange bar stand on an axis marked from 0 to 25000. Heavy dark gridlines cross the bars. The legend reads Series 1 to Series 5.
A bad chart, made on purpose. Source of the numbers: US Department of Education, IPEDS ADM2023.

A column of screen time, in minutes, reads 95, 120, 110, 1.5, 2 and 105. The 1.5 and the 2 were typed in hours. Which word does the column break? L6

Your log shows you read 12 more pages a day on weekend days than on school days, 9 September to 9 October. Which sentence does the log support? L7

Hypothesis: “I think my bus ride, in minutes, is higher on rainy days than on dry days.” The pivot table says Rainy averages 31 over 3 rows, and Dry averages 24 over 16 rows. What is the verdict?

Read More

OpenStax, Prealgebra 2e, section 6.2: Solve General Applications of Percent. A free textbook. Read the part called Find Percent Increase and Percent Decrease. Its Example 6.23 raises a college fee from $26 to $36 a unit. The increase is $10, and 10 ÷ 26 is a 38.5% increase. It divides by the original amount, which is this chapter’s change over start.

Stuck on any of this? Ask Mr. Case in class or send him a message in Canvas. Name the part, the example or the question number, and say which step lost you.