Sorting things¶
Statistics and data · level 1, lesson 1 of 5
A question to start¶
A jar of buttons falls off the shelf. Buttons everywhere! Here they are.
Your job is to tidy them into groups. How would you do it?
Some children put all the orange ones together, all the blue ones together and all the green ones together. Some children put the big ones in one group and the small ones in another. One child looks very closely and says, "Some have two holes and some have four holes!"
Who is right? Here is the surprise: all of them. The same ten buttons can be sorted in many different ways. And each way tells you something different about the buttons.
Sorting is where statistics begins. Statistics is the part of math that helps us learn from lots of facts, like "which colour of button do we have most of?" Before you can answer a question like that, you have to sort.
The idea¶
What sorting means¶
To sort means to put things into groups, so that the things in each group are alike in some way.
The way they are alike is called the rule. "Put the same colours together" is a rule. "Put the big ones here and the small ones there" is another rule.
When you sort, you choose one thing to look at and you pay no attention to everything else. If your rule is colour, then size does not matter. A big orange button and a small orange button go in the same group, because they are both orange.
Sorting by colour¶
Here are the ten buttons sorted by the rule "same colour together".
Count each group, touching each button once:
- Orange: 5 buttons.
- Blue: 3 buttons.
- Green: 2 buttons.
Some orange buttons are big and some are small. Some have two holes and some have four. That is fine. Our rule only looks at colour.
The same buttons, sorted another way¶
Now tip all the buttons back into a pile, and sort them again with a new rule: "big ones here, small ones there".
- Big: 4 buttons.
- Small: 6 buttons.
Look how different the groups are now! In the colour sort, the big green button sat with the small green button. Now the big green button sits with the big orange buttons and the big blue button, and the small green button has moved to the small group.
Nothing about the buttons changed. Only the rule changed. A new rule gives new groups.
And here is a third way, by counting the holes.
- 2 holes: 5 buttons.
- 4 holes: 5 buttons.
Three rules, three different sortings, and every one of them is correct.
Two jobs for a good rule¶
A rule for sorting has two jobs to do.
- Every button must go in a group. None left over on the table.
- Every button must go in only one group. No button can be in two groups at once.
Here is a check you can do every time. Count each group, and add the counts together. You should get back the number you started with.
- Colour: 5 and 3 make 8, and 2 more make 10.
- Size: 4 and 6 make 10.
- Holes: 5 and 5 make 10.
There were 10 buttons in the pile. Every sorting gives back 10, so no button was lost and no button was counted twice. This is a check that people who work with data use all the time, even with millions of things.
Sorting two ways at once¶
Can we look at colour and size at the same time? Yes! Draw a grid of boxes. Put the colours across the top and the sizes down the side. Now each box has a double rule, like "orange and big".
Every button has exactly one colour and exactly one size, so every button fits in exactly one box. Now we can see things that the other sortings hid. For example:
- There are 2 big orange buttons and 3 small orange buttons.
- There is only 1 big blue button.
- Every colour has at least one big button and at least one small button.
A grid like this is a very powerful idea. When you are older you will call it a table, and grown-up scientists use tables to sort many things at once.
Yes or no sorting¶
The easiest rule of all asks a yes or no question. "Is it blue?" Every button is either blue (yes) or not blue (no). So there are just two groups:
- Yes, blue: 3 buttons.
- No, not blue: 7 buttons.
3 and 7 make 10. Every button is in exactly one group, so this rule always does both of its jobs. Yes-or-no rules are always safe.
Why we sort¶
Sorting turns a jumble into something you can understand. Look back at the messy pile at the top of the page. Could you tell, just by looking, whether there were more orange buttons or more blue ones? It was hard. After sorting, it is easy: 5 orange, 3 blue.
Scientists sort things all the time. People who study rocks sort them by colour, by size, and by how they were made. When a rover on Mars takes photos of rocks, scientists on Earth sort those rocks too, to learn how each one formed. Sorting is the first step to understanding.
Worked examples¶
Example 1. Sorting toys. Mia has these toys: a ball, a toy car, a teddy bear, a toy truck, a doll, a toy bus. Sort them with the rule "has wheels" or "has no wheels".
- Look at each toy, one at a time, and ask: does it have wheels?
- Ball: no. Car: yes. Teddy bear: no. Truck: yes. Doll: no. Bus: yes.
- Has wheels: car, truck, bus. That is 3 toys.
- No wheels: ball, teddy bear, doll. That is 3 toys.
- Check: 3 and 3 make 6. Mia has 6 toys. None lost.
Example 2. A rule that does not work. Ben sorts the buttons into two groups: "orange buttons" and "big buttons". What goes wrong?
- Pick up the big orange button. Is it orange? Yes. Is it big? Yes.
- So it belongs in both groups! Where should Ben put it? He cannot put it in two places.
- Now pick up a small blue button. Is it orange? No. Is it big? No.
- So it belongs in neither group! It is left over on the table.
Ben's rule breaks both jobs. The fix is to choose one thing to look at. Sort by colour (orange, blue, green), or sort by size (big, small), but not a mix of the two. Or use the grid, which looks at both things in a careful way.
Example 3. Find the rule. Someone sorted the buttons into group A and group B. What rule did they use?
- Is it colour? Group A has orange, blue and green buttons. Group B does too. So colour is not the rule.
- Is it size? Group A has big ones and small ones. So does group B. Size is not the rule.
- Look more closely. Every button in group A has 2 holes. Every button in group B has 4 holes.
- The rule is number of holes.
To find a rule, look for the thing that is the same inside each group and different between the groups.
Try it¶
- Sort these animals with the rule "can fly" or "cannot fly": a bird, a dog, a bee, a fish, a butterfly, a cat.
- In the colour sort of the buttons, which colour had the most buttons? Which had the fewest?
- Sort these by shape: a coin, a book, a plate, a door, a clock, a window. Use the rule "round" or "has corners".
- Max sorted his socks into "striped" and "red". Why is that a bad rule? Think about a red striped sock.
- A box of crayons has 4 red, 2 yellow and 3 blue crayons. You sort them by colour. How many groups do you get? How many crayons are there altogether?
- Look at the sorting grid of buttons. How many small buttons are blue? How many big buttons are there altogether?
- Sort the numbers 1, 2, 3, 4, 5, 6, 7, 8 with the yes-or-no rule "Can I share it into two equal piles?"
- Think of three different ways to sort the children in your class or family. (Be kind: choose rules nobody minds.)
Answers
- Can fly: bird, bee, butterfly (3). Cannot fly: dog, fish, cat (3). 3 and 3 make 6 animals.
- Orange had the most (5). Green had the fewest (2).
- Round: coin, plate, clock. Has corners: book, door, window.
- A red striped sock fits in both groups, so Max does not know where to put it. And a plain blue sock fits in neither group. A better rule looks at one thing: "striped or not striped", or "sort by colour".
- 3 groups: red, yellow, blue. Altogether 4 and 2 make 6, and 3 more make 9 crayons.
- Small and blue: 2 buttons. Big buttons: 2 orange, 1 blue, 1 green, so 2 and 1 and 1 make 4. (That matches the size sort: 4 big.)
- Yes: 2, 4, 6, 8 (2 is 1 and 1, 4 is 2 and 2, 6 is 3 and 3, 8 is 4 and 4). No: 1, 3, 5, 7 (there is always one left over). Grown-ups call these even and odd numbers.
- Many answers work. For example: "wearing sneakers or not", "has a pet or not", "born in spring, summer, fall or winter". Check each rule: does every person fit in exactly one group?
Common mistake¶
Mixing two rules at once. "Red ones here, big ones there" does not work, because a big red thing belongs in both groups and a small blue thing belongs in neither. Choose one thing to look at. If you really want to look at two things, use a grid with a box for each pair, like "red and big".
Thinking there is only one right way to sort. There are many right ways. A sorting is right when every thing goes in exactly one group. Different rules answer different questions.
Where it leads¶
- Next lesson: Counting what we sorted: how many in each group, and which group has the most.
- This level: Level 1: Sorting and counting. The whole topic: Statistics.
- Sorting shapes by their sides and corners: Sorting and matching shapes.
- Counting each button once, touching each one: Counting things.
- Finding the rule behind a group is like finding the rule of a pattern: Patterns.
- The yes-or-no rule "can it be shared into two equal piles" grows into the study of even and odd numbers: Number theory.