Fractions: equal parts, equal fractions, adding
Why this matters
Amounts between whole numbers are everywhere: half a trail, a third of the snacks. In AI they're everywhere too. A model's accuracy is a fraction. So is the share of each kind of picture in a data set. This lesson shows what a fraction means, why two fractions can look different and be equal, and how to add them. The one rule to remember: you can only add pieces of the same size.
- Read a fraction as pieces taken out of pieces cut, and find equal fractions
- Simplify a fraction, and add or subtract fractions by cutting them to the same size first
- Check fraction sums exactly in Python with Fraction
- Work out a model's accuracy and a data set's class shares as fractions
The math: equal parts, and adding them
Purpose. A whole number counts whole things. A fraction counts parts of one thing.
Picture a trail bar cut into 4 equal pieces. You eat 3 of them. You've eaten 3/4 of the bar: 3 pieces taken, out of 4 pieces cut.
- The bottom number, the denominator, says how many equal pieces the whole was cut into.
- The top number, the numerator, says how many of those pieces you have.
Now cut the same bar into 8 pieces instead, and take 6. You've eaten exactly the same amount of bar. So 3/4 and 6/8 are equal fractions: different cuts, same amount.
The picture. A fraction is also a point on a number line. Below, the line from 0 to 1 is the bar laid flat. First it's cut into quarters, and three of them take you to 3/4. Press Next to cut the same line into eighths.