Skip to content
coden

Fuzzy logic and probability: why “somewhat warm” does not mean “probably warm”

Randomness and vagueness, Bezdek’s two bottles, the axioms of probability versus fuzzy membership, the Fréchet bounds, the probability of a fuzzy event on a weather forecast, and words for probability as fuzzy sets.

12 minutes Matěj Žalmánek 2026-10-15

Series AI basics Part 33 of 52
  1. Map of artificial intelligence: what is what and how it all fits together
  2. A brief history of artificial intelligence: from Turing to language models
  3. Data, model, training, inference: the basic terms on a single example
  4. How to read mathematical notation: symbols, indices, sums and quantifiers
  5. Sets and relations: the building blocks of definitions in AI
  6. Functions and mappings: why every AI model is a function
  7. Logic and proofs: the rules AI reasons by
  8. Graphs and trees: the structure that both search and neural networks stand on
  9. Linear algebra for machine learning: vectors, matrices and why AI mostly multiplies
  10. Derivatives, the gradient and the chain rule: how a model finds out which way to learn
  11. Gradient descent: how a model learns
  12. What probability is: from rolling dice to the Kolmogorov axioms
  13. Conditional probability and Bayes’ theorem: how to update your estimate when you learn something new
  14. Random variables and the cumulative distribution function: one function that tells you everything about a distribution
  15. Probability density and probability mass functions: why a continuous variable has zero probability at a point
  16. Expected value, variance and covariance: where a distribution lies, how wide it is and what goes with what
  17. Overview of probability distributions: Bernoulli, binomial, Poisson, uniform, normal and exponential
  18. Law of large numbers and central limit theorem: why averages behave so predictably
  19. Statistics and parameter estimation: maximum likelihood, MAP and confidence intervals
  20. Information theory: entropy, cross-entropy and KL divergence — where loss functions come from
  21. State-space search: BFS, DFS, UCS and A* with animations
  22. Games and adversaries: minimax, alpha-beta pruning and Monte Carlo tree search
  23. Constraint satisfaction: backtracking, constraint propagation and AC-3 on sudoku and a map of Czech regions
  24. Logic and knowledge systems: forward and backward chaining, resolution and expert systems
  25. Planning: STRIPS, the blocks world, heuristics from relaxation and planning in AI agents
  26. Local search and simulated annealing: a travelling salesman through the Czech regional capitals
  27. Genetic algorithms: population, crossover, mutation and selection on a backpack for a hike
  28. Evolution strategies and genetic programming: from the one-fifth rule to Kepler’s law
  29. Ant colony optimization: how a pheromone trail finds a short path
  30. Particle swarm optimisation: inertia, personal experience and the swarm’s experience
  31. Neuroevolution: evolving the weights and shape of neural networks, and the NEAT algorithm
  32. Fuzzy sets and membership functions: how to write down “somewhat warm”
  33. Fuzzy logic and probability: why “somewhat warm” does not mean “probably warm”
  34. Fuzzy logic: t-norms, implications and IF–THEN rules
  35. Fuzzy control: Mamdani and Sugeno from a fan to a pole on a cart
  36. Fuzzy clustering: the fuzzy c-means algorithm and points between clusters
  37. Neuro-fuzzy systems (ANFIS): fuzzy rules that learn from data
  38. Markov chains: the transition matrix, the stationary distribution and PageRank
  39. Hidden Markov models: the Viterbi algorithm and the dishonest casino
  40. Bayesian networks: why the grass is wet and what it means for the sprinkler
  41. The Kalman filter: how to estimate where a car is and how fast it goes from imprecise measurements
  42. Types of machine learning: supervised, unsupervised, semi-supervised and more
  43. Prompts, context and RAG: how to give a model the right information
  44. Variational autoencoders (VAE): new images from a continuous latent space
  45. Generative adversarial networks (GAN): the forger versus the detective
  46. Diffusion models: how pure noise becomes an image
  47. Markov decision processes: states, actions, rewards and the Bellman equations
  48. Q-learning and DQN: learning the value of actions, from a table to a neural network
  49. Policy gradient and PPO: learning the policy directly
  50. How an AI agent works: a language model in a loop with tools
  51. Programming with AI agents: the task, tests and review
  52. Evaluating and securing AI systems: how to measure and how to keep watch

