From Coin Toss to LLM — Understanding Random Variables
From Coin Toss to LLM — Understanding Random Variables A beginner friendly guide to probability and random variables — no math background needed. 1. What is Probability? Probability is a number tha...

Source: DEV Community
From Coin Toss to LLM — Understanding Random Variables A beginner friendly guide to probability and random variables — no math background needed. 1. What is Probability? Probability is a number that measures how likely something is to happen. This number is always between 0 and 1: Value Meaning 0 Impossible — will never happen 1 Certain — will always happen 0.5 Equal chance — may or may not happen Example Flip a fair coin. Two outcomes are possible — heads or tails. Neither is more likely than the other. So the probability of heads = 1/2 = 0.5 And the probability of tails = 1/2 = 0.5 One important rule — all probabilities of all possible outcomes must always add up to 1. 0.5 + 0.5 = 1 ✓ What happens in real life? If you flip a coin 10 times, you might get 6 heads and 4 tails. That is normal. But if you flip 10,000 times, the result will get very close to 50% heads and 50% tails. More experiments you run → closer you get to the true probability. 2. What is a Random Variable? Think of a