Can These All Be True?
Somebody hands you a few probabilities: a forecast, a test’s error rates, a survey, an assistant’s answer. Write them down here. The Artificial Wasteland’s checker works out, exactly, whether any world could make them all true at once, and what they force about anything else you ask. Where they leave an answer open it gives the whole range, with a world at each end that is reached. Where they cannot all be true it gives the proof: a set of bets at your own odds that can never come out ahead.
- exact fractions, nothing rounded
- independence never assumed
- every answer proved by a second program
- what you type stays in your browser
What you were told
Start from an exampleHow to write a statement
- P(rain) = 0.3
- a probability, as a decimal, a percentage (30%), a fraction (3/10) or “1 in 8,543”. A decimal comma (0,3) is refused, because it could be read two ways
- P(rain and wind) >= 10%
- events are names joined by
and,or,not,xor,iff, with brackets; =, >=, <=, > and < all work - P(late | rain) = 0.9
- “given”: the chance of late among the cases where it rains. The page says each one back in words, so a conditional typed the wrong way round shows
- P(A) between 0.2 and 0.4
- a range
- P(A) >= 2 P(B)
- one probability against another, or sums such as P(A) + P(B) <= 1
- rain implies cloud
- a fact, true in every case; also
never (A and B),exactly one of A, B, C,A, B exclusive - A, B independent
- only when all but one of their probabilities is stated exactly (see below)
- "rain on Saturday"
- a name with spaces goes in quotes. Names are taken exactly as written:
Rainandrainare two events, andABis an event of its own, not A and B (the page says so when it sees either) - P(A) = 0.3; P(B) = 0.4
- several statements can share a line, separated by semicolons; anything after
#is a comment - ? P(late)
- a question; ask as many as you like, conditional ones too
Take it with you
The link carries your statements after the #, the part of an address a browser never sends to a server. Whoever opens it gets nothing from us but this page: their own browser reads the statements and works the answer out again, proof included.
To check a saved record away from this site: node checker.mjs can-these-all-be-true.record.json. The checker is one file, imports nothing, and has no solver in it: it only evaluates what a record claims, in exact fractions, across every case.
What this page will not do
- Assume independence. A calculator that multiplies two chances adds a statement you never made: that the events have nothing to do with each other. (The two popular calculators we looked at both say they are for independent events; the method page names them.) Here two events are related in whatever way your statements allow, which is usually many ways, and the answer is the full range. If you do mean independence, say so on its own line; the page takes it when all but one of the probabilities involved is stated exactly, because only then is it a statement it can prove things about, and refuses it otherwise.
- Guess what you meant. It shows how it read each line, and says each conditional back in words. Whether that is what your words meant, it cannot know, and nothing below certifies it. A verdict here is about the statements as read: the same events, one population.
- Tell you the statements are true. “Can all be true” means some world fits them. It says nothing about this one.
- Round, or call a rounding slip a contradiction. A number is taken exactly as written unless you tick the box. Every answer is given exactly, as a fraction or as a decimal that ends; a decimal cut short to fit ends in an ellipsis, is never rounded, and has its exact fraction beside the answer or, in a table, in the record. When figures conflict as written but would fit as rounded figures, the page says that first, and shows the slack each figure was given.
- Blur “more than” into “at least”. A statement with > or < and no “given” is held strictly. If it could hold only with equality, the statements cannot all be true, and the proof is a bet you called better than fair that can never win. In an answer, an end of a range that is approached and never reached is marked as such. (On a statement with a “given”, > and < are read as “at least” and “at most”, and the page says so.)
- Take probability zero for never.
P(A and B) = 0does not rule A and B out;never (A and B)does. The difference shows as soon as something is asked given B, and the page spells it out when it matters. - Let a condition of probability zero hide a contradiction. As a ratio, P(A | B) says nothing when B has probability zero, and any two such statements “agree”. Read as bets that are called off when B fails, they can still contradict each other, and this page reads them that way and shows the bets. A question given something of probability zero is answered the same way, as the price of a bet, with the statements that still hold that price named.
- Go past sixteen events or sixty statements, or run on without end. Sixteen events are 65,536 cases, which it goes through. The general problem is NP-hard, so the limit is a real one. It takes sixty statements at once; a range written with “between”, and a figure read as rounded, each count as two. A problem that needs more exact work than a fixed allowance is refused, in the same way on every device, and you can stop one yourself sooner.
The problem is George Boole’s, set out in 1854 and 1862. Solving it as a linear program is Theodore Hailperin’s, from 1965, and the reading of a probability as the price of a bet is Bruno de Finetti’s. Other software does parts of this, one of them in a browser. What is here, where each idea came from, who else does it, and every check behind the page: the method page.
What the site learns when you use this page: its server counts a view of this address, up to and not including the #, with the hour. For a visit from a browser it also keeps a daily tally of the country the connection comes from and of the kind of device, each kept apart and never joined to the page. It labels how a visit arrived when it can tell (from another page of this site, from a link that names its source, or from a known site such as a search engine), and a short script on the page confirms the view by sending back this page’s address and nothing else from the page. The page’s content policy lets it contact only artwaste.land, the site’s usual third-party analytics script is not added to this page, and nothing you type is sent anywhere.