Full series syllabus 52 of 83 topics published

What you will take away
  • What the difference is between uncertainty about an outcome and vagueness of a concept, and why they cannot be swapped.
  • Why fuzzy values combine simply and probabilities do not — and what the Fréchet bounds say.
  • How to combine both uncertainties: the probability of a fuzzy event and words such as “probably”.

Useful to know first: Fuzzy sets and membership functions: how to write down “somewhat warm”, What probability is: from rolling dice to the Kolmogorov axioms

“Tomorrow will be somewhat warm.” “Tomorrow will probably be warm.” Both sentences contain uncertainty, and both can be expressed as a number between zero and one. Yet they say something completely different. The first is about how much the weather will resemble the word “warm”; the second is about whether something will happen that we do not know yet. Mixing up these two kinds of uncertainty led to one of the most heated disputes in the history of artificial intelligence — and it is still a common mistake.

It builds on the articles Fuzzy sets and membership functions and What probability is.

1. Two kinds of uncertainty

Definition — randomness and vagueness

We distinguish two kinds of uncertainty, both of which are expressed by a number from [0, 1]:

  1. Randomness (uncertainty about the outcome). Let (Ω, 𝓕, P) be a probability space (What probability is) and A ∈ 𝓕 a (crisp) event. For every outcome ω ∈ Ω either ω ∈ A or ω ∉ A; the only uncertain thing is which outcome ω occurs. This uncertainty is measured by the number P(A) ∈ [0, 1].
  2. Vagueness (imprecision of a concept). Let X be a non-empty set, A a fuzzy set on X (Fuzzy sets) and x ∈ X an element we know exactly. What is uncertain is not which element we have, but how well it fits the loosely defined concept A. This imprecision is measured by the degree of membership μA(x) ∈ [0, 1].

So randomness disappears as soon as we learn the outcome ω; vagueness remains even when we know the element x completely.

In plain words

With randomness we are missing information: we roll a die and do not know what comes up. Once we look, the uncertainty is gone. With vagueness nothing is missing: we know the temperature of 25 °C exactly, the word “warm” just fits it halfway. And looking at the thermometer changes nothing — the word stays just as fuzzy.

2. Two bottles

The difference is shown nicely by an example from James Bezdek. You are in the desert and you are thirsty. In front of you are two bottles. The first one says: “Membership in the set of drinkable liquids is 0.91.” The second: “The probability that the liquid is drinkable is 0.91.” Which one do you drink from?

fuzzy: μ = 0.91 probability: P = 0.91 0.910.91 membershipprobability before opening 0.911 / 0 muddy waterclean water · or poison after opening
Bezdek’s bottles before and after opening

The first bottle contains something that is almost drinkable — say, slightly muddy water. It is guaranteed not to harm you much. The second contains clean water with probability 0.91, but in nine cases out of a hundred something completely different, say poison. After opening, the difference shows in the numbers too: the membership of the first bottle stays 0.91, because we learn nothing new. The probability for the second jumps to 1 or to 0 — the random event either happened or it did not.

3. What the axioms say

Reminder — the Kolmogorov axioms

Let Ω be the sample space and 𝓕 the system of events (a σ-algebra of subsets of Ω, see What probability is); for A ∈ 𝓕, ¬A = Ω ∖ A denotes the complementary event. Probability is a function P : 𝓕 → ℝ that satisfies

  1. non-negativity: P(A) ≥ 0 for every A ∈ 𝓕;
  2. normalization: P(Ω) = 1;
  3. additivity: for mutually exclusive events A1, A2, … ∈ 𝓕 (Ai ∩ Aj = ∅ for i ≠ j), P(⋃i Ai) = ∑i P(Ai); in particular, for two mutually exclusive events A, B ∈ 𝓕, P(A ∪ B) = P(A) + P(B).

It follows that for every A ∈ 𝓕, P(A) + P(¬A) = 1 and P(A ∩ ¬A) = 0.

