Skip to content
Tutorials Center
My learning

Topics

Lesson 4 of 36 ยท Getting Started

Fuzzy Logic vs Probability

Understand the difference between fuzziness and randomness: membership degrees measure vagueness, probabilities measure uncertainty. Compare them with runnable Python examples.

The most common beginner question about fuzzy logic is: "Isn't 0.7 just a probability?" It looks like one, since both live between 0 and 1, but the two numbers answer completely different questions. Mixing them up leads to wrong models, so this lesson settles the matter with a clear rule and two experiments you can run.

The short version: probability measures uncertainty about a fact; membership measures vagueness in a concept.

Two kinds of "not sure"

Imagine a glass of water.

  • Uncertainty (probability). The glass either contains poison or it does not. You simply do not know which, and you estimate a 70 % chance that it is poisoned. Once someone tests it, the question is settled: the water is poisoned or it is not.
  • Vagueness (fuzziness). The glass contains water at 27 ยฐC. Is it "warm"? There is nothing left to find out. You know everything about the water, and the answer is still "warm to degree 0.7", because "warm" is a gradual concept.

So the probability describes your ignorance, and the membership degree describes a property of the concept. More information can remove the first and never the second.

Probability Fuzzy membership
Question Will the statement turn out true? How well does the object fit the concept?
Source Randomness, missing knowledge Vague, gradual categories
After full information Collapses to 0 or 1 Stays as it is
Values must add up to 1 over all cases Yes No
Typical tool Statistics, Bayes Fuzzy rules, controllers

Experiment 1: information changes probability, not membership

We simulate a few bottles. Each has a "chance of being poisoned" (a probability) and a "degree of being drinkable water" (a membership). Then we open the bottles: the probability resolves into yes or no, while the fuzzy degree does not change at all.

Python Opening the bottle

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Each opened bottle forces the probability to 0 or 1, because the uncertainty has been removed. The cloudy water, however, remains "clean to degree 0.7" no matter how much you learn, because the vagueness is in the word "clean".

Experiment 2: the arithmetic is different

Probability and fuzzy logic also combine values differently. For two independent events, the probability that both happen is the product P(A) * P(B). The standard fuzzy AND is the minimum. They give different results, and neither is a mistake, because they measure different things.

Python AND under both rules

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

In the weather example the three probabilities must add up to 1, because exactly one outcome will happen. At 24 ยฐC, the temperature is "cool" to degree 0.5 and "warm" to degree 1, and the total is 1.5. Nothing is wrong: an object can fit two neighbouring concepts well at the same time, and memberships have no normalisation rule. (Some fuzzy systems deliberately use sets that add to 1, which is called a fuzzy partition, but it is a design choice.)

They can work together

The choice is not "either or". Real systems often need both:

  • A medical system may use fuzzy sets to describe "slightly elevated blood pressure" and probabilities to express how likely a diagnosis is given the evidence.
  • The probability of a fuzzy event ("tomorrow will be very cold") can be computed by averaging a membership function over a probability distribution. Zadeh defined this as early as 1968.
  • Some expert systems attach a certainty factor to each rule to express uncertainty; they combine it with fuzzy terms in the rule's conditions. Later chapters of the track return to this topic.

A quick test. Ask yourself: "If I could learn every fact about this situation, would the number change?" If yes, it is a probability. If the number would stay, because the word itself is gradual, it is a fuzzy membership.

flowchart TD
    Q["Statement with a number in [0, 1]"] --> T{"Would complete<br/>information change it?"}
    T -->|"Yes, it resolves to 0 or 1"| P["Probability<br/>(uncertainty)"]
    T -->|"No, the concept is gradual"| F["Membership degree<br/>(vagueness)"]

A decision aid for telling the two kinds of number apart.

Common mistakes

  • Reading a membership degree as a "chance of being in the set".
  • Normalising memberships so that they sum to 1 because "probabilities do".
  • Using fuzzy AND (min) for independent random events where the product rule is correct.
  • Believing fuzzy logic is a trick to avoid statistics. The two fields solve different problems.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. A glass of water at 27 degrees is "warm" to degree 0.7. What kind of number is 0.7?

    The temperature is known exactly; what is gradual is the word warm. That is vagueness, expressed as a membership degree.
  2. 2. What happens to a probability when you gain full information about the event?

    Probability models ignorance. Once the outcome is known, it is 0 or 1. A fuzzy membership does not change when you learn more.
  3. 3. For independent events with P(A) = 0.8 and P(B) = 0.5, what is P(A and B)?

    For independent events, probabilities multiply: 0.8 * 0.5 = 0.4. The fuzzy minimum would give 0.5, a different quantity.
  4. 4. Must the membership degrees of one object in different fuzzy sets sum to 1?

    Memberships are not normalised in general. A temperature can be fairly cool and fairly warm at once.

Summary

  • Probability measures uncertainty about facts; membership measures vagueness of concepts.
  • More information collapses a probability to 0 or 1 but never changes a membership degree.
  • Probabilities over all outcomes sum to 1; memberships do not have to.
  • The usual operators differ: product for independent probabilities, min/max in standard fuzzy logic.
  • The two ideas complement each other and can be combined in one system.

Next: Fuzzy Sets and Membership