What is a ratio?
When doing data science, understanding the concept of ratio can be useful. We use ratios to mean how much of something there is for a certain amount of another thing. For example, in a pair of shoes there is one shoe for each foot, so there is a ratio of 1 to 1. If you happen to have lots of pairs of shoes, say 48 pairs, the ratio between your 94 shoes and your two feet is indeed 48 shoes for each 1 foot.
Ratios are usually expressed like a:b and are read 'a to b' or 'there are a units for each b units.' So, the ratio between shoes and feet would be 48:1 (forty-eight to one) because you have 48 left shoes and 48 right shoes, that is, 48 shoes for each one of your feet.
The women:men ratio in the world is roughly 52:50 (fifty-two to fifty) meaning that for each 50 men there are 52 woman. You can simplify this ratio and divide both terms by a common divisor and get a ratio of 26:25, which is equivalent.
Think of a bowl filled with balls. There are 11 balls inside it, 4 are red and 7 blue. What's the red:blue ratio? Just 4:7. What's the blue:red ratio? It'll be 7:4. Now, what's the blue:total ratio? It's the ratio that relates blue balls to the total amount of balls, so we must say it's 7:11, because for each eleven balls there are seven that are ping-pongs. In the same way, the red:total ratio would be 4:11.
We might transform a ratio into a quotient. For instance, a 1:2 ratio of notebooks to pencils may be expressed as1/2 meaning that the quantity of notebooks is 1/2 of the quantity of penciles. If you have six university students per professor, you would say the ratio is 6:1 and the quotient 6/1, that is, the quantity of students is 6/1 times the quantity of professors.
That's all good, but we need now a way to represent comparisons between ratios. For example, if you want to know if there is a sort of relationship between weddings and rings, you probably want to compare the weddings:people ratio with the rings:people ratio. Let's suppose that there are 50 weddings per 1,000 inhabitants in some country in any given year, so the weddings:people ratio is 50:1,000. You also have the rings:people ratio: per each 500 people there are 25 rings. Then, the rings:people ratio is 25:500 or 50:1,000. Now you compare these two ratios by using this sign (::) between them, this way:
And this expression states that the two ratios (weddings to people and rings to people) are the same. The two numbers in the extremes are called... extremes, and the two in the middle are called means. If we simplify these rates, we get 1:20::1:20. This is read 'weddings are to people as rings are to people' or 'there are as many weddings per person as rings per person,' because there is 1 ring and 1 wedding per each 20 people. Indeed, you see that the weddings:rings ratio is 1:1, so that per each ring sold there was one wedding.
Ratios can sometimes concatenate several terms. See these boxes:
Here, the blue:red:total ratio is 1:2:6 because there is 1 blue box per each 2 red boxes and there are 2 red boxes per each 6 boxes. See this three-terms ratios as two two-terms ratios merged into one. In the weddings example the marriages:people:rings ratio was 1:20:1.
Well, that's all we have time for today. Thanks for reading, and don't forget to subscribe for more! Cheers!