Derivation. The events A and ¬A are mutually exclusive and together make up Ω, so by additivity P(A) + P(¬A) = P(Ω) = 1. The intersection A ∩ ¬A is the empty event ∅; it is mutually exclusive with itself, so P(∅) = P(∅ ∪ ∅) = 2 P(∅), which is only possible for P(∅) = 0. ∎

In plain words

Probability is a “budget” that is split among the possible outcomes and always adds up to one. Whatever you give to one outcome, you have to take away from another.

A membership function has no such budget. In the previous article 25 °C was “pleasant” to degree 0.6 and “warm” to degree 0.5 — 1.1 in total, and that is fine. The table sums up the differences:

ProbabilityFuzzy membership
What it describeswhether an event happenshow well an element fits a concept
After observationbecomes 0 or 1stays the same
Sum over the optionsalways 1arbitrary
A and at the same time not Aalways 0up to 0.5
A or not Aalways 1at least 0.5
Value of “A and B”depends on how A and B are relatedmin(μA, μB)

Where do the numbers 0.5 in the table come from? Fuzzy “and” is the minimum here, “or” the maximum and “not” the complement 1 − μ, as in the article on fuzzy sets.

Theorem — “A and not A” and “A or not A” in fuzzy sets

Let X be a non-empty set, A a fuzzy set on X, x ∈ X and a = μA(x) ∈ [0, 1]. With the Zadeh operations (intersection = min, union = max, complement 1 − μ), μA ∩ ¬A(x) = min(a, 1 − a) and μA ∪ ¬A(x) = max(a, 1 − a). Then

min(a, 1 − a) ≤ 0.5 ≤ max(a, 1 − a)

and equality holds in either of the two inequalities if and only if a = 0.5.

Proof. The numbers a and 1 − a add up to 1, so the smaller one is at most half of the sum and the larger one at least half. Both equal 0.5 only when they are equal to each other, that is, for a = 0.5. ∎

Example. At 25 °C, “warm” holds to degree 0.5. Then “warm and not warm” = min(0.5, 0.5) = 0.5 and “warm or not warm” = max(0.5, 0.5) = 0.5 — the classical law of non-contradiction would want 0, the law of the excluded middle 1. With probability, “it will be at least 25 °C and it will not be at least 25 °C” would always have probability 0.

4. Combining: who needs more information

The last row of the table is perhaps the most important. Fuzzy logic is truth-functional: the value of “A and B” is computed from the values of A and B alone. With probability this is impossible.

Definition — truth-functionality

Let 𝒱 be a set of statements such that for all A, B ∈ 𝒱 also “A and B” ∈ 𝒱, and let h : 𝒱 → [0, 1] assign each statement its value (a degree of truth, or a probability). The connective “and” is truth-functional with respect to h if and only if

∃ g : [0, 1]2 → [0, 1]   ∀ A, B ∈ 𝒱 :   h(A and B) = g(h(A), h(B)).

So the value of a compound statement depends only on the values of its parts, and by the same function g for all pairs of statements. In fuzzy logic g = min (or another t-norm, see Fuzzy logic); for probability, 𝒱 = 𝓕, h = P and “A and B” = A ∩ B.

In plain words

Two numbers are enough and the result is clear — there is no need to know what the statements are about or how they are related.

Example — why probability is not truth-functional

We roll a die once. The event A = “an even number comes up” = {2, 4, 6} has P(A) = 3/6 = 1/2. Take three events B, all with probability 1/2:

  • B = {2, 4, 6} (even): A ∩ B = {2, 4, 6}, P = 3/6 = 1/2,
  • B = {4, 5, 6} (at least 4): A ∩ B = {4, 6}, P = 2/6 = 1/3,
  • B = {1, 3, 5} (odd): A ∩ B = ∅, P = 0.

The inputs are the same every time (1/2 and 1/2), the results are three different ones. No function g can give 1/2, 1/3 and 0 from (1/2, 1/2) at the same time.

Theorem — the Fréchet bounds

Let (Ω, 𝓕, P) be a probability space and A, B ∈ 𝓕 arbitrary events. Then

