Understanding Random Variables: Discrete vs Continuous


1. Introduction: What is a Random Variable?

A random variable is a numerical value that represents the outcome of a random experiment. Instead of focusing on the outcome itself, we assign a number to each outcome.

Example: Tossing a coin — let:

. \( X = 1 \) if Head occurs.
. \( X = 0 \) if Tail occurs.

This \( X \) is a random variable.


2. Types of Random Variables

Discrete Random Variables

  • Takes on countable values.
  • Examples: Number of heads in 10 coin tosses, number of defective products in a batch.

Continuous Random Variables

  • Takes on uncountable/infinite values within an interval.
  • Examples: Height of students, time taken to complete a race.

Image Prompt:
“Split infographic: left half shows dice and coins with labels ‘Discrete’, right half shows thermometer and ruler with labels ‘Continuous’, modern flat vector style.”


3. Probability Mass Function (PMF) – Discrete

The Probability Mass Function gives the probability that a discrete random variable equals a specific value.

Formula:
Shortcode for WordPress:

\[
P(X = x) = \frac{\text{Number of favorable outcomes}}{\text{Total number of outcomes}}
\]

Example: For a fair six-sided die:

\[
P(X = 4) = \frac{1}{6}
\]


4. Probability Density Function (PDF) – Continuous

For continuous variables, probabilities are described by the Probability Density Function.

Formula:

\[
P(a \leq X \leq b) = \int_{a}^{b} f(x) \, dx
\]
where \( f(x) \) is the PDF.


Image Prompt:
“Side-by-side vector illustration: left side shows bar chart for PMF (discrete), right side shows smooth curve for PDF (continuous), labeled clearly, flat vector style.”


5. Cumulative Distribution Function (CDF)

The Cumulative Distribution Function gives the probability that XXX will take a value less than or equal to xxx.

Formula (Discrete):

\[
F(x) = P(X \leq x) = \sum_{t \leq x} P(X = t)
\]

Formula (Continuous):

\[
F(x) = \int_{-\infty}^{x} f(t) \, dt
\]


6. Mean and Variance

Discrete:

\[
\mu = E[X] = \sum_{i} x_i P(X = x_i)
\]
\[
\sigma^2 = Var(X) = \sum_{i} (x_i – \mu)^2 P(X = x_i)
\]

Continuous:

\[
\mu = E[X] = \int_{-\infty}^{\infty} x f(x) \, dx
\]
\[
\sigma^2 = Var(X) = \int_{-\infty}^{\infty} (x – \mu)^2 f(x) \, dx
\]


Image Prompt:
“Minimalist infographic card showing formulas for mean and variance for both discrete and continuous random variables, symbols μ, σ², summation and integration, modern flat vector style, white background.”


7. Real-life Applications

  • Quality control – predicting defective products.
  • Finance – modeling stock returns.
  • Machine Learning – defining probability models.
  • Weather Forecasting – predicting temperatures.

8. Quick Quiz

1. Is the number of students in a class discrete or continuous?
2. If \( X \) is the time taken to run 100m, is it discrete or continuous?

Answers:

  1. Discrete.
  2. Continuous.

9. Conclusion

Random variables are the link between real-world experiments and mathematical probability models. Understanding their types, properties, and formulas is essential for deeper statistical learning.

danthamjoshuva@gmail.com
danthamjoshuva@gmail.com
Articles: 3