Random variables#
A random variable gives a number to each outcome of a random experiment.
| Type | Takes | Examples |
|---|---|---|
| discrete | countable values | number of heads, orders per day, defective items in a box |
| continuous | any value in a range | height, delivery time, temperature, petrol price |
A discrete variable has a probability mass function (the probability of each value). A continuous variable has a probability density - we talk about the probability of a range, like P(20 < time < 30 minutes).
Expected value and variance#
The expected value E[X] (the mean) is the long-run average:
E[X] = Σ x · P(x)
The variance measures spread around the mean, and the standard deviation is its square root (same units as X):
Var(X) = Σ (x − μ)² · P(x), SD = √Var(X)
E[X] = 1.95 orders per day SD = 1.12
A Rs 50 ticket wins Rs 10,000 with probability 1/500, otherwise nothing. E[winnings] = 10000 × 1/500 = Rs 20. Expected profit = 20 − 50 = −Rs 30 per ticket. On average you lose money - which is how every lottery and casino makes profit.
The binomial distribution#
When you repeat a yes/no trial n times, independently, each with success probability p, the number of successes X follows Binomial(n, p):
P(X = k) = C(n, k) · pᵏ · (1 − p)ⁿ⁻ᵏ, mean = np, SD = √(np(1 − p))
The Poisson distribution#
Poisson(λ) models how many times an event happens in a fixed interval when events occur independently at an average rate λ - calls per minute, accidents per day, typos per page.
P(X = k) = e^(−λ) · λᵏ / k!, mean = variance = λ
The normal distribution#
The normal (Gaussian) distribution is the famous bell curve, described by its mean μ and standard deviation σ. Heights, measurement errors, exam marks of large groups and many averages are approximately normal.
The 68-95-99.7 rule#
| Range | Share of values |
|---|---|
| μ ± 1σ | about 68% |
| μ ± 2σ | about 95% |
| μ ± 3σ | about 99.7% |
Normal distribution एक घंटी (bell) के आकार का graph है - ज़्यादातर values बीच (mean) के पास होती हैं और किनारों पर बहुत कम। याद रखने का आसान नियम: mean से 1 SD की दूरी में लगभग 68%, 2 SD में 95% और 3 SD में 99.7% values आती हैं।
z-scores#
A z-score says how many standard deviations a value is from the mean:
z = (x − μ) ÷ σ
z-scores let you compare values on different scales - 78 marks in a hard paper may be better than 85 in an easy one.
Maths z = 2.00, beats 97.7% of students English z = 1.25, beats 89.4% of students
A value with |z| > 3 is very unusual for normal data - a common rule for flagging outliers (e.g. a suspicious transaction amount).
Summary#
- Random variables are discrete (counts) or continuous (measurements).
- E[X] = Σ x·P(x) is the long-run average; variance and SD measure spread.
- Binomial(n, p): successes in n trials. Poisson(λ): events per interval.
- Normal(μ, σ): the bell curve; 68-95-99.7 rule; z = (x − μ)/σ compares values on different scales.