Signals to learning / 2. Maths for experiments

Lesson 6 of 40 · Beginner · About 20 minutes

Probability and uncertainty

How should several plausible outcomes share one unit of probability?

You will be able to

  • Normalise nonnegative weights into probabilities.
  • Calculate an expected value and distinguish it from a guaranteed outcome.

Weights are not yet probabilities

For mutually exclusive, exhaustive discrete outcomes, probabilities are nonnegative and sum to one. Scores such as [1,2,1] can become probabilities by dividing by their sum. Negative scores need a different mapping; softmax will later turn arbitrary finite logits into positive probabilities.

A weighted average of possible outcomes

Expected value is the sum of each value multiplied by its probability. It need not itself be a possible outcome, and it is not a promise about the next observation. Probability can describe repeated randomness or uncertainty under a model. A model’s confidence is only useful if it reflects outcomes on relevant data.

pᵢ = wᵢ / Σⱼwⱼ; E[X] = Σᵢpᵢxᵢ

Worked example

Weights [1,2,1] give probabilities [0.25,0.5,0.25]. For outcomes [0,1,2], the expected value is 1. A fair die has expectation 3.5 although no face shows 3.5.

A common trap

A 70% prediction does not mean every group of ten cases contains exactly seven positives.

Predict, then experiment

What happens to the probabilities if you multiply all three weights by the same positive number? Before touching the controls, say or write your prediction.

Try it yourself

Share one unit of probability

How do relative weights become probabilities?

Outcomes are 0, 1 and 2. Bars show probabilities after normalisation. Weights are nonnegative; the all-zero case is undefined and reported as such.

Your experiment

Compare weights [1,2,1] and [2,4,2]. Then increase only the weight for outcome 2. Observe both normalisation and expected value.

Change one parameter at a time. Compare what you observed with your prediction and record an explanation in your notes.

Check your understanding

Try from memory first. Hints and feedback are part of learning, not a penalty. These checks are for self-study, not a graded qualification.

1. Multiplying all positive weights by 5 makes the normalised probabilities…
Give me a hint

Compare numerator and denominator.

2. For probabilities [0.25,0.75] and values [0,4], what is the expectation?

Accepted absolute tolerance: ±0.001 .

Give me a hint

Calculate the weighted sum.

Reference answers (after your attempt)
  1. unchanged — Correct: only relative weights matter.
  2. 3 — 0.25×0 + 0.75×4 = 3.

Apply it: Audit a probability claim

Use paper, your notes, or a local notebook/editor. Code examples are Python 3 starting points to run yourself; this page does not execute code or automatically assess the practical task.

  1. Write down an everyday probabilistic claim.
  2. Name the outcomes and the population it concerns.
  3. Explain what evidence would distinguish confidence from calibration.
Reference solution & review criteria

For a rain forecast, define location/time and precipitation threshold. Across many comparable forecasts near 70%, roughly 70% should meet that event definition for calibration; a single day cannot establish it.

Your notebook

Notes and progress stay in this browser. They are not sent to the server; ordinary web-server request logs still operate. Export a backup from the course page.

Review list

Completion requires both correct checks and your practical-task acknowledgement.

Go deeper

Sources support further study; the worked examples and questions here are original. Browser experiments are small, disclosed models—not evidence of production-model quality or hardware performance.