What is AI?
Artificial intelligence (AI) is when a computer does a task that needs human-like thinking: seeing, listening, understanding language or deciding. Most AI today works by learning from data, not by following only fixed instructions.
AI, machine learning and deep learning
- AI is the big idea: machines acting smart.
- Machine learning (ML) is a part of AI where the machine finds patterns in data.
- Deep learning is a part of ML that uses large neural networks, for example to recognise faces.
Three main domains
- Data science: numbers and tables (price prediction).
- Computer vision: images and video (face unlock).
- Natural language processing (NLP): text and speech (voice assistants, translation).
Not everything automatic is AI: a washing machine timer follows fixed steps and does not learn.
The six stages of the AI project cycle
- Problem Scoping: understand the problem. Fill a 4Ws problem canvas: Who (stakeholders), What (the problem and its proof), Where (situation/context), Why (benefit of solving it). End with a one-line problem statement.
- Data Acquisition: collect data that is relevant, reliable and allowed to use. Sources: surveys, sensors, cameras, observations, web scraping, open data sets (APIs). Data has features (inputs, e.g. size, colour) and a label (answer, e.g. apple).
- Data Exploration: clean the data (fix missing, wrong or repeated values) and visualise it with graphs to spot patterns.
- Modelling: choose a method. Rule-based: humans write the rules. Learning-based: the machine learns rules from the data (e.g. supervised learning with labelled data, unsupervised learning finding groups).
- Evaluation: test the model on data it has never seen. Measure accuracy and look at its mistakes.
- Deployment: put the model into a real app or device, watch how it works and keep improving. Then the cycle repeats.
Evaluating a model: accuracy in simple numbers
Accuracy = correct predictions ÷ total predictions × 100%.
If a fruit model sees 200 new fruits and gets 180 right, accuracy = 180 ÷ 200 × 100 = 90%. We keep some data aside as test data because a model can simply "remember" its training data; testing on new data shows whether it really learned.
Accuracy alone can hide problems: a model may be 95% right overall but much worse for one group of people. That is why we also check results group by group.
Ethics and bias in AI
AI ethics means making sure AI is used in a way that is fair and safe for people.
- Bias: the model treats some people unfairly, usually because the training data has too few or one-sided examples. Example: a face-unlock system trained mostly on one skin tone fails more often for others.
- Privacy: collect only the data you need, with permission, and keep it safe.
- Transparency: people should know when AI is deciding and why.
- Accountability: humans stay responsible for what the AI does.
- Jobs and access: AI should help people, and everyone should be able to use it.
Fixes: balanced and checked data, testing on every group, human review of important decisions.
Key formulas and definitions
- Accuracy (%) = correct predictions ÷ total predictions × 100
- AI project cycle: Problem Scoping → Data Acquisition → Data Exploration → Modelling → Evaluation → Deployment
- 4Ws canvas: Who, What, Where, Why
- Feature: an input property of the data. Label: the correct answer for an example.
- Training data teaches the model; test data checks it.
- Bias: unfair results for some group, often caused by unbalanced data.
Worked examples
1. Write a 4Ws problem statement for students who forget to drink water in school.
Who: students aged 12–15. What: they drink too little water and feel tired. Where: in classrooms during long periods. Why: reminders could improve health and focus. Statement: "Our students (who) drink too little water (what) during long class periods (where); a smart reminder would keep them healthy and alert (why)."
2. A plant-disease model tested on 250 new leaf photos gives 215 correct answers. Find the accuracy.
Accuracy = 215 ÷ 250 × 100 = 86%.
3. A loan-approval model was trained only with data from city applicants. What problem may appear and how can it be fixed?
It may unfairly reject village applicants because it never learned their patterns (bias). Fix: collect balanced data from villages too, test accuracy separately for each group, and let a human review rejections.
Common mistakes
- Jumping to modelling before scoping the problem. Without a clear problem statement the data you collect may be useless.
- Testing the model on the same data it was trained on. That only checks memory, not learning.
- Thinking more data is always better. Wrong, biased or private data makes the model worse or unethical.
- Calling every automatic machine "AI". It is AI only if it learns or reasons from data.