Five stars or "it was fine"?
After the school trip, the teacher asks you two questions.
Question 1: give the trip a score from 1 to 5. Question 2: tell us what you thought, in your own words.
The first answer is a number. The second is a sentence. A computer treats them very differently. Why?
Key words
| Word | What it means | Example |
|---|---|---|
| Quantitative data | Data that is a number you count or measure. | 5 stars, 12 students, 1.6 metres |
| Qualitative data | Data that describes, in words, pictures or sounds. | "The trip was fun." |
| Structured data | Data in a fixed shape of rows and columns. | A table of students |
| Unstructured data | Data with no fixed shape. | An email, a photo, a voice message |
| Field | One column in a table, for one kind of fact. | The stars column |
| Record | One row in a table, about one thing. | All the facts about Aisha |
| Category | A group that things belong to. | Number or words |
The cells students fill in are left blank in this preview.
Number or words?
Have a go
Loading…
Your answers are marked here and are not kept. A college account keeps every student’s marks.
Quantitative: you can count it
Quantitative data is a number. You count it or measure it. How many? How much? How long?
Age, price, score, number of goals. Because it is a number, you can add it up and put it in order. You can also find the average (add all the numbers, then divide by how many there are). A computer is very good at this.
Qualitative: you describe it
Qualitative data describes something. It tells you what it is like and why.
A comment, an opinion, a photo, a video. It has a lot of meaning, but you cannot add two comments together. A computer finds this much harder.
Try it: add and compare
stars = [5, 2, 4, 3, 5, 1]
comments = ["The museum was very good", "We waited for the coach", "Good day"]
# max finds the biggest number. min finds the smallest.
print("Biggest score:", max(stars))
print("Smallest score:", min(stars))
print("Joined comments:", comments[0] + comments[1])
# Numbers give you a useful answer.
# Joined comments are just two sentences stuck together.
Make a free account to save your work and track your progress.
Quantitative and qualitative side by side
| Quantitative | Qualitative | |
|---|---|---|
| What it is | A number | A description |
| Question it answers | How many? How much? | What is it like? Why? |
| Example | Score of 4 out of 5 | "The guide was funny." |
| Can you add it up? | Yes | No |
| Used to | Measure, compare and calculate | Understand opinions and reasons |
| Shape in a computer | Structured | Unstructured |
The cells students fill in are left blank in this preview.
Quick check: which kind?
Have a go
Quick check: which kind?
4 questionsStructured: a fixed shape
Structured data sits in rows and columns. Every record (row) has the same fields (columns).
A computer knows where to look. "Find all students with 4 stars or more" is easy and fast. On this course, quantitative data is structured.
Unstructured: no fixed shape
Unstructured data has no fixed shape. A comment can be 3 words or 300. A photo has no columns.
A computer can store it, but it cannot easily search the meaning. It keeps a lot of detail, such as feelings. On this course, qualitative data is unstructured.
How to decide
Try it: a structured question
feedback = [
["Aisha", 5, "The museum was very good and the guide was funny."],
["Ben", 2, "We waited a long time for the coach."],
["Chen", 4, "Good day. Lunch was too small."],
["Dana", 3, "The coach was late but the castle was great."],
["Fatima", 1, "Cold and wet. I did not enjoy it."],
]
# The stars are structured: easy to question. Who gave 4 or more?
for row in feedback:
if row[1] >= 4:
print(row[0], row[1])
# Now: who enjoyed the trip? You must read every comment.
# A computer cannot easily find that meaning in the words.
for row in feedback:
print(row[0], row[2])
# Search the words for "late". It finds the letters, not the meaning:
# Ben waited a long time, but his comment does not say "late".
for row in feedback:
if "late" in row[2]:
print("Says late:", row[0])
Make a free account to save your work and track your progress.
Your turn: find the unhappy students
Each row of trip feedback is a student, a number of stars from 1 to 5, and a comment. Fill in two functions. The first lists the students who gave 2 stars or fewer. The second finds the lowest score. Both only use the stars: the structured part. Press Run Tests to check.
def unhappy(feedback):
# feedback is a list of rows: [student, stars, comment].
# Give back a list of the students who gave 2 stars or fewer, in the same order.
return None
def lowest_score(feedback):
# Give back the smallest number of stars anybody gave.
# The list is never empty.
return None
Make a free account to save your work, or press Start lab to work through the whole lesson.
Drag: structured or unstructured?
Have a go
Loading…
Your answers are marked here and are not kept. A college account keeps every student’s marks.
Key words crossword
Have a go
Loading…
Your answers are marked here and are not kept. A college account keeps every student’s marks.
Watch: numbers or words
Press Play on the short film below. It starts with the two questions after the trip, then shows numbers, words, a table and a search, then one myth.
Film: numbers or words
Numbers or words: kinds of data
Every scene, as text
- Five stars or "it was fine"? Question 1: give the trip a score from 1 to 5 (question 1: answered with a number). Question 2: tell us what you thought, in your own words (question 2: answered with a sentence). A computer treats them very differently.
- Quantitative: you can count it. stars = [5, 2, 4, 3, 5, 1] (quantitative: a number you count or measure). It prints Biggest score: 5 (max: finds the biggest number) and Smallest score: 1 (min: finds the smallest). You can add it up and put it in order.
- Qualitative: you describe it. "The museum was very good" (qualitative: words, pictures or sounds). "We waited for the coach". It prints Joined comments: The museum was very goodWe waited for the coach (joined: just two sentences stuck together).
- Structured: a fixed shape. Name, Stars (fields: the columns). Aisha, 5, ringed (record: all the facts about Aisha). Ben, 2. Chen, 4. Find all students with 4 stars or more, with an arrow to what it prints, Aisha 5 and Chen 4 (found: the computer knew where to look).
- Unstructured: no fixed shape. Ben: We waited a long time for the coach. (missed: his comment does not say "late"). Dana: The coach was late but the castle was great. Search the words for "late", with an arrow to what it prints, Says late: Dana (found: by the letters, not the meaning).
- Myth (false): a number is always quantitative. A phone number. That is not true: a phone number is a label, not a measure. 1.6 metres (1.6 metres: a measure, so quantitative). Is it a number you can count or measure?
Final check
Have a go
Final check
5 questionsRemember
Important
Quantitative is a number and is structured. Qualitative describes and is unstructured. Computers search and add up structured data fast.