Hassan Ijaz
Ai, Web & Design
Random variables (discrete and continuous)
Dice rolling and spinner simulators that generate histograms in real-time, allowing users to see distributions emerge from repeated sampling
Concept Overview
Random variables are functions that assign numerical values to the outcomes of random experiments. They bridge the gap between abstract probability spaces and concrete numerical analysis.
Types of Random Variables
Discrete Random Variables
- Take on countable values (often integers)
- Gaps between possible values
- Described by Probability Mass Function (PMF)
- P(X = k) gives probability of specific value
- Examples: Dice rolls, coin flips, number of customers
Continuous Random Variables
- Take on any value in an interval
- Infinitely many possible values
- Described by Probability Density Function (PDF)
- P(a ≤ X ≤ b) gives probability of interval
- Examples: Height, temperature, time intervals
Key Properties
- Expected Value (Mean): E[X] - the "center" or average value
- Variance: Var(X) - measures spread around the mean
- Standard Deviation: σ = √Var(X) - spread in original units
- Distribution: The pattern of how probabilities are distributed
Law of Large Numbers
As you collect more samples, the sample mean converges to the theoretical expected value. This is why the histograms below become more predictable with more rolls/spins!
Use the interactive simulators below to see how discrete and continuous random variables behave differently as you collect more samples.
Interactive Visualization
Loading interactive visualization...
Dice rolling and spinner simulators that generate histograms in real-time, allowing users to see distributions emerge from repeated sampling