Year 7 · Spreadsheets · Part D: Computers in the world

Data, spreadsheets and AI

In one line

Data is raw facts. Information is data with meaning. Spreadsheets calculate, databases store and search, and AI learns patterns from examples.

1

Tell data from information, and read any cell reference like B3 or range like B2:B6.

2

Write formulas with SUM, AVERAGE, MAX, MIN, COUNT, IF and COUNTIF, in English and Spanish Excel.

3

Use $ to lock a reference, pick the right chart, and work out mean, median, mode and range by hand.

4

Explain tables, records, fields and primary keys, and read an SQL query.

5

Explain how machine learning learns from training data, and why bad data makes a biased model.

FormulaA calculation in a cell. Always starts with =.
Cell referenceColumn letter + row number: B3.
FunctionA ready-made formula with a name: SUM, IF…
Record / fieldOne row / one column of a database table.
Primary keyA field that is different for every record.
SQLThe language for asking a database questions.
Machine learningThe computer finds the rules from examples.

Data and information are not the same thing

Data is raw facts: numbers, words, clicks, readings. On its own it means nothing. Add context and it becomes information. Information is what people can act on.

Data 38 41 37 39 raw facts,no meaning yet + context Information What? A patient's temperature Unit? Degrees Celsius (°C) When? 10:00, 11:00, 12:00, 13:00 Normal is about 37 °C, so 41 °C is dangerous. + thinking Decision Call a doctornow.
The same four numbers. Only the context (what, which unit, when) turns them into something you can act on.
▶

Same data, different meaning

Here is some data. Pick a context and read what the numbers now mean.

  1. Data = facts and figures with no context. 17/03, 4.5, Leo.

  2. Information = data that has been processed and given context, so it has meaning: "Leo's birthday is 17 March."

  3. Context that is stored with the data is called metadata: data about data. A column heading like "Temp (°C)" is metadata.

  4. Computers process data. People need information. Spreadsheets, databases and AI are all tools that turn the first into the second.

!Watch out

03/04/2026 is 3 April in the UK and Spain, but 4 March in the USA. Same data, two meanings. That is why context matters.

Spreadsheets: the grid

A spreadsheet is a big grid of boxes called cells. Columns go down and have letters. Rows go across and have numbers. Every cell has an address made of both.

Column letters are blue. Row numbers are orange. A cell's address is always letter first, then number.
WordMeansExample
CellOne box. Holds a number, some text, or a formula.B3
Cell referenceThe cell's address: column letter, then row number.B3
ColumnA line of cells going down. Named by a letter.C
RowA line of cells going across. Named by a number.5
RangeA block of cells: top-left corner, a colon, bottom-right corner.D2:D5
Formula barShows what is really inside the selected cell.=SUM(D2:D5)
▶

Click a cell, then click another to make a range

First click = one cell. Second click = the other corner of a range.
?Why?

Why count cells as columns × rows? A range is a rectangle. B2:D5 covers columns B, C, D (3 columns) and rows 2, 3, 4, 5 (4 rows). A rectangle 3 wide and 4 tall holds 3 × 4 = 12 cells.

Formulas and functions

A formula is a calculation you type into a cell. It always starts with =. A function is a ready-made formula with a name, like SUM. The best part: when a cell changes, every formula that uses it updates by itself.

Read it as: "calculate (=) the sum of (SUM) cells B2 to B6, then times by 2."

Operators: the maths symbols

SymbolMeansExampleAnswer
+ −add, subtract=10+4-311
*multiply (not ×)=6*742
/divide (not ÷)=20/82.5
^power=2^8256
( )do this part first=(2+3)*420
!Watch out

Spreadsheets follow BIDMAS: brackets, powers, then × and ÷, then + and −. So =2+3*4 is 14, not 20. Use brackets when you mean "do this first".

The functions you need

English Excel / SheetsWhat it doesSpanish Excel
=SUM(B2:B6)Adds up every number in the range=SUMA(B2:B6)
=AVERAGE(B2:B6)The mean: total ÷ how many=PROMEDIO(B2:B6)
=MAX(B2:B6)The biggest number=MAX(B2:B6)
=MIN(B2:B6)The smallest number=MIN(B2:B6)
=COUNT(B2:B6)How many cells hold numbers=CONTAR(B2:B6)
=COUNTA(A2:A6)How many cells are not empty (text too)=CONTARA(A2:A6)
=IF(B2>=25,"Pass","Retry")Checks a condition, gives one of two answers=SI(B2>=25;"Aprobado";"Repetir")
=COUNTIF(B2:B6,">=25")How many cells meet a condition=CONTAR.SI(B2:B6;">=25")
!Spanish settings: semicolons

