In the previous lesson we learned to take an argument apart into premises, conclusion and assumptions, and we introduced two ideas that we left pending: validity and soundness. Now it is time to develop them. This lesson is about inference, the mental operation of moving from what we know to what we conclude, and in particular about its most rigorous form: deduction, in which, if the premises are true, the conclusion must be true. You will learn to distinguish inferring from assuming, to recognise the most useful valid deductive forms and the two most common invalid traps, and to handle with ease the conditionals ("if... then...") that appear constantly in technical work: alert rules, requirements, tests. We will apply all of this to one of the key tests in the Nubia case: what can we conclude, and what can we not, from the fact that the rise in churn is concentrated among mobile app users?
- What inferring is
Inferring is reaching a conclusion from information we already have. We do it all the time: if a test fails right after a commit, we infer that the commit has something to do with it; if a customer has not opened the app in three weeks, we infer that they are at risk of leaving.
In Facione's classification (01-03), inference is the skill of identifying the elements needed to draw reasonable conclusions and of considering what follows from the available information. There are three main types of inference, which we will cover across two lessons:
| Type | What it does | Degree of certainty | Lesson |
|---|---|---|---|
| Deduction | Draws out what is already contained in the premises | If the premises are true, the conclusion is necessarily true | This one |
| Induction | Generalises from observed cases | Probable, never certain | 02-05 |
| Abduction | Proposes the best explanation for a set of facts | Plausible, provisional | 02-05 |
Deduction is the only one that offers certainty, but in return it provides no new information about the world: it only makes explicit what the premises already implied. Its great practical use lies elsewhere: checking whether a conclusion really follows and deriving testable consequences from a hypothesis.
- Inference versus assumption
They are often confused, but they are different things:
| Inference | Assumption | |
|---|---|---|
| What it is | A conclusion derived from information | Something taken for granted without being derived |
| It rests on | Identifiable premises | Usually nothing explicit |
| Example | "SMB churn rose by 2.2 points and Enterprise churn by 0.3; therefore, the increase is concentrated in small businesses." | "Enterprise customers don't use the mobile app." |
| How to examine it | By reviewing the premises and the connection | By making it explicit and looking for data |
Every inference rests on some assumptions (the implicit assumptions of 02-03). What is dangerous is the assumption disguised as an inference: something presented as a conclusion ("it's clear that...") when in reality nobody has derived it from anything. One question exposes it: "what are you deducing that from?". If the answer is "it's obvious" or "it's always been that way", you are dealing with an assumption.
- Deduction: validity and soundness
A deductive argument is valid when it is impossible for the premises to be true and the conclusion false. Validity depends only on the form of the argument, not on its content. That is why we can study forms using letters:
Replace P and Q with whatever you like: if both premises are true, the conclusion will be true as well. That is validity.
An argument is sound when it is valid and all its premises are true. Only a sound argument guarantees that the conclusion is true.
VALID BUT NOT SOUND P1. If an account has more than 100 users, it is Enterprise. (false at Nubia) P2. Account X has 120 users. ---------- C. Account X is Enterprise. (The form is flawless; the conclusion may be false because P1 is.) SOUND P1. If an account accumulates three failed payments, the system cancels it. P2. Account Y accumulated three failed payments in October. ---------- C. The system cancelled account Y. (Valid form and true premises: the conclusion is certain.)
This gives us two strategies for criticising any deductive argument:
flowchart TD
A["Do I accept the conclusion?"] --> B{"Is the form valid?"}
B -->|"No"| C["The conclusion is not guaranteed, even if the premises are true"]
B -->|"Yes"| D{"Are the premises true?"}
D -->|"No, or I don't know"| E["The conclusion is not guaranteed: review the premises"]
D -->|"Yes"| F["Sound argument: the conclusion is true"]
The diagram sums up the procedure: first check the form (without needing to know anything about the subject) and then the premises (which does require knowledge and data).
- Valid forms
These four forms cover a large part of everyday deductive reasoning. We use the notation "if P, then Q", where P is the antecedent and Q the consequent.
| Form | Structure | Example at Nubia |
|---|---|---|
| Modus ponens (affirming the antecedent) | If P, then Q. P. Therefore, Q. | If an account accumulates three failed payments, it is cancelled. This account accumulated three. Therefore, it was cancelled. |
| Modus tollens (denying the consequent) | If P, then Q. Not Q. Therefore, not P. | If there were a general payment failure, October's failed payments would exceed the average. They do not exceed it. Therefore, there is no general payment failure. |
| Hypothetical syllogism (chaining conditionals) | If P, then Q. If Q, then R. Therefore, if P, then R. | If sessions time out sooner, there are more verifications. If there are more verifications, more alerts are triggered. Therefore, if sessions time out sooner, more alerts are triggered. |
| Disjunctive syllogism (eliminating options) | P or Q. Not P. Therefore, Q. | The alert comes either from a legitimate user or from an attacker. It does not come from a legitimate user. Therefore, it comes from an attacker. |
Comments for beginners:
- Modus ponens is the most intuitive form: we apply a rule to a case.
- Modus tollens is the basic tool for ruling out hypotheses: if a hypothesis predicts something and that something does not happen, the hypothesis is refuted (provided the prediction really follows from it). It is the basis of scientific reasoning and of debugging.
- The hypothetical syllogism lets us build chains of causes and effects. Remember what we saw in 02-03: long chains are fragile, because a single failed link is enough.
- The disjunctive syllogism is valid, but it has a catch in the premise "P or Q": it only works if the options are exhaustive. In the example, could it not be a legitimate user with a new device on a different network? If there are more options than those listed, the premise is false and the argument is not sound. This is the so-called false dilemma, which we will look at in Detecting Biases and Fallacies.
- Invalid forms: affirming the consequent and denying the antecedent
These two forms look very similar to the valid ones, which is why they so easily mislead us.
| Invalid form | Structure | Example | Why it fails |
|---|---|---|---|
| Affirming the consequent | If P, then Q. Q. Therefore, P. | If there were an attack, there would be more alerts. There are more alerts. Therefore, there is an attack. | The alerts may have other causes (false positives from the new login) |
| Denying the antecedent | If P, then Q. Not P. Therefore, not Q. | If we had changed the billing code, there could be payment failures. We have not changed it. Therefore, there are no payment failures. | There may be payment failures for other reasons (gateway, expired cards) |
Compare the four forms using the same conditional:
Conditional: "If there is an attack (P), there are more alerts (Q)." Modus ponens: There is an attack. -> There are more alerts. VALID Modus tollens: No more alerts. -> There is no attack. VALID Affirming the consequent: There are more alerts. -> There is an attack. INVALID Denying the antecedent: There is no attack. -> No more alerts. INVALID
A rule of thumb: a conditional "if P, then Q" only works in its own direction. You can go from P to Q (ponens) and from "not Q" to "not P" (tollens). Going from Q to P, or from "not P" to "not Q", is reversing the arrow.
Notice that the two examples in the table reproduce the intuitive reasoning of two of our characters: Sofía ("there are more alerts, we're under attack") affirms the consequent, and Álex ("we haven't touched the code, so it's not billing") denies the antecedent. It is not that they are poor reasoners: it is that these forms sound convincing.
5.1. The special case: "if and only if"
Sometimes we can indeed go in both directions: when the relationship is biconditional ("P if and only if Q"). For example: "An account is in cancelled status if and only if the billing system has marked it as such." The common mistake is to treat a simple conditional as if it were biconditional. A useful question: could Q come about in some way other than P? If the answer is yes, it is not biconditional.
- Basic categorical syllogisms
Categorical syllogisms, studied since Aristotle, reason about classes of things using "all", "no" and "some". Let us look at the most useful patterns:
| Pattern | Structure | Example | Valid? |
|---|---|---|---|
| All-All | All A are B. All B are C. All A are C. | All Basic plan accounts are small businesses. All small businesses pay monthly by card. All Basic plan accounts pay monthly by card. | Yes |
| No-All | No B is C. All A are B. No A is C. | No account with an annual contract is cancelled for automatic non-payment. All Enterprise accounts have an annual contract. No Enterprise account is cancelled for automatic non-payment. | Yes |
| All-Some | All B are C. Some A are B. Some A are C. | All accounts with 3 failed payments are cancelled. Some small businesses had 3 failed payments. Some small businesses were cancelled. | Yes |
| Undistributed middle | All A are B. All C are B. All A are C. | All attackers generate alerts. All customers on the new login generate alerts. Therefore, all customers on the new login are attackers. | No |
The last pattern is a classic trap: the fact that two groups share a characteristic (generating alerts) does not mean that one is included in the other. It is the "class-based" version of affirming the consequent.
To check a syllogism, it helps to draw it as sets:
flowchart LR
subgraph B["Generate alerts"]
A["Attackers"]
C["Customers on the new login"]
end
The diagram shows that both attackers and customers on the new login fall within the set "generate alerts", but that says nothing about the relationship between the two groups: they may be completely different.
- Conditionals in technical work
Conditionals are the natural language of technology: business rules, alert rules, requirements, test assertions. Reasoning well with them prevents expensive mistakes.
7.1. Alert rules
Nubia's security rule says: "If an account performs more than two verifications in less than an hour, a suspicious access alert is generated."
- Modus ponens (correct): this account performed three verifications in 40 minutes, so an alert was generated.
- Affirming the consequent (incorrect): there is an alert, so the account performed more than two verifications within an hour. False! There may be other rules that generate alerts.
- Affirming the consequent, the dangerous version: there is an alert, so there is an attacker. The rule does not say that: it says that certain behaviours generate alerts, not that every alert is an attack.
7.2. Requirements and tests
A requirement such as "if the user does not have administrator permission, they cannot export data" is tested with two kinds of cases:
Requirement: If NOT an administrator (P), CANNOT export (Q). Test 1 (modus ponens): user without permission -> check that they do NOT export. Test 2 (modus tollens): user who DOES export -> check that they ARE an administrator. Typical mistake (denying the antecedent): "If they are an administrator, then they can export." The requirement does NOT say that. An administrator could have exporting blocked by another rule. If you implement or test this assumption, you are adding a requirement nobody asked for.
7.3. "If and only if" in specifications
Ambiguous specifications often confuse "if" with "if and only if". Does "the account is cancelled if it accumulates three failed payments" mean that it is only cancelled for that reason, or that this is one of the causes? At Nubia, an account is also cancelled when the customer requests it. That is precisely why, as we saw in 02-01, the dashboard's churn mixes two kinds of cancellation.
- Application: the mobile app test at Nubia
In 01-05, Marta and Diego agreed in advance on what evidence would indicate that the redesign is the cause. Diego frames it as a conditional:
H: The redesign of the mobile app caused the rise in churn. If H is true, then the increase will be concentrated in accounts that use the mobile app (and not in those that only use the web).
Diego extracts the data. He classes as "mobile app users" the accounts with at least one user who opened it every week in September (around 1,400 accounts); the rest, around 1,800, are "web only".
| Group | Accounts | September churn | October churn | Change |
|---|---|---|---|---|
| Mobile app users | ~1,400 | 4.3% | 7.4% | +3.1 points |
| Web only | ~1,800 | 3.8% | 4.0% | +0.2 points |
| Total | ~3,200 | 4.0% | 5.5% | +1.5 points |
The result is clear: the increase is concentrated in accounts that use the mobile app. Marta breathes a sigh of relief... for a moment, because the CEO's reaction on hearing it is: "See? It's the redesign." Let us analyse that inference.
8.1. What we CANNOT conclude
P1. If the redesign caused the increase, the increase will be
concentrated among mobile app users.
P2. The increase is concentrated among mobile app users.
----------
C. The redesign caused the increase.
Form: If P, then Q. Q. Therefore, P.
-> AFFIRMING THE CONSEQUENT: invalid.The result is compatible with the redesign hypothesis, but it does not prove it, because other hypotheses predict the same thing:
- If the problem is the new login flow (which is part of the redesign, but is a specific component, not the design as a whole), it too would mainly affect the mobile app.
- If the accounts that use the mobile app are mostly small businesses paying by card, a payment problem would also be concentrated in that group.
8.2. What we CAN conclude
If the result had been the opposite, the deduction would have been much more powerful:
P1. If the redesign caused the increase, the increase will be
concentrated among mobile app users.
P2. The increase is NOT concentrated among mobile app users.
----------
C. The redesign did not cause the increase.
Form: modus tollens. VALID.This is the fundamental asymmetry: a prediction that fails can refute a hypothesis (modus tollens); a prediction that comes true only keeps it alive (affirming the consequent does not prove it). What the actual result allows is more modest but useful:
LEGITIMATE CONCLUSIONS FROM THE MOBILE APP TEST 1. The hypothesis "the redesign is the cause" is NOT refuted: it has passed a test it could have failed. 2. Hypotheses that predicted an EQUAL increase on web and mobile (for example, a general price change) are weakened (modus tollens applied to them). 3. The test does NOT distinguish between "the redesign in general", "the new login flow" and "payments among small businesses using mobile". Next step: look for a consequence that DIFFERENTIATES between them. For example, split October's churn among mobile users into voluntary cancellations and payment-failure cancellations.
Point 3 is the key to the work ahead: to make progress, it is not enough to look for data compatible with your hypothesis; you need to look for consequences that differentiate between rival hypotheses. We will see how to generate and compare hypotheses in the next lesson.
Common Mistakes and Tips
- Affirming the consequent. "If it were X, we would see Y; we see Y; so it's X." Tip: always ask yourself "what other causes would also produce Y?".
- Denying the antecedent. "We haven't touched the code, so there's no fault." Tip: ask yourself "could the effect come about some other way?".
- Confusing validity with truth. A valid argument with false premises can lead to false conclusions. Tip: check the form and the premises separately.
- Disjunctive syllogisms with incomplete options. "Either it's an attack or it's user error." Tip: before eliminating options, ask whether the list is complete.
- Reading "if" as "if and only if". In requirements and rules, always clarify whether the condition is the only possible one.
Exercises
Exercise 1: Valid or invalid?
Identify the form of each argument and whether it is valid:
a) If the payment gateway changed its API, there will be more declined payments. The gateway did not change its API. Therefore, there will not be more declined payments. b) If churn were noise, October would be within the range of the last 24 months. It is not. Therefore, it is not noise. c) If sessions time out after 2 hours, users who work all morning will have to verify themselves several times. If they have to verify themselves several times, they will generate alerts. Therefore, if sessions time out after 2 hours, those users will generate alerts. d) If a customer is dissatisfied, they leave a negative review. This customer left a negative review. Therefore, they are dissatisfied.
Exercise 2: Deriving testable consequences
For the hypothesis "The rise in churn is due to failed payments in the billing system", write three conditionals of the form "if H, then we should observe...". Indicate which of them could be used to differentiate this hypothesis from the redesign hypothesis.
Exercise 3: Alert rule
Given the rule "If an account performs more than two verifications in less than an hour, an alert is generated", state what can validly be concluded in each case (or "nothing certain"):
a) Account Z performed four verifications in 30 minutes. b) Account W did not generate any alert. c) Account V generated an alert. d) Account U performed only one verification all day.
Solutions
Exercise 1
a) Denying the antecedent: invalid. Declined payments can increase for other reasons. b) Modus tollens: valid. Watch out for soundness: the premise "if it were noise, it would be within the 24-month range" is reasonable, but not perfect (an out-of-range value can occur very rarely by chance). How to assess this rigorously is covered in Statistical Thinking: Data, Charts and Causation. c) Hypothetical syllogism: valid. Its soundness depends on each link (for example, on the alert rules actually being triggered by those verifications). d) Affirming the consequent: invalid. Someone may leave a negative review for other reasons (or by mistake), and the first premise is doubtful too: many dissatisfied customers do not leave reviews.
Exercise 2
If the increase is due to failed payments, then... 1. ...October's failed payments will exceed their historical average. 2. ...the rise in churn will be concentrated in accounts paying by card (small businesses), not in Enterprise (annual contract, invoiced). 3. ...the increase will consist mainly of AUTOMATIC payment-failure cancellations, not cancellations requested by the customer.
Conditional 2 does not differentiate well: the redesign effect is also concentrated in small businesses using mobile. Conditional 3 does: the redesign predicts more voluntary cancellations (unhappy customers who cancel), and failed payments predict more automatic cancellations. That is why it is the next step Diego proposes.
Exercise 3
a) An alert was generated (modus ponens). b) Account W did not perform more than two verifications in less than an hour (modus tollens). c) Nothing certain about the verifications: there may be other rules that generate alerts (affirming the consequent would be invalid). And certainly nothing about whether it is an attacker. d) Nothing certain about alerts: not meeting this condition does not prevent another rule from generating an alert (denying the antecedent would be invalid).
Conclusion
Inferring is moving from what we know to what we conclude, and it should not be confused with assuming. Deduction is the form of inference that guarantees its conclusion: an argument is valid if the truth of the premises makes it impossible for the conclusion to be false, and sound if, in addition, the premises are true. The valid forms (modus ponens, modus tollens, hypothetical syllogism, disjunctive syllogism and correct categorical syllogisms) and the invalid ones (affirming the consequent and denying the antecedent) turn up every day in alert rules, requirements and tests. At Nubia, the mobile app test has shown the essential asymmetry: the result keeps the redesign hypothesis alive, but does not prove it, because other hypotheses predict the same thing.
To make progress, the team needs something deduction does not offer: generating hypotheses, generalising from data and choosing the best available explanation. In the next lesson, Inductive and Abductive Reasoning, we will see how to reason with what is probable and plausible, and the Nubia team will put its rival hypotheses on the table and rank them using explicit criteria.
