Class 10 · Unit 2: Modelling · Lesson 2.4 · 40 min
Neural networks, and how AI makes a decision
Same sky, same forecast. Rahat goes to play cricket; Hiba stays home. Which of them is wrong?
Today you will: Build one neuron in a spreadsheet · Change its weights and change its mind · Be a node in a human neural network
Story
Saturday. The sun is out over the ground behind the school, but the forecast says rain by four.
Rahat: “I'm going. It's sunny now. I've got my jacket.”
Hiba: “I'm not. It says rain later, and I haven't got an umbrella.”
Rahat: “Same sky. Same forecast. One of us is wrong.”
Their teacher, passing, stops. "Neither of you is wrong. You're weighing the same things differently."
Watch
One neuron, then many — — scan code 10.2.4 in the printed book.
Learn it
Rahat and Hiba saw the same sky and decided differently because they weighed the same facts differently. That is exactly how one artificial neuron decides: each input is multiplied by a weight (how much it matters), the results are added with a bias, and the total is compared with a threshold. A neural network is many neurons in layers, and it learns by adjusting its weights after every mistake.
Words to know
- Neuron (or perceptron) — one decision unit: inputs × weights, plus a bias, compared with a threshold.
- Input one fact fed in, as a number: 1 for yes, 0 for no.
- Weight how much an input matters. A negative weight pushes against the decision.
- Bias a starting push before looking at anything, like how cautious a person is.
- Threshold the line the total must cross; above it, yes.
- Neural network many neurons in layers: an input layer takes the data, hidden layers do the working, an output layer gives the answer.
- ANN / CNN Artificial Neural Network; Convolutional Neural Network, built for images (Unit 4).
Step by step: should Hiba walk to school or take the bus?
Inputs (1 = yes, 0 = no): Is it snowing? 1 · Is the road cleared? 0 · Am I late? 1. Weights: snowing −3, road cleared +2, late −1. Bias +2. Threshold 0: above 0, walk.
- Multiply: snowing 1 × −3 = −3 · road 0 × 2 = 0 · late 1 × −1 = −1.
- Add the bias: −3 + 0 − 1 + 2 = −2.
- Compare with the threshold: −2 is below 0 → take the bus.
- Change one input: the road is cleared (1) → −3 + 2 − 1 + 2 = 0, still not above 0 → bus.
- Change one weight: a braver walker with bias +3 → +1 → walk. Same facts, different weights, different decision.
How a network learns: nobody sets millions of weights by hand. It starts with guesses, checks how wrong its answer was, and nudges every weight a little, thousands of times, until it is right more often. Its big advantage is finding useful features by itself, which is why it suits images and speech.
Careful: a neural network is not a copy of the brain. It is loosely inspired by neurons, and it does not think. And bias here is just a starting number added to the total, not unfairness: the same word means something different in Unit 1.
On the laptop
You need: LibreOffice Calc · neuron.ods
Mission 1: Build one neuron (8 min, in pairs)
- ☐1
Open
neuron.ods. Column A has the four questions and Bias. Column B is the input: 1 for yes, 0 for no. The bias input is always 1. Column C holds the weights: 3, −2, 1.5, 1, −2. - ☐2
Set Saturday's inputs: sunny 1, rain forecast 1, jacket 1, umbrella 0.
- ☐3
Predict: go or stay? Write it in E1.
- ☐4
In C8, add it all up:
=SUMPRODUCT(B2:B6;C2:C6). In C9, decide:=IF(C8>0;"GO";"STAY"). Were you right?
Mission 2: Same day, different weights (5 min)
- ☐5
You are now Hiba: more cautious. Change the bias weight from −2 to −4. Same inputs — what does the neuron decide now?
- ☐6
Find the smallest change to one weight that turns Hiba's STAY back into GO. Write it in E3.
Mission 3: The human neural network (15 min, whole class, away from the laptops)
- ☐7
Your teacher places 20 of you as a network: 7 in the input layer, 6 in hidden layer 1, 6 in hidden layer 2, and 1 in the output layer. Everyone else is an observer.
- ☐8
Only the input layer sees a picture. No talking, all game. Each node writes one word per chit and passes it forward, as your teacher explains.
- ☐9
The output node reads the chits and guesses the picture. Then the picture is revealed.
Finished early?
Online: open playground.tensorflow.org, press play, and watch a real network change its weights as it learns. What happens when you add a hidden layer?
No laptop today?
Do Parts 1 and 2 on the board: the class calls out 1s and 0s, and pairs do the multiplying on paper. Then play the human neural network with the whole period to spare.
Debate it
In the game, no single person knew the picture except the input layer, and nobody could explain how the output node reached its guess.
- A real network has millions of weights. Could anyone explain why it made one decision?
- If a network like that turned down your scholarship, what would you want to be told?
Check yourself — practice, not a test
1. Put the layers of a neural network in order, from data to answer:
- 1. Input layer
- 2. Output layer
- 3. Hidden layers
2. In a neuron, what does a weight say?
- ○ How heavy the input is
- ○ How much that input matters to the decision
- ○ How many inputs there are
- ○ Whether the answer is right
3. A neural network learns by adjusting its weights after its mistakes.
- ○ True
- ○ False
4. The kind of neural network built for images, which Unit 4 explores, is a ______ neural network.
5. Sunny 1, rain forecast 1, jacket 1, umbrella 0, with weights 3, −2, 1.5, 1 and a bias of −2. What is the total?
- ○ 2.5
- ○ 0.5
- ○ −1.5
- ○ 4.5
Remember
A neuron weighs. A network learns by changing its weights.
Typing practice
Skill: a formula that multiplies two columns (5 min)
-
On typing.com: the symbols lessons.
-
Type three times, eyes on the screen:
=SUMPRODUCT(B2:B6;C2:C6) -
Goal this term: 38–44 WPM at 95%.