Spain writes decimals with a comma: 3,5 means three and a half. So a comma can't also separate the parts of a function. Spanish Excel (and Google Sheets set to Spain) uses a semicolon instead: =SI(B2>=25;"Aprobado";"Repetir"). Same idea, different punctuation.

IF: a decision inside a cell

Read B2 B2>=25true? yes show "Pass" no show "Retry" =IF(B2>=25, "Pass", "Retry")
Three parts, in this order: the condition, what to show if it's true, what to show if it's false. It's selection, like if / else in Scratch or Python.
ComparisonMeansComparisonMeans
=equal to<>not equal to
>more than<less than
>=at least (more than or equal)<=at most (less than or equal)

Working out =AVERAGE(B2:B6) by hand

  1. The range B2:B6 means B2, B3, B4, B5, B6: the five scores 45, 22, 38, 25, 12.

  2. Add them: 45 + 22 = 67. 67 + 38 = 105. 105 + 25 = 130. 130 + 12 = 142. That is =SUM(B2:B6).

  3. Count them: 5 numbers. That is =COUNT(B2:B6).

  4. Divide: 142 ÷ 5 = 28.4. That is =AVERAGE(B2:B6), or =PROMEDIO(B2:B6) in Spanish.

  5. =COUNTIF(B2:B6,">=25"): check each one. 45 ✓, 22 ✗, 38 ✓, 25 ✓ (25 counts: "at least"), 12 ✗. Answer: 3.

When it goes wrong: error messages

EnglishSpanish ExcelUsually means
#DIV/0!#¡DIV/0!You divided by zero or by an empty cell.
#NAME?#¿NOMBRE?A misspelt function, e.g. =SUMM(…), or an English name in Spanish Excel.
#VALUE!#¡VALOR!Maths on text, e.g. ="cat"*2.
#REF!#¡REF!The formula points at a cell that was deleted.
##########Nothing is wrong: the column is too narrow. Widen it.

Relative and absolute references ($)

