Before lesson 1Lesson 0 · Optional · 7 min
Probability essentials
Read the first attendance model in plain language.
Know these ideas already? Skip to lesson 1.
Probability is a number from 0 to 1 describing chance under a model: an impossible event has probability 0 and a certain event has probability 1. A chance of 0.72 is 72 out of 100, or 72%. Across many comparable occasions, the attendance fraction should tend towards that chance under the model; exactly 72 of every 100 guests need not attend. Lesson 1 assumes this chance for teaching. It is not a measured attendance rate.
Independent attendance means that learning whether one guest attends does not change another guest’s chance in the model. Several guests can still attend together. Friends travelling together could break that assumption: knowing one is coming may tell you about the other. Independence is a modelling choice to check, not a property guaranteed by sending separate invitations.
For room overflow, one trial must contain the whole event, including every guest decision. Count attendees, then ask whether the count is greater than the seats. Exactly full still fits. A fraction is a part divided by a total: one overflow among four events is 1/4 = 0.25 = 25%. Below, 1 means attends and 0 means absent. Sum adds those guest decisions. These four hand-picked events illustrate counting; they are not random draws from the 72% model.
With two seats, which of these four events overflows?
Write a prediction (optional)
Four invented events · a counting demonstration
Select Run Python below with the code unchanged.
A saved draft is open. To run the published example, open Tools and select Restore example. Recover draft brings your code back.
Execution error
Technical error details
Your result
Published example output
This result comes from the original Python. Your runs appear above. Build environment ↗
INVENTED examples: 1 attends, 0 is absent. Guests: [1, 1, 0] Attendees: 2 Overflows: False Guests: [1, 0, 0] Attendees: 1 Overflows: False Guests: [1, 1, 1] Attendees: 3 Overflows: True Guests: [0, 1, 1] Attendees: 2 Overflows: False Overflow examples: 1 of 4 Illustrative fraction: 0.25 = 25.0 % This is a counting demonstration, not an estimated model probability.
Read the first result
Read Attendees and Overflows in the four rows. Only the three-guest event exceeds two seats. Illustrative fraction describes this hand-picked set of events.
Try an edit
Predict which events will overflow with one seat. In the editor, replace seats = 2 with seats = 1. Select Run Python again. Which rows now say Overflows: True? Compare the two Illustrative fraction values. The guest decisions stay fixed.
Scope. The events are deliberately invented to explain the counting rule. They are neither measured attendance nor a random simulation. Lesson 1 generates many possible events under an explicit probability model.
Try a fresh case
Each of two guests has a 72% attendance chance. They travel together, so learning that one attends changes the other’s chance. What needs revisiting?
Need a hint?
Hint 1
Ask what knowing one guest’s decision tells you about the other.
Hint 2
Independent means that learning one decision does not change the modelled chance of the other.