max(0, P(A) + P(B) − 1) ≤ P(A ∩ B) ≤ min(P(A), P(B)).

Both bounds are the best possible: for all a, b ∈ [0, 1] there are events with P(A) = a, P(B) = b for which equality holds in the upper or in the lower bound respectively (for example a random number from [0, 1] with the uniform distribution, A = [0, a] and B = [0, b], or B = [1 − b, 1] respectively). From the numbers P(A) and P(B) alone, P(A ∩ B) therefore cannot be determined more precisely.

Proof. Upper bound: A ∩ B ⊆ A, so P(A ∩ B) ≤ P(A), and likewise ≤ P(B). Lower bound: from the formula for the union, P(A ∩ B) = P(A) + P(B) − P(A ∪ B), and from P(A ∪ B) ≤ 1 it follows that P(A ∩ B) ≥ P(A) + P(B) − 1; non-negativity supplies the 0. The upper bound is attained when one event lies entirely inside the other (A ⊆ B); the lower one when the events overlap as little as possible — if they are not mutually exclusive, together they cover the whole of Ω. ∎

In plain words

It rains with probability 0.7 and it is windy with probability 0.6. What is the probability that it rains and is windy at the same time? Anywhere between 0.7 + 0.6 − 1 = 0.3 and min(0.7, 0.6) = 0.6 (colours as in the formula below) — depending on whether rain and wind go together (then 0.6) or rather exclude each other (then 0.3). Without further information we do not know. The fuzzy minimum 0.6 is exactly the upper bound — it corresponds to the situation where both events are “as much together as possible”. And the lower bound max(0, a + b − 1) is a different fuzzy operation, which we will meet in the article on fuzzy logic.

max(0, P(A) + P(B) − 1) ≤ P(A ∩ B) ≤ min(P(A), P(B))

P(A ∩ B)
the probability that both events happen — what we would like to know, but cannot get from two numbers
max(0, P(A) + P(B) − 1)
lower bound — two probabilities that add up to more than 1 cannot fit into the whole without overlapping; the excess over one must overlap. The zero is there because when there is no excess, the overlap can be missing entirely
min(P(A), P(B))
upper bound — both events together cannot happen more often than the rarer of them
Fuzzy “and” picks one number from this interval without asking — the minimum is exactly the upper bound.

Every assumption about how the events are related gives one number from the interval — and each corresponds to one fuzzy “and” (t-norm) from the article on fuzzy logic (colours as in the formula above):

How rain and wind are relatedP(rain ∩ wind)CalculationFuzzy “and”
as much together as possible0.60min(0.7, 0.6)minimum
independent0.420.7 · 0.6product
as much against each other as possible0.30max(0, 0.7 + 0.6 − 1)Łukasiewicz

This leads to a practical difference. A fuzzy system is easy and fast to compute, but it silently assumes one particular relationship between the concepts. A probabilistic model has to specify the relationships explicitly — or learn them from data — and in return it gets results that match frequencies in the real world.

5. Probability of a fuzzy event

The two uncertainties do not exclude each other, though — they often show up together. “What is the probability that it will be warm tomorrow?” contains chance (what the temperature will be) as well as vagueness (what “warm” is).

Definition — probability of a fuzzy event (Zadeh, 1968)

Let X be a continuous random variable with values in ℝ and with density f : ℝ → [0, ∞), and let A be a fuzzy set on ℝ with a (measurable) membership function μA : ℝ → [0, 1]. The probability of the fuzzy event A is the number

P(A) = E[μA(X)] = ∫−∞∞ μA(x) f(x) dx ∈ [0, 1],

where E is the expected value. So it is the average membership that the random value X has in A.

If A is crisp (μA = χB for a set B ⊆ ℝ), then P(A) = P(X ∈ B) — the ordinary probability. If X takes only the values x1, …, xn ∈ ℝ with probabilities pi = P(X = xi) (pi ≥ 0, ∑i=1n pi = 1), the integral is replaced by a sum: P(A) = ∑i=1n μA(xi) pi.

In plain words

You weigh every possible temperature by how probable it is, and at the same time by how much it is “warm”. A temperature of 28 °C counts in full, 25 °C only by half, 20 °C not at all.

