Flip once yourself, or press Play to run many trials
Controls
Experiment
Readings
- Total trials
- 0
- Last outcome
- —
- Average gap from theory
- 0.500
- Heads
- 0.000 / 0.500
- Tails
- 0.000 / 0.500
How to use this simulation
- Start on "Coin flip" and press the roll button once — it shows heads or tails, and both the count on the left and the bar on the right grow together.
- Press Play to run many flips, and raise the rolls-per-second slider to go faster. Watch the experimental bar creep steadily toward the theoretical 0.5 line.
- Switch to "Sum of two dice" and change the target sum — the grid lights up every one of the 36 cells that adds up to it.
- In "Drawing balls from a bag", change the red/blue/green counts and watch the theoretical (outlined) bars jump instantly, even before a single ball has been drawn.
- After many trials, watch the "Average gap from theory" reading — it keeps shrinking, which is the law of large numbers happening in front of you.
What happens if you flip a coin a hundred times
Flip a coin once and there is no way to say for certain whether it lands heads or tails. Flip it a hundred times, though, and you can confidently predict close to 50 heads — and flip it ten thousand times and that prediction gets sharper still. Even a genuinely random event settles into a pattern once the numbers get big enough, and that pattern is exactly what probability studies.
Casinos, insurance companies and weather services all run on this one fact. Nobody can say what happens to a single customer, but the average behaviour of millions of them can be predicted with remarkable precision. Press Play in the simulation above and watch, with your own eyes, how something genuinely random still drifts toward a fixed number.
We use the word "probably" constantly in everyday speech without ever pinning it to a number — "it will probably rain today", "there's a good chance of passing the exam", "that team is unlikely to win". Mathematical probability takes that same everyday intuition and ties it to a precise number, so two different chances can actually be compared instead of just being called "more" or "less" likely.
From zero: trials, outcomes and the sample space
A random experiment is any process whose result cannot be predicted for certain in advance, even though every possible result is known ahead of time — flipping a coin or rolling a die, for instance. Each possible result is called an outcome, and the complete set of every outcome is the sample space, written S. A coin's sample space is S = {H, T}; a die's is S = {1, 2, 3, 4, 5, 6}.
Any subset of the sample space that we care about is called an event (E) — "rolling an even number" is an event, containing the outcomes {2, 4, 6}. The outcomes that make an event true are its favourable outcomes.
If every outcome in the sample space is equally likely to happen — a fair coin or a fair die, for example — the outcomes are called equally likely, and the simplest formula applies directly: favourable outcomes divided by total outcomes.
Probability always sits between 0 and 1. A value of 0 means the event is impossible; 1 means it is certain. It can never come out negative, and it can never come out bigger than 1 — if a calculation lands outside that range, something in the working has gone wrong.
The vocabulary, before the formulas
A quick glossary before the formulas below.
| Term | Symbol | Plain-English meaning | Range |
|---|---|---|---|
| Trial | — | One run of the random experiment — one coin flip, one die roll | — |
| Outcome | — | What actually happens at the end of one trial — heads, or a 4 | — |
| Sample space | S | The complete set of every possible outcome | — |
| Event | E | A subset of the sample space we care about measuring — "an even number", say | — |
| Favourable outcome | n(E) | An outcome that makes the event true | — |
| Equally likely | — | Every outcome has the same chance of occurring, as on a fair die | — |
| Theoretical probability | P(E) | Worked out by reasoning alone, before any experiment is run | 0–1 |
| Experimental (empirical) probability | — | The rate actually observed over many trials — favourable outcomes ÷ total trials | 0–1 |
The formulas: from theoretical to experimental
The classical formula for equally likely outcomes carries most of the weight in this topic. Two more rules and one real-world definition round it out.
P(E) = n(E) / n(S)Theoretical probability — for equally likely outcomes
P(E) + P(not E) = 1The complement rule: the chance E does not happen is 1 − P(E)
P(A or B) = P(A) + P(B)When A and B are mutually exclusive (they cannot both happen in the same trial, like heads and tails at once)
P(A and B) = P(A) × P(B)When A and B are independent (one outcome does not affect the other)
Experimental P(E) ≈ favourable outcomes / total trialsApproaches the theoretical P(E) as trials grow — the law of large numbers
Mutually exclusive vs independent — two different ideas that get mixed up
Mutually exclusive means two events cannot both happen in the same trial — rolling a 2 and a 5 on the same die at once is impossible, so those two events are mutually exclusive. Their "or" probability is then just the sum of the two.
Independent is a completely different idea: two separate experiments (a coin and a die, say) are run, and the result of one has no bearing whatsoever on the other. Their "and" probability is then the product of the two. Reaching for multiplication where addition belongs, or the reverse, is one of the most common slips in this topic.
Try this in the simulation
Work through each of these before the solved problems below.
1. See the law of large numbers with a coin
A handful of "Roll once" presses can look lopsided — three heads in a row is entirely normal. Press Play for a few hundred flips instead, and watch "Average gap from theory" steadily shrink.
2. Count outcomes from the two-dice grid
With the target sum set to 7, count the highlighted cells in the grid — exactly 6, because 6 of the 36 equally likely pairs add up to 7. Set it to 2 or 12 instead, and only one lonely corner cell lights up.
3. Change the bag and watch the theory move instantly
Raise the red-ball count and the theoretical (outlined) red bar grows immediately, before a single ball has been drawn. That is the difference between reasoning about probability and observing it.
4. Speed up to converge faster
Push the rolls-per-second slider up, and thousands of trials pile up within a few seconds — the two bars for every outcome settle to nearly the same height.
Solved problems
Nine problems, spanning a coin, a die, two dice, a bag of balls and real recorded data. Every number here is computed by the page's own code.
Problem 1 (a coin): a coin is flipped once — find the probability of heads
Sample space S = {H, T}, so n(S) = 2. The favourable outcome is {H}, n(E) = 1. So P(heads) = 1 ÷ 2 = 0.500.
Problem 2 (a die): a die is rolled once — find the probability of (a) exactly a 4, (b) an even number, (c) a number greater than 4
(a) n(S) = 6, the favourable outcome is {4}, so P = 1 ÷ 6 = 0.167.
(b) An even number is {2, 4, 6}, n(E) = 3, so P = 3 ÷ 6 = 0.500.
(c) Greater than 4 means {5, 6}, n(E) = 2, so P = 2 ÷ 6 = 0.333.
Problem 3 (two dice, the simulation's default): two dice are rolled together — find the probability the sum is exactly 7
There are n(S) = 6 × 6 = 36 equally likely pairs. The pairs summing to 7 are (1,6),(2,5),(3,4),(4,3),(5,2),(6,1) — 6 of them. So P = 6 ÷ 36 = 0.167, the single most likely sum of all eleven possible ones.
Problem 4 (two dice): find the probability the sum is a multiple of 3 (that is, 3, 6, 9 or 12)
Sum 3 has 2 pairs, 6 has 5, 9 has 4, and 12 has 1 — 12 pairs in total. So P = 12 ÷ 36 = 0.333.
Problem 5 (a bag, the simulation's default): a bag holds 3 red, 2 blue and 1 green balls; find the probability of drawing a red ball, and of drawing something other than blue
Total balls n(S) = 6. P(red) = 3 ÷ 6 = 0.500.
Not blue means red or green, 4 favourable balls. P(not blue) = 4 ÷ 6 = 0.667 — the same answer the complement rule gives: 1 − P(blue) = 1 − (2÷6).
Problem 6 (a bag, drawn without replacement): from the same bag, one ball is drawn and not put back, then a second is drawn — find the probability both are red
The first draw gives P(red) = 3 ÷ 6. Without replacement, the bag now holds 5 balls, 2 of them red, so the second draw gives P(red again) = 2 ÷ 5.
The probability of both happening is (3÷6) × (2÷5) = 0.200. Drawing with replacement, as the simulation does, would have kept the second draw at 3÷6 too — that gap is the whole difference between the two kinds of drawing.
Problem 7 (the complement rule): a die is rolled — find the probability of not rolling a 6
P(rolling a 6) = 1 ÷ 6. So P(not rolling a 6) = 1 − (1÷6) = 0.833.
Problem 8 (independent events): a coin and a die are rolled together — find the probability of getting heads and a 6
The coin's result has no effect on the die's, so the two events are independent. P(heads and 6) = P(heads) × P(6) = (1÷2) × (1÷6) = 0.083.
Bonus problem 9 (experimental probability): a factory tests 500 bulbs and finds 15 defective — estimate the probability a bulb is defective
There is no equally-likely sample space to reason about here, so the classical formula does not apply — this needs the experimental definition instead: P(defective) ≈ number defective ÷ number tested = 15 ÷ 500 = 0.030 (that is, 3.0%).
Testing more bulbs would make this estimate more reliable — exactly what happens when you raise the trial count in the simulation.
Common mistakes
Most marks lost in probability come from miscounting or misreading wording, not from misunderstanding the idea.
- Applying the simple formula to outcomes that are not equally likely — assuming every face of a biased die, or every side of a lopsided coin, has the same chance.
- Miscounting the sample space — treating (1,2) and (2,1) as the same outcome when rolling two dice, when they are two distinct outcomes.
- Confusing drawing with replacement and drawing without replacement — always check first whether the total shrinks on the second draw.
- Writing a probability bigger than 1, as if it were a percentage without dividing by 100, or writing a fraction upside down.
- Forgetting the complement rule and trying to recount "not happening" from scratch, when 1 − P(E) already gives the answer.
- Applying the independent-events multiplication rule to events that are actually dependent, such as two draws from a bag without replacement.
Real-life uses
Probability quietly drives decisions well beyond the exam hall.
- Weather forecasting: a "70% chance of rain" means that on roughly 70% of past days with the same atmospheric conditions, it rained — a direct application of experimental probability.
- Insurance: premiums are set from statistics on how long people of a given age typically live.
- Factory quality control: testing a sample of thousands of items to estimate the defect rate of an entire batch — exactly bonus problem 9.
- Medicine: how likely a drug is to work is measured by trialling it across groups of patients.
- Genetics: the chance a child inherits a particular eye colour or blood type from their parents' genes is a probability calculation.
- Games and gambling: every casino game and lottery is designed so that, over the long run, the odds favour the house by exactly the law of large numbers.
Exam corner
On NCERT/CBSE boards (class 10, "Probability"), expect direct classical-probability questions on a coin, die or a deck of cards, plus a longer, multi-part question built around a bag of coloured objects or two dice.
Later, in class 11 ("Probability" again, with a wider toolkit), the same sample-space thinking extends to permutations and combinations for counting larger sample spaces — get comfortable counting n(S) and n(E) by hand now.
Full marks need the sample space S and the event E written out explicitly, with n(S) and n(E) clearly shown, before the final fraction — a bare final answer with no working loses the method marks even when it is numerically correct.
One-screen revision
A last look before the exam.
| Situation | Formula | Example |
|---|---|---|
| Equally likely outcomes | P(E) = n(E) / n(S) | P(heads) = 0.500 |
| Complementary event | P(not E) = 1 − P(E) | P(not 6) = 0.833 |
| Independent events (and) | P(A and B) = P(A) × P(B) | P(heads and 6) = 0.083 |
| Experimental probability | P(E) ≈ occurrences / total trials | 15/500 = 0.030 |
Frequently asked questions
What is probability?
Probability is a number between 0 (never happens) and 1 (always happens) that measures how likely an event is.
What is a sample space?
The complete set of every possible outcome of a random experiment, written S. A coin's sample space is {H, T}; a die's is {1, 2, 3, 4, 5, 6}.
What is the difference between theoretical and experimental probability?
Theoretical probability is worked out by reasoning alone, using P(E) = n(E)/n(S), without running any experiment. Experimental probability is the rate actually observed over many trials. As trials increase, the experimental value gets closer to the theoretical one.
What does the law of large numbers say?
The more times a random experiment is repeated, the closer the experimental probability tends to get to the theoretical probability. A small number of trials can easily look uneven.
Can probability ever be negative or greater than 1?
No. Probability always lies between 0 and 1. If a calculation produces a value outside that range, something in the formula or the counting has gone wrong.
Why is 7 the most likely sum when rolling two dice?
Because out of 36 equally likely pairs, 6 of them add up to 7 — more than for any other sum. A sum of 2 or 12, by contrast, has only one pair each that can produce it.
Why does it matter whether a ball is put back before the next draw?
Drawing with replacement keeps the bag's total the same for every draw, so each draw's probability stays fixed. Drawing without replacement shrinks the total each time, so the next draw's probability changes.
When are two events called independent?
When the outcome of one has no effect at all on the probability of the other — flipping a coin and rolling a die together, for instance. The probability of both happening is then simply the product of the two.
What does "Average gap from theory" show in the simulation?
It is the average difference between each outcome's experimental frequency and its theoretical probability. Watching that number shrink as trials pile up is the law of large numbers, seen directly.
How does the formula change for drawing a card from a deck?
The principle stays exactly the same — only the sample space changes. A standard deck has n(S) = 52. Drawing a king, for instance, gives P = 4 ÷ 52 = 1/13, since there is one king in each of the four suits.
Can two events be both mutually exclusive and independent at the same time?
Generally not, unless one of them has zero probability. Mutually exclusive means one happening rules the other out entirely, while independent means one happening or not has no effect on the other's probability — those two conditions can only both hold if at least one event never happens at all.
Keep studying this topic
The animation made the idea click; now turn it into marks. Syllabus, suggestions, textbooks and admission-test guides are below.
Textbook
Class 9-10 Mathematics textbook
SSC
SSC suggestions
SSC
SSC Mathematics: syllabus and preparation
SSC
SSC Higher Mathematics: syllabus and preparation
HSC
HSC Higher Mathematics: syllabus and preparation
Textbook
Class 9-10 Higher Mathematics textbook
Admission
Engineering admission test preparation
Admission
Jahangirnagar University mathematical and physical sciences unit
English
Paragraph: Artificial Intelligence
Bangla
রচনা: কৃত্রিম বুদ্ধিমত্তা (in Bangla)
HSC
HSC suggestions
Admission
University admission guide
SSC
SSC syllabus
HSC
HSC syllabus
More math animations
Grade 8–10
Pythagorean Theorem
The Pythagorean theorem explained: formula a² + b² = c², two proofs you can watch, the converse, Pythagorean triples and 10 worked examples. Drag the triangle yourself.
Grade 10–11
Trigonometric Ratios and the Unit Circle
Drag a point round the unit circle and watch sin, cos and tan change. Standard angle table, ASTC signs, identities, radians and graphs, with solved examples.
Grade 9–11
Quadratic functions and their graphs
Drag the vertex and change a, b, c to see how a quadratic function graph moves. Learn factoring, completing the square, the quadratic formula and discriminant.
Grade 9–10
Circle theorems
All the circle theorems with drag-and-check diagrams: angle at the centre, same segment, semicircle, cyclic quadrilateral, chords, tangents and alternate segment.
Grade 9–10
Heights and distances: elevation and depression angles
What angle of elevation and angle of depression mean, how the height-and-distance formula works, and how two observations solve a tower's height without ever measuring it — with an interactive simulation and solved problems.
Grade 10–11
Arithmetic and Geometric Sequences
Learn the arithmetic and geometric sequence formulas for the nth term and sum, Gauss's pairing trick, and the sum-to-infinity formula a/(1−r), with a drag-and-slide bar-chart simulation and worked examples.
Grade 9–10
Mean, Median and Mode
Learn the mean, median and mode formulas, why the median resists an outlier while the mean does not, and the grouped-data median/mode formulas, by dragging points on a number line, with worked examples.
Animations in other subjects
Physics
Refraction of light
Physics
Ohm's law
Physics
Projectile motion
Physics
Simple pendulum
Physics
Electric field
Physics
Wave interference
Physics
Free Fall
Physics
Lens ray diagrams
Physics
Newton's Laws of Motion
Physics
Spherical mirror ray diagrams
Physics
Electromagnetic Induction
Physics
Conservation of Momentum and Collisions
Physics
Work, Energy and Power
Physics
Inclined Plane
Chemistry
Structure of the atom
Chemistry
Acids, Bases and the pH Scale
Chemistry
Electron configuration
Chemistry
Gas laws: Boyle, Charles, Gay-Lussac, Avogadro and PV = nRT
Chemistry
How an Ionic Bond Forms
Chemistry
Electrolysis and Faraday’s Laws
Chemistry
Covalent Bond
Chemistry
Periodic Trends
Biology
Mitosis cell division
Biology
Diffusion and Osmosis
Biology
Photosynthesis
Biology
The human heart: structure and function
Biology
Mendelian Genetics
Biology
DNA Replication
Biology
Cellular Respiration
Biology
Enzyme Action
Biology
The Nerve Impulse and the Action Potential
Biology
The Nephron and Urine Formation
Biology
Meiosis Cell Division
Biology






















