# Math Problem Please Hep!January 26, 2020 11:46 AM   Subscribe

I would dearly love an answer to this math question, but I'm far too mathematically ignorant to figure it out.

Here's all the information I've got (trust me on this):

A legal researcher has a sample of 150 cases.

All of the cases were resolved, either by settlement or trial. But we are not told the actual number of cases that were either settled or tried. (We're only told that the number of settlements was larger than the number of trials.)

The researchers interviewed all the attorneys whose cases had been tried in order to find out why they had been unable to settle.

In 53% of the cases, the attorneys reported that had been able to agree on the terms of a settlement between themselves, but what thwarted settlement, in all their cases, was the fact that one of the lawyers had been unable to convince his or her client to agree to the settlement, too.

We're not told, but we can deduce, that in the other 47% of cases that went to trial, the attorneys had not been able to agree on the terms of a settlement between themselves, and that in every case, their clients had taken their advice not to agree on the terms of a settlement with each other either.

So: in math-speak:

150 = total number of cases
X = number of cases that settled
Y = number of cases that were tried
X + Y = 150
Y is 53% one thing and 47% another thing
Whatever the numeric value of 53% of Y, it has to be a whole number

So, finally, the question:

What is the LEAST value that Y could have? And what is the most?
posted by Transl3y to Education (23 answers total)

I don't think you have enough information.
posted by uberchet at 11:50 AM on January 26, 2020

Probably safe to assume that the 53% number is rounded, and represents some value >=52.5% and less than 53.5%. Y has to be some combination of whole numbers totaling 74 or less. That's a small enough set that you could easily make a spreadsheet and count the acceptable results.
posted by jon1270 at 11:57 AM on January 26, 2020 [3 favorites]

Wouldn't it just be a case of working out what 53% of 150 is? (79.5)
posted by sockpim at 11:57 AM on January 26, 2020

Per jon1270's response, I made a spreadsheet with all of the possible answers, and the only one with whole number results was X=50, Y=100. So yes, rounding seems likely.
posted by HeroZero at 12:00 PM on January 26, 2020 [1 favorite]

Y is 53% one thing and 47% another thing

I don't think that statement is correct, but rather:
.53 * Y = cases in which a settlement was attempted but failed
.47 * Y = cases in which no settlement was attempted

I'm on team "not enough information". If you knew how many cases attempted to negotiate a settlement, you'd have enough, I think.
posted by hoyland at 12:01 PM on January 26, 2020 [2 favorites]

I just put it into a spreadsheet, and there is no whole number that is exactly 53 percent of any number between 1 and 74 (if total cases is 150 and there were more settlements than trials, there must be fewer than 75 trials).
posted by brentajones at 12:02 PM on January 26, 2020 [1 favorite]

If X>Y, and X+Y=150. then the most Y could be is 74. The least I am still working on.
posted by AugustWest at 12:02 PM on January 26, 2020 [1 favorite]

The least I think is 15. 8/15=53.3333
posted by AugustWest at 12:04 PM on January 26, 2020 [1 favorite]

35+39=74, and is the high end. 6+7=13 and is the low end.
posted by jon1270 at 12:06 PM on January 26, 2020

No wait... aigh, my conditional formatting may be goofed up...
posted by jon1270 at 12:08 PM on January 26, 2020

AugustWest was right on the low end. I was right on the high end.
posted by jon1270 at 12:10 PM on January 26, 2020

August west was right on the low end. I was right on the high end.

I will go with we were both right in the high end. In the comment just prior to my low end calc, I noted the high end of 74. I arrived at it differently I think. It was to me, simply what is the highest number Y could be if X was greater than Y. 76 for X and 74 for Y + 150.

The low end calc was brute force finding the 53% number.

Is there an actual formula that can be used to determine the answers?
posted by AugustWest at 12:22 PM on January 26, 2020

Ah, I mistook your "the most Y could be is 74" as the top of the plausible range rather than a specifically tested and accepted answer. Apologies.
posted by jon1270 at 12:25 PM on January 26, 2020

.52, .53, and .54 are all more than half, so the answer is the smallest possible denominator of the fraction written in whole numbers which is greater than .50 but closer to .53 than either .54 or .52.

And the answer, as AugustWest points out, is 15.
posted by jamjam at 12:34 PM on January 26, 2020

FWIW, intermediate possibilities are 8+9, 9+10, 14+16, 15+17, 16+18, 17+19, 18+20, 19+21, 20+23, 21+24, 22+25, 23+26, 24+27, 25+28, 26+29, 27+30, 27+31, 28+31, 28+32, 29+33, 30+34, 31+35, 32+36, 33+37, 34+38, 35+38 and 34+39.
posted by jon1270 at 12:41 PM on January 26, 2020 [1 favorite]

...except for 35+38. That one's wrong. I have clearly eaten too much pie today and need to let the sugar rush wear off.
posted by jon1270 at 1:06 PM on January 26, 2020

I agree with the others above that this is impossible data unless the 53% has been rounded. In case it has, my spreadsheet agrees with jon1270's list after the correction.

Happy to send you the sheet if you want to play with other numbers, but my (possibly very inefficient) process was to start with the possible number of trials (going from 1 to 74), find 52.5% and 53.5% (well, I did 53.4999999% in case 53.5% was an integer) of the number of trials, and check if the ceiling of the first number equaled the floor of the second. If so, there's your integer number of cases where the attorney agreed, but the client went against advice.
posted by ktkt at 2:24 PM on January 26, 2020 [1 favorite]

```
#!/usr/bin/env perl
use v5.28;

my \$total_cases = 150;
my \$pc1 = 53;

for my \$trials (1 .. \$total_cases) {
my \$settlements = \$total_cases - \$trials;
# the number of settlements was larger than the number of trials
last if \$settlements <= \$trials;

for my \$guess (1 .. \$trials) {
my \$c1 = int( ((\$guess / \$trials) * 100) + 0.5);
if (\$c1 == \$pc1) {
say "trials: \$trials settlements: \$settlements solution53: \$guess";
}
}
}
```
trials: 15 settlements: 135 solution53: 8
trials: 17 settlements: 133 solution53: 9
trials: 19 settlements: 131 solution53: 10
trials: 30 settlements: 120 solution53: 16
trials: 32 settlements: 118 solution53: 17
trials: 34 settlements: 116 solution53: 18
trials: 36 settlements: 114 solution53: 19
trials: 38 settlements: 112 solution53: 20
trials: 40 settlements: 110 solution53: 21
trials: 43 settlements: 107 solution53: 23
trials: 45 settlements: 105 solution53: 24
trials: 47 settlements: 103 solution53: 25
trials: 49 settlements: 101 solution53: 26
trials: 51 settlements: 99 solution53: 27
trials: 53 settlements: 97 solution53: 28
trials: 55 settlements: 95 solution53: 29
trials: 57 settlements: 93 solution53: 30
trials: 58 settlements: 92 solution53: 31
trials: 59 settlements: 91 solution53: 31
trials: 60 settlements: 90 solution53: 32
trials: 62 settlements: 88 solution53: 33
trials: 64 settlements: 86 solution53: 34
trials: 66 settlements: 84 solution53: 35
trials: 68 settlements: 82 solution53: 36
trials: 70 settlements: 80 solution53: 37
trials: 72 settlements: 78 solution53: 38
trials: 73 settlements: 77 solution53: 39
trials: 74 settlements: 76 solution53: 39
posted by zengargoyle at 6:52 PM on January 26, 2020 [1 favorite]

If you add in the additional check that the 47% also matches (rounding the same way) it somehow removes out one of the solutions...

trials: 40 settlements: 110 solution53: 21

I'm guessing floating point evil.
posted by zengargoyle at 7:00 PM on January 26, 2020

Is there an actual formula that can be used to determine the answers?

There is an algorithm to find the fraction with least numerator and denominator whose decimal is in a given range (in this case, 0.525 to 0.535). To carry it out, you need to know an operation called the mediant of two fractions. The mediant of a/b and c/d is (a+c)/(b+d). It's a great joke: fraction addition for people who never learned the right way to add fractions. As an example, the mediant of 1/2 and 2/3 is 3/5.

Notice that as a numerical quantity, 3/5 is between 1/2 and 2/3. That's not just a coincidence! The mediant of two fractions (with positive numerators and denominators) is always between the two fractions in value. Explanation at bottom*, but you might enjoy figuring it out for yourself. Another notable thing about mediants is that their value actually depends on the two original fractions, not just on the numbers they represent. So 1/2 and 2/3 make 3/5, but 5/10 and 4/6 make 9/16. Luckily all the fractions produced by the algorithm I'm going to describe are always in their most reduced form. (The proof of that is left to the reader.)

Now here's the algorithm.

Make two columns. Put 0/1 at the top of one column and 1/1 at the top of the other (this is assuming the ends of your target range are somewhere between 0 and 1). Then, repeatedly take the mediant of the fractions at the bottom of each column. If the resulting fraction is too small for your target range, write it at the bottom of the left column. If it's too big, write it at the bottom of the right column. If it's in the target range, it's the fraction you were looking for.

Here's how this goes for the range 0.525 to 0.535. We start with
```0/1    1/1
```
The mediant is 1/2. That's less than 0.525, so we write it in the left column:
```0/1    1/1
1/2
```
Next we take the mediant of 1/2 and 1/1, which is 2/3. That's more than 0.535, so we write it in the right column:
```0/1    1/1
1/2    2/3
```
Next comes 3/5, still too big:
```0/1    1/1
1/2    2/3
3/5
```
Then 4/7, etc. Try it for yourself; you should find that the next few fractions are all too big, until you get to 8/15, which at 0.533... lands in the target range. That's our winner.

What makes this work is a lot of cool math related to Farey series and the Stern–Brocot tree. The best place to learn about it, unless you're a student in my number theory course this spring, is Marty Weissman's beautiful book An Illustrated Theory of Numbers (disclosure: I know Marty, but seriously, it's a great book). By the way, the same algorithm can be used to find the best fractional approximations to irrational numbers like √2.

---
* Explanation for why (a+c)/(b+d) is between a/b and c/d: Imagine that a out of b fruits in one bowl are apples, and c out of d fruits in another bowl are apples. If you mix both bowls together, (a+c) out of (b+d) fruits in the combined bowl will be apples. And it makes sense that the proportion of apples in the combined bowl should be somewhere between the proportion of apples in one of the original bowls and the proportion of apples in the other. (Of course it can also be proven with algebra, but I like this way best!)
posted by aws17576 at 8:40 PM on January 26, 2020 [7 favorites]

In this particular case there are no exact solutions. Not only is 53 prime, but so is 47. The smallest exact solution would be for 100 trials which would leave 50 settlements and violate one of the conditions. So rounding must take place. Since there are two numbers to consider, one must 'round up' and one 'round down' because the two must add up to the same total. But there's once special case where rounding goes haywire... when both the the two numbers are 1/2. If you round both up you're adding 1 to the sum, if you round both down you're losing 1 from the sum.

40 trials, 21 go one way, 19 go the other way.

21/40 = 52.5%
19/40 = 47.5%

They're both 1/2 from being the two sides of an exact solution and if you round both up you get 53% and 48% (101% total), round them down and you get 52% and 47% (99% total).

If they had given you just one more digit of precision in the percentages... This might have been an exact solution.

I'd be tempted to take this one as 'the answer' that's closest to right. The rounding errors are equally balanced.
posted by zengargoyle at 9:19 PM on January 26, 2020 [3 favorites]

Looks like the smallest error rounding wise is:

66 trials, 35 one way, 31 the other:

35/66 = 0.53030303030303
31/66 = 0.46969696969697

So much for that theory. :)
posted by zengargoyle at 9:47 PM on January 26, 2020 [2 favorites]

This requires the max/min percentages that would round to 53% and 47%.... i.e.:
52.500000001% = min # settled / 47.499999999% = max # trials
53.499999999% = max # settled / 46.500000001 = mix # trials

This translates to:
78.75 (round up, since we can't go down anymore for a min) / 71.25 (max, round down) = 79 / 71

80.25 (round down) / 69.75 (round up) = 80 / 70

So, 79 or 80 settled, and 71 or 70 went to trial.
posted by DoubleLune at 6:31 AM on January 27, 2020

« Older Do the Right Thing   |   Please recomend a product that will lessen my... Newer »
This thread is closed to new comments.