Advertisement
Data Processing

The Rounded Ratio: Coverage Bought With Collisions

An aspect ratio is a small piece of geometry that travels through catalogues, image pipelines, and specification sheets, changing its clothes as it go...

An aspect ratio is a small piece of geometry that travels through catalogues, image pipelines, and specification sheets, changing its clothes as it goes. One system writes it as a reduced pair of whole numbers, another multiplies the pair up, another converts it to a decimal and rounds the decimal for display, and another writes it as a fraction with a slash. A join cannot glance. It follows a rule, and the rule decides which forms count as equal. This measurement follows what happens as the rule grows more generous, and it watches a particular turning point where generosity stops recovering true matches and starts manufacturing false ones, because a rounded decimal is not the ratio itself but a neighbourhood around it.

What The Rounded Ratio means

The Rounded Ratio is a ratio that has been converted to a decimal and shortened by rounding, so the stored value approximates the true ratio instead of equalling it. A reduced pair such as a width and height in lowest terms names one exact rational quantity. A decimal rounded to a fixed number of places names a small range of quantities that would all round to the same digits. Two different ratios can therefore share one rounded decimal while remaining different ratios, and one ratio can produce different rounded decimals at different precisions.

The neighbouring concept is The Unreduced Fraction, which was about one rational quantity written as unreduced versus reduced fractions, both forms exact. Multiplying or dividing both terms of a fraction changes the writing without changing the quantity at all, so converting between those forms loses nothing. The precise difference is that here two of the five forms are rounded decimals, which are not the quantity at all, only an approximation of it. Exact forms can be normalised by arithmetic with confidence. Rounded forms can only be admitted under a tolerance, a wager about how much distinctness the rounding may have erased.

Five forms of the same ratios

The measurement holds 300 distinct aspect ratios, each a reduced width:height pair. Source A stores the reduced colon form for every ratio, which gives each row a single exact reference spelling. Source B spreads five forms, with 60 rows in each: the reduced form, an unreduced multiple such as 32:18 for 16:9, a decimal rounded to 2 places, a decimal rounded to 4 places, and a slash fraction.

The two decimal groups are the troublemakers, and they trouble the join in opposite directions. A decimal at higher precision keeps more of the quantity, so fewer distinct ratios share its spelling, while a decimal at lower precision discards more, so collisions become likely. The slash fraction, by contrast, is an exact form wearing different punctuation, and the unreduced multiple is an exact form wearing bigger numbers. A well-built rule should recover the exact forms by parsing, admit the finer decimal under a careful tolerance, and think hard before admitting the coarser one. The results trace exactly that ladder.

An exact join matched 60 of 300 rows, only the group where source B happened to keep the reduced colon form. Parsing colon and slash forms as rationals matched 180 of 300, recovering the reduced group, the unreduced multiples, and the slash fractions in one move. That jump rewards treating the value as a rational number rather than as text. The rows still unmatched are precisely the rounded decimal rows, whose stored digits no longer encode the exact pair.

The Rounded Ratio: Coverage Bought With Collisions

Where tolerance helps and where it turns

A tolerance join admitting 4-place decimals matched 250 of 300, including 10 two-place rows whose rounded value happens to be exact at 4 places. The join recorded 0 false merges at this level, for a countable reason: the 300 ratios produce 300 distinct 4-place strings, so every ratio still owns its rounded label outright.

Admitting 2-place decimals matched all 300 rows, and the headline is where the trouble hides. The 300 ratios collapse onto only 202 distinct 2-place strings, producing 98 false-merge extra rows. Coverage was bought with collisions. Rows that should have stayed apart were pulled together because different ratios round to the same two digits. Nothing can be rescued by a smarter parser, because the discarded digits are absent from the stored value.

The contrast between the two decimal levels is the heart of the finding. Precision is not a cosmetic choice about how many digits look tidy on a report. It determines whether a rounded column can serve as a joining key at all in a given collection. The same collection that keeps every value distinct at one precision can collapse heavily at another, and the collapse can be counted in advance by asking how many distinct rounded strings the values produce. That count is cheap, decisive, and far more informative than a trial join whose false merges may pass unnoticed if nobody checks the joined rows against a second source of truth.

Reporting the two decimal levels side by side also changes the conversation about data quality inside a team. Instead of arguing about whether decimals are trustworthy in general, the team can point to a count made on its own collection and decide for that collection alone. A column that passes the distinctness count earns its place in the join. A column that fails it is demoted to a display field, useful for reading and useless for matching, until a more exact form can be obtained from the source that produced it.

How the measurement was assembled

This was a deterministic synthetic measurement, run with seed 42, so the same 300 ratios and the same assignment of the five stored forms recur on every run. The ratios were constructed to specification rather than extracted from a live media library. Rational parsing, reduction, and the tolerance comparisons were carried out with self-written parsing rules in the standard library, applied in the same order to every row. This is not a commercial product measurement: no commercial product measurement was undertaken, no vendor tool was evaluated, and the counts describe only those stated rules on that stated set.

Questions, answered

Why does rational parsing recover the unreduced multiples so cleanly? Because an unreduced multiple is the same rational quantity with both terms scaled by one factor, and reduction divides that factor back out. The colon and slash forms parse into the same structure, so 32:18 and its reduced partner become equal by arithmetic, not by string resemblance, and no approximation enters the comparison at any point.

What does it mean that some two-place rows matched at the finer tolerance? It means their rounding happened to lose nothing. The tolerance join admitting 4-place decimals included 10 two-place rows whose rounded value happens to be exact at 4 places, so those stored decimals still encode the full quantity. They are exceptions created by tidy numbers, not evidence that two-place rounding is generally safe to join on.

How can a team test a rounded column before joining on it? Count how many distinct rounded strings the known values produce and compare that count with the number of values. In this measurement the 300 ratios produced 300 distinct 4-place strings and only 202 distinct 2-place strings. Where the counts agree, collisions are absent in that set. Where they fall short, the gap forecasts false merges before any join is run.

If admitting the coarsest decimals matches everything, why not use it and clean up later? Because later cleanup has nothing to work with. A false merge joins rows whose stored values no longer record which true ratio each row carried, so the joined file cannot be separated again from its own contents. The 98 false-merge extra rows would need evidence from outside the file, row by row, which costs far more than refusing the unsafe tolerance at the start.

Summary

Exact matching recovered only 60 of 300 rows, rational parsing of the exact forms raised the total to 180, and a tolerance admitting 4-place decimals reached 250 with 0 false merges, backed by 300 distinct 4-place strings for 300 ratios. Admitting 2-place decimals completed the coverage at 300 matched rows but collapsed the set onto 202 distinct strings and created 98 false-merge extra rows. A rounded ratio is an approximation wearing the clothes of a value, and whether it can join safely depends on a countable fact: how much distinctness its precision preserves in the collection at hand. Measure that first, and the tolerance decision stops being a guess.

Sources

Know someone who needs this? Share it.

Advertisement