P(A) = ∫ μA(x) · f(x) dx

P(A)
probability of the fuzzy event — a single number that carries both uncertainties at once
f(x)
density of the forecast — randomness: how probable the temperature x is (the grey curve in the figure)
μA(x)
membership — vagueness: how much of the temperature x is “warm”; instead of a crisp “counts / does not count”, every temperature counts only by its share (amber in the figure)
∫ … dx
summing over all temperatures — as with ordinary probability, except that what is summed is not the whole density but the density weighted by membership; the result is the filled area in the figure
For μA with only the values 0 and 1, the integral becomes the area under the density over the set A — ordinary probability.

The forecast says that tomorrow’s temperature is normally distributed with mean 24 °C and standard deviation 3 °C. “Warm” is the triangle (22, 28, 34) from the previous article:

00.51 0.000.050.10 0510152025303540 temperature T (°C) forecast density (1/°C) membership μ (0–1)
Temperature forecast, the “warm” function and their product forecast density μ warm (right axis) P(warm): 0.367 P(at least 25 °C): 0.369
Example — the integral as a sum in steps of one degree

The colours correspond to the terms of the formula above. The density of the normal distribution with mean m = 24 and standard deviation σ = 3 is f(x) = 1/σ√2π · exp(−(x − m)2/2σ2). Membership in the triangle (22, 28, 34) on the rising side is x − 22/28 − 22. For 25 °C:

f(25) = 1/3 · 2.5066 · exp(−1/18) = 0.1330 · 0.9460 = 0.1258

μ(25) = 25 − 22/28 − 22 = 3/6 = 0.5

contribution: 0.5 · 0.1258 = 0.0629 per degree

Outside the interval (22, 34), μ = 0, so it is enough to add up the contributions of the whole degrees from 23 to 33 (each times a width of 1 °C):

x (°C)2324252627282930313233
μ(x)0.170.330.500.670.831.000.830.670.500.330.17
f(x)0.1260.1330.1260.1060.0810.0550.0330.0180.0090.0040.001
μ · f0.0210.0440.0630.0710.0670.0550.0280.0120.0040.0010.000

The sum of the last row is P(A) ≈ 0.367 — even with such a coarse step, the same as the exact integral. The largest contributions do not come from the warmest days (28 °C is fully “warm”, but unlikely), nor from the most probable ones (24 °C is “warm” only to one third), but from 25–28 °C, where both numbers are reasonably large.

The probability of the fuzzy event “it will be warm” comes out at 0.367 — almost the same as the probability of the crisp event “it will be at least 25 °C” (0.369). That is a coincidence of this forecast. When we shift the forecast, they part ways:

Forecast (mean)P(at least 25 °C)P(warm)
20 °C0.0480.074
22 °C0.1590.191
24 °C0.3690.367
25 °C0.5000.459
28 °C0.8410.610

With a cold forecast the fuzzy event gives more, because it also counts the “somewhat warm” days below 25 °C. With a forecast of 28 °C, on the other hand, it gives considerably less: the crisp event “at least 25 °C” confidently includes 33 °C as well, but according to our linguistic variable that is no longer “warm”, but “hot”. The fuzzy event sticks to what the word really means.

6. Words for probability

In a 1964 article, Sherman Kent, a CIA analyst, described how intelligence reports are full of words like “probably” or “almost certainly” — and how every reader imagines a different number behind them. He proposed a table: “almost certain” around 93%, “probable” around 75%, “chances about even” around 50%, “probably not” around 30% and “almost certainly not” around 7%, always with a range. Here the two uncertainties meet perfectly: words for probability are fuzzy sets on probabilities.

01 0%10%20%30%40%50%60%70%80%90%100% almost certainly not probably not about even probably almost certainly probability P (%) membership of the word μ (0–1)
Words for probability as fuzzy sets
Example — which word fits a given probability