You can write a formula once and fill it down (drag the little square in the cell's corner). The spreadsheet copies it into each row and moves the references as it goes. Usually that's exactly what you want. Sometimes it isn't.

Relative ✓ cost = price × quantity D2: =B2*C2 D3: =B3*C3 D4: =B4*C4 row + 1row + 1 Each row uses its ownprice and quantity. Relative ✗ tax = price × rate in F1 E2: =B2*F1 E3: =B3*F2 E4: =B4*F3 F2 and F3 are empty,so the answer is 0. Absolute ✓ the $ signs lock F1 E2: =B2*$F$1 E3: =B3*$F$1 E4: =B4*$F$1 F1: 0.21
Orange = a part that moved. Green with $ = a part that is locked and never moves.
  1. What the spreadsheet really stores. =B2*C2 in D2 is stored as "the cell 2 to my left times the cell 1 to my left, on my row". That's why it's called relative: relative to where the formula sits.

  2. Fill down one row and "my row" becomes row 3. So the formula now reads =B3*C3. Fill right one column and the letters move instead: =C2*D2.

  3. A $ freezes the part right after it. $F = always column F. $1 = always row 1. $F$1 = always that one cell. This is an absolute reference.

  4. Mixed references lock just one part: F$1 keeps row 1 but lets the column move. Handy for times tables: =$A2*B$1 filled across and down.

▶

Fill down, one row at a time

A shop sheet. F1 holds the Spanish IVA rate, 21% (written 0.21). Pick a formula for row 2, then press Fill down and watch what each row turns into.

★Remember

The $ has nothing to do with money. It is a lock. Quick way to add it: click on the reference in the formula and press F4 (Windows) or Cmd + T (Excel on a Mac). Each press cycles F1 → $F$1 → F$1 → $F1.

Charts: pick the one that fits the question

A chart turns a column of numbers into a picture, so a pattern jumps out. Each kind of chart answers a different kind of question.

ChartUse it forQuestion it answersExample
Bar / columnComparing separate categoriesWhich is biggest?Votes per after-school club
LineChange over timeIs it going up or down?Temperature each hour
PieParts of one whole (adds up to 100%)What share is each part?How you spend 24 hours
ScatterTwo numbers about the same thingIs there a link?Revision hours vs test score
▶

Choose a chart

!Watch out: misleading charts

Untick "start the axis at 0" on a bar chart. The bars now start at a bigger number, so small differences look huge. Adverts and news charts do this. Always read the axis numbers, not just the bar heights.

e.g.Making one

Select the cells (headings too), then Insert → Chart (Spanish: Insertar → Gráfico). Always give it a title and axis labels with units.

Sort, filter and validate

Three tools that keep a big sheet useful. Sort puts rows in order. Filter hides rows you don't want right now. Validation stops bad data getting in at all.

Each row is one person's record. Sort the whole row, never one column on its own.
▶

Sort and filter a class list

Sort:
Filter:
  1. Sort ascending = A → Z, smallest → largest. Descending = the other way. You can sort by two columns: Year first, then Score inside each year.

  2. Filter hides rows that don't match. They are not deleted. Turn the filter off and they come back. Formulas like SUM still count hidden rows.

  3. Data validation (Spanish: Validación de datos) sets a rule for a cell before anyone types: a whole number from 0 to 50, a date, or a choice from a drop-down list.

  4. Conditional formatting changes a cell's colour when a rule is true, e.g. red when a score is under 25. It doesn't change the data, only how it looks.

?Why?

Why validate? "Garbage in, garbage out." One typo like 450 instead of 45 makes the average wrong, and every chart and decision built on it. It's much easier to stop bad data at the door than to find it later.

Mean, median, mode and range

"Average" means "a typical value". There are three kinds, and each can tell a different story. The range tells you how spread out the data is.

Goals scored in 7 matches: 4, 8, 2, 4, 10, 3, 4. Sorted first, because median and range need order.
MeasureHow to find itSpreadsheetSpanish Excel
MeanAdd them all, divide by how many=AVERAGE()=PROMEDIO()
MedianSort them. Take the middle one=MEDIAN()=MEDIANA()
ModeThe value that appears most often=MODE.SNGL()=MODA.UNO()
RangeBiggest minus smallest=MAX()-MIN()=MAX()-MIN()

The mean by hand

  1. The numbers: 4, 8, 2, 4, 10, 3, 4. Count them: n = 7.

  2. Add them a pair at a time: 4 + 8 = 12. 12 + 2 = 14. 14 + 4 = 18. 18 + 10 = 28. 28 + 3 = 31. 31 + 4 = 35. That is Σx.

  3. Divide: 35 ÷ 7 = 5. Check it makes sense: 5 is between the smallest (2) and the biggest (10). ✓

  4. Notice the mean (5) is bigger than the median (4). The one big score, 10, pulls the mean up. The median doesn't care how big the biggest number is.

▶

Find all four, one step at a time

★Remember

Even count? There are two middle numbers. The median is halfway between them: for 2, 4, 6, 8 it is (4 + 6) ÷ 2 = 5. Outliers (one weird value) drag the mean. Use the median for things like house prices or pocket money.

Databases: tables, records, fields and keys

A database is an organised store of data that is easy to search. Your school's register, Spotify's songs and every online shop live in databases. Data sits in tables.

Field = column (blue, like a spreadsheet column). Record = row (orange). Primary key = the field that is different for every record (pink).
  1. Table: data about one kind of thing. One table for students, another for houses.

  2. Field: one piece of information about each thing: FirstName, Year. Every field has a data type: text (string), whole number (integer), decimal (real), True/False (Boolean), date.

  3. Record: everything about one thing. One student = one row.

  4. Primary key: a field whose value is unique for every record and never changes, so the database can find exactly one record. Names make bad keys: two students can both be called Ana.

▶

Which field could be the primary key?

Tap a field name to test it as the key. A key must have no repeats.

Linking tables: relational databases

The house name is stored once, in Houses. Students just store the house's key. A key used to point at another table is a foreign key.
?Why?

Why split into two tables? If 300 students each have "Red house, head: Ms Ruiz" typed out, and the head changes, you must fix 300 rows and you'll miss some. Repeated data is called data redundancy, and it causes inconsistency (two different answers for the same fact). Linked tables store each fact once.

!The law

A table of people is personal data. In the UK: UK GDPR and the Data Protection Act 2018, as amended by the Data (Use and Access) Act 2025. In Spain: the EU GDPR and the LOPDGDD (Ley Orgánica 3/2018). Both say: collect only what you need, keep it accurate and secure, and don't keep it longer than needed.

SQL: asking a database questions

SQL (Structured Query Language, said "S-Q-L" or "sequel") is how you ask a database for exactly the records you want. A question in SQL is called a query.

SELECT FirstName, House      -- which fields (columns) to show
FROM Students                 -- which table
WHERE Year = 8                 -- which records (rows) to keep
ORDER BY FirstName ASC;     -- what order: ASC = A→Z, DESC = Z→A
You write SELECT first, but the database works FROM → WHERE → SELECT → ORDER BY. Thinking in that order makes queries easy to predict.
▶

Run a query step by step


    
You writeMeans
SELECT *every field
WHERE House = 'Red'text goes in quotes; numbers don't
AND / ORAND: both must be true. OR: at least one true
LIKE 'S%'% is a wildcard: "anything". So: starts with S
ORDER BY Year DESCsort by Year, biggest first
★Exams

OCR J277 only asks you to search with SQL: SELECT, FROM, WHERE, with wildcards. AQA 8525 goes further: SELECT, FROM, WHERE, ORDER BY … ASC/DESC, queries across two linked tables, and changing data with INSERT INTO, UPDATE and DELETE.

Big Data, data science and machine learning

Big Data means data sets so big, fast or messy that one spreadsheet can't cope. Think of every search on Google, or every song played on Spotify today. It is the fuel for modern AI.

The "Vs" of Big DataMeansExample
VolumeHuge amountsBillions of rows. Too many for Excel's 1,048,576-row limit.
VelocityArrives very fastThousands of card payments a second
VarietyMany kinds, not neat tablesPhotos, videos, sensor readings, messages
VeracityCan it be trusted?Duplicates, typos, fake accounts

The data science cycle (Year 9: Data Science)

  1. Ask a clear question. "Do students who sleep more score higher?"

  2. Collect data: a survey, a sensor, an existing database.

  3. Clean it: remove duplicates, fix typos, delete impossible values (a 450-hour night's sleep).

  4. Analyse: averages, sorting, filtering, charts.

  5. Conclude, honestly, then ask the next question.

!Correlation is not causation

Ice-cream sales and sunburn go up together. Ice cream doesn't cause sunburn: sunny weather causes both. A link on a scatter graph is a clue, never proof.

Machine learning: the computer finds the rules

Normal programming Rules (by a person) Data Computer Answers Machine learning Data Answers Computer Rules it found = the model
1. Training data photo → "apple"photo → "banana"thousands, labelled 2. Training guess, check the label,adjust, repeat Model 3. Test dataexamples it hasn't seen.How often is it right? 4. Use it new photo ? "apple"92% sure
The model is only as good as its training data. It has no idea about anything it was never shown.
▶

Train a fruit sorter (and break it)

Each dot is one labelled fruit in the training data. The model uses the nearest neighbour rule: a new fruit gets the label of the closest training fruit(s). Drag the ? (or use the sliders).

!Bias: unfair data in, unfair decisions out

Nobody told the sorter to hate green apples. It simply never saw one. Real cases: face-recognition systems trained mostly on lighter-skinned faces made far more mistakes on darker-skinned women (MIT's Gender Shades study, 2018). A hiring tool trained on ten years of mostly male CVs learnt to mark down CVs that said "women's". Amazon scrapped it.

e.g.Chatbots

A chatbot is a machine-learning model trained on huge amounts of text. It predicts a likely next word, again and again. That's why it sounds confident even when it is wrong. Always check facts it gives you. The EU's AI Act (2024) applies in Spain; the UK has no single AI law yet and relies on existing laws like data protection.

Data logging: a temperature logger

A data logger is a sensor plus a small computer that takes readings on its own, at regular times, and saves them. No person needs to be there. The log goes straight into a spreadsheet.

1. TMP36 sensortemperature → volts24.7 °C → 0.747 V 2. ADC on pin A0volts → whole number0.747 V → 153 3. Formula in codenumber → °C153 → 24.7 4. Serial / USBone CSV line a second:12,24.713,24.9 5. Spreadsheetcolumns A and B=AVERAGE(B2:B61)=MAX(B2:B61) 6. Line chart
CSV = comma-separated values: plain text where commas split the columns. Every spreadsheet can open it. (Spanish Excel may expect semicolons here too.)

Reading 153 → °C, by hand

  1. The ADC splits 5 volts into 1024 equal steps (10 bits: 2¹⁰ = 1024). One step = 5 ÷ 1024 ≈ 0.00488 V.

  2. The reading is 153 steps: V = 153 × 5 ÷ 1024 = 765 ÷ 1024 ≈ 0.747 V.

  3. The TMP36 gives 0.5 V at 0 °C. Take that away: 0.747 − 0.5 = 0.247 V above freezing.

  4. It adds 0.01 V per degree. How many 0.01s fit in 0.247? 0.247 × 100 = 24.7 °C. A warm classroom.

  5. Backwards: the LED should come on above 30 °C. V = 0.5 + 30 × 0.01 = 0.8 V. Reading = 0.8 × 1024 ÷ 5 = 163.84, so about 164.

▶

Run the logger

LED
?Why?

Why does 22 °C come back as 22.3 °C? The ADC can only give whole numbers. Each step is about 0.49 °C wide, so the reading is rounded to the nearest step. That's resolution: a 10-bit ADC can't tell 22.0 from 22.3.

Common mix-ups

The mistakes almost everyone makes at first. Read the left side, then the right.

People think

Typing SUM(B2:B6) into a cell adds them up.

Actually

Without the = it's just text. Every formula starts with =.

People think

The formula is broken in Spanish Excel, so the function must be wrong.

Actually

Spanish Excel uses Spanish names (SUMA, SI) and semicolons between parts, because the comma is the decimal point.

People think

The $ in $F$1 means money.

Actually

It's a lock. It stops that part moving when you fill or copy.

People think

A cell reference is number then letter: 3B.

Actually

Always letter (column) first, then number (row): B3.

People think

The mean is always the best average.

Actually

One outlier drags the mean. The median is often fairer.

People think

A filter deletes the rows it hides.

Actually

Filtered rows are only hidden. Clear the filter and they're back.

People think

A name is a good primary key.

Actually

Names repeat. A key must be unique, so schools use an ID number.

People think

AI is neutral, because computers have no opinions.

Actually

A model copies the patterns in its training data, unfairness included.

People think

If two things rise together, one causes the other.

Actually

Correlation is not causation. A third thing may cause both.

Check yourself

Quick questions first. Then endless practice: a wrong answer shows you the working, step by step.

[ {"q":"Every spreadsheet formula starts with…","o":["=","$","#"],"a":0,"w":"The = tells the spreadsheet: calculate this, don't just show it."}, {"q":"=B2*C2 in D2 is filled down to D5. What is in D5?","o":["=B2*C2","=B5*C5","=E2*F2"],"a":1,"w":"Relative references move with the formula: 3 rows down, so 2 becomes 5."}, {"q":"In Spanish Excel, =IF(B2>=25,\"Pass\",\"Retry\") becomes…","o":["=SI(B2>=25;\"Aprobado\";\"Repetir\")","=IF(B2>=25;\"Pass\";\"Retry\")","=SI(B2>=25,\"Aprobado\",\"Repetir\")"],"a":0,"w":"Spanish name **SI**, and **semicolons**, because the comma is the decimal point."}, {"q":"The numbers 3, 9, 4, 4, 10. What is the median?","o":["4","6","9"],"a":0,"w":"Sort: 3, 4, 4, 9, 10. The middle (3rd) value is 4."}, {"q":"Which field makes a good primary key?","o":["FirstName","StudentID","House"],"a":1,"w":"It is unique for every student and doesn't change."}, {"q":"To show change over time, use a…","o":["Pie chart","Line chart","Scatter graph"],"a":1,"w":"A line joins the points in time order, so you see the trend."}, {"q":"SELECT FirstName FROM Students WHERE Year = 8; returns…","o":["Every field of every student","Only the first names of Year 8 students","The number of Year 8 students"],"a":1,"w":"WHERE keeps the Year 8 records. SELECT keeps only the FirstName field."}, {"q":"A face-recognition model works badly on faces unlike its training photos. This is…","o":["Overflow","Bias from unrepresentative training data","A syntax error"],"a":1,"w":"The model only learns what it is shown. Missing groups in the data means worse results for those groups."} ]