Beginner Topic 12 of 51 Math for Computing
Random Variables
Numeric outcomes of random processes.
How it works
A random variable assigns a numerical value to each outcome of a random experiment, such as the number of heads in ten tosses. Discrete random variables take countable values and are described by a probability mass function, while continuous ones take values in intervals and are described by a probability density function, with probabilities as areas under the curve. The cumulative distribution function gives the probability of being less than or equal to a value. Joint distributions describe several variables, along with marginals and independence.
Where it is used
Modeling uncertain quantities such as response times, sensor noise, user counts, losses and machine-learning predictions, and defining expectations and variances use random variables.
Common pitfall
A density value is not a probability and can exceed 1, since only integrals over intervals give probabilities. Confusing the variable with the distribution it follows and mixing discrete and continuous formulas cause errors. Independent variables must be justified. Define the sample space and what the variable measures, and use simulation to check.
Where it fits in the course
Random Variables is topic 12 of 51 in Math for Computing, rated Beginner. It follows Probability Basics. The next topic is Expected Value.
Practice and explore
- Open the interactive lesson, with a mini quiz.
- Take the Math for Computing quiz.
How to study this topic
- Read the explanation above and restate the definition in your own words.
- Open the interactive lesson and answer its mini quiz.
- Read the common pitfall, then write a short example that avoids it.
- Check your understanding in the Math for Computing quiz, and revisit the topic if you miss a question.
Frequently asked questions
What is Random Variables?
Where do people use Random Variables?
What is the most common mistake with Random Variables?
What should I learn before this topic?
How can I practice it?
Is Random Variables hard to learn?
How long does it take to learn Random Variables?
Which topics are related to Random Variables?
What should I study after Random Variables?
Related topics
- Probability Basics (Math for Computing)
- Expected Value (Math for Computing)
- Determinants (Math for Computing)
- Mean, Median and Mode (Math for Computing)
- Variables (Programming Fundamentals)
- Environment Variables (DevOps & Tooling)
- Condition Variables (Concurrency & Parallelism)