B2 · How Artificial Intelligence Works: Data and Learning

Collecting and Organising Data

Collecting data means gathering facts through methods such as surveys, sensors and observation. Organising data means arranging it so that patterns are easy to see, using tools such as tally marks, tables, pictographs and bar graphs.

10 min Beginner Jump to the activity

What you need: Nothing. This page starts from the beginning, with no programming and no formulas.

Definition

How many people in your group like each sport? How would you find out quickly?

Collecting data means gathering facts through methods such as surveys, sensors and observation. Organising data means arranging it so that patterns are easy to see, using tools such as tally marks, tables, pictographs and bar graphs.

In simple words

A long list of answers is hard to read. Count them with tally marks, write the totals in a table, then draw a bar for each total. Now one look tells you the favourite. AI systems also need data that is collected carefully and organised well before they can learn from it.

Why it matters

Organising data is often most of the work in an AI project. Teams spend more time collecting, cleaning and arranging data than building the model, because a model can only be as good as the data it learns from.

Key terms

Survey
A set of questions asked to many people in order to collect data.
Sensor
A device that measures something in the world, such as temperature, light or movement.
Observation
Collecting data by watching and recording what happens.
Tally marks
Strokes grouped in fives, used to count quickly by hand.
Frequency table
A table showing how many times each answer occurred.
Pictograph
A chart that uses small pictures to show amounts.

Explained in detail

Where data comes from

Data does not appear by itself. Someone decides to collect it and chooses a method. Surveys ask people directly, as when a school asks families how their children travel each morning. Sensors measure the world automatically: a weather station records temperature and rainfall, and a fitness band counts steps. Observation means watching and recording, as a traffic officer does when counting vehicles at a junction. A fourth source, now the largest, is the record that digital systems keep as they work: every payment, search and click leaves an entry in a log.

Collecting fairly

How data is collected shapes what it can tell you. Suppose you want to know the favourite sport of your whole school and you ask only the cricket team. Your data will say cricket, and it will be wrong. The people you ask must represent everyone you want to learn about. The wording of a question matters too. "Don't you agree that cricket is the best sport?" pushes people towards one answer; "Which sport do you like most?" does not.

Collecting data about people also brings responsibility. People should know what is being collected and why, and should agree to it. Collect only what the question needs, and keep it safe.

From a pile of answers to a clear picture

Raw answers are hard to read. Thirty slips of paper saying "cricket", "football", "cricket", "kabaddi" and so on tell you little at a glance. Organising them takes four steps.

  1. Tally: make one stroke for each answer, crossing every fifth stroke through the four before it. Groups of five are fast to count.
  2. Frequency table: write each choice with its total. Cricket 14, football 9, kabaddi 7.
  3. Chart: draw a pictograph with one small picture for every two students, or a bar graph with one bar for each sport.
  4. Read it: the tallest bar shows the most popular choice at once.

A chart must be honest and complete. It needs a title, labels on both axes and, for a pictograph, a key that says what one picture stands for. A bar graph should start counting from zero; if it starts from ten, a small difference can look enormous.

The link to AI

An AI project follows the same steps on a much larger scale. A team decides what question the model should answer, collects examples, checks that they represent all the people or cases the model will meet, and organises them into a form a computer can learn from. If a group is left out at the collecting stage, no clever method later can put it back. This is why careful collection is called the foundation of AI.

How it works

MethodHow it collects dataExample
SurveyAsking people questionsA form about favourite foods
SensorA device measures automaticallyA weather station recording rainfall
ObservationWatching and noting what happensCounting birds in a park

Tally marks group counts in fives, so they are quick to add. A table holds the totals. A bar graph turns totals into bars you can compare at a glance.

Try it yourself

Turn survey answers into a table and a bar graph

Count each answer, watch the table and graph grow, then read the graph.

Common mistakes

  • Asking only people who agree with you. That gives one-sided data.
  • Forgetting to label a graph. Without labels, nobody knows what the bars mean.
  • Counting the same answer twice.

Check yourself

Question 1

1. A weather station measuring rain every hour is an example of…

Question 2

2. Why use a bar graph?

Question 3

3. In tally marks, one group of lines stands for…

Summary

  • Data is collected by surveys, sensors and observation.
  • Tallies, tables and bar graphs organise data so patterns show.
  • Careful collection and organisation come before any AI can learn.

Finished reading?