Percentages
Why this matters
Percentages let you compare shares of different totals by putting them all out of 100. They're also how almost every result in machine learning is reported: accuracy, error rate, how much better a new model is. This lesson covers the three forms of one number, percent of an amount, percentage change, and the difference between a change in percent and a change in percentage points, which trips up headlines and reports alike.
- Move between fractions, decimals and percentages, and find a percent of an amount
- Work out a percentage change from the old value, and tell it apart from percentage points
- Write percentages as decimals in Python, and show them with :.1%
- Report a model's accuracy and error rate, and compare two models honestly
The math: per hundred
Purpose. Which is the bigger share: 3 out of 20, or 14 out of 100? Different totals make shares hard to compare. A percentage rewrites every share out of the same total, 100, so they line up.
Percent means per hundred. 35% is 35 per hundred: 35/100, or 0.35. So a fraction, a decimal and a percentage are three ways to write one number:
| fraction | decimal | percentage |
|---|---|---|
| 1/2 | 0.5 | 50% |
| 3/4 | 0.75 | 75% |
| 3/20 | 0.15 | 15% |
To go from a decimal to a percentage, times by 100. To go back, divide by 100. So 3 out of 20 is 15%, which beats 14 out of 100.