The words are triangles around Kent’s values: “probably” is (0.6, 0.75, 0.9), “probably not” (0.18, 0.3, 0.42), “about even” (0.38, 0.5, 0.62). The widths of the triangles are our choice for illustration, not Kent’s table. On the falling side of the triangle (a, b, c), μ(p) = c − p/c − b; on the rising side, p − a/b − a.

  • p = 0.8: μprobably = 0.9 − 0.8/0.9 − 0.75 = 0.1/0.15 = 0.67; the other words are zero at 0.8.
  • p = 0.37: μprobably not = 0.42 − 0.37/0.42 − 0.3 = 0.05/0.12 = 0.42; “about even” only starts at 0.38, so it has 0.00.

The best fit is the word with the largest membership: word(p) = argmaxs μs(p).

A probability of 0.8 is “probably” to two thirds; the 0.37 from our forecast is best described by “probably not”. Today, for example, the Intergovernmental Panel on Climate Change (IPCC) works in a similar way: “likely” means 66–100% and “very likely” 90–100%, so that the words in its reports do not invite a different reading.

7. The dispute over uncertainty

In the 1980s a dispute flared up that is captured by two voices. The statistician Dennis Lindley argued that the only sensible description of uncertainty is probability — and that everything fuzzy logic does, probability does better. Bart Kosko, on the contrary, argued that probability is just a special case of vagueness. Both had a point. For decision-making under uncertainty, learning from data and betting, probability has strong theoretical support: anyone who bets according to numbers other than probabilities can be offered a series of bets on which they are certain to lose. For working with vague words, hand-written rules and simple control, fuzzy sets are more natural and easier to understand. Today both theories are used side by side, each for what suits it.

Example — bets you are certain to lose

The argument was formulated by Bruno de Finetti (1931, and independently of him by Frank Ramsey in 1926); here in a simplified form. Anyone who assigns an event A a “degree of belief” q(A) is willing to buy, for q(A) euros, a bet that pays 1 euro if A happens.

A bettor believes that it will rain tomorrow to degree 0.6, and that it will not rain, also to degree 0.6 — 1.2 in total, contradicting P(A) + P(¬A) = 1. We sell him both bets:

  • he pays 0.6 + 0.6 = €1.20,
  • whatever the weather turns out to be, exactly one of the events happens, so he gets back exactly €1,
  • he loses 1.2 − 1 = €0.20 — with certainty, regardless of the weather.

If the numbers added up to less than 1 (say 0.4 + 0.4), we would instead buy the bets from him for 0.8 and pay out 1 — again he loses 0.2. Only a sum of exactly 1 is safe. In a similar way one can show that protection against a sure loss requires all the Kolmogorov axioms (for finitely many events). Fuzzy memberships do not sum to 1 — and that is not a flaw, because they are not bets on what will happen.

8. Both uncertainties in artificial intelligence

  • Machine learning is mostly probabilistic. Classifiers and language models return probability distributions; they learn by maximising likelihood, as the articles on statistics and information theory showed.
  • Calibration. When a model claims 90%, it should be right in nine cases out of ten. Calibration is a purely probabilistic property, and it can be measured.
  • Confidence in words. Language models often express confidence in words — “probably”, “most likely”, “perhaps”. Kent’s reasoning helps here: a word is a fuzzy set on probabilities, and if verbal confidence is to be useful, it must match the numbers behind it.
  • Fuzzy rules are still used where manual, readable control is needed without a lot of data — from washing machines to industrial process control.

9. Summary

  • Probability describes randomness — whether an event happens; fuzzy membership describes vagueness — how well an element fits a concept.
  • After observation, probability becomes 0 or 1, while membership stays the same (Bezdek’s bottles).
  • Probabilities add up to one and P(A ∩ ¬A) = 0; memberships do not.
  • Fuzzy logic is truth-functional; with probability, P(A ∩ B) only lies between the Fréchet bounds, and the fuzzy minimum is the upper one.
  • The two uncertainties can be combined: the probability of the fuzzy event “it will be warm” is the expected value of the membership; words for probability are fuzzy sets on probabilities.

Want to get a feel for it? Ask a few people what percentage they imagine behind “probably” and “most likely not”, and have an AI agent draw membership functions from their answers.

Do you see it differently? Write to support@coden-app.com.

An Agent on your computer, driven from your phone