
Random Variables Definition Types Formula and Solved Examples
Define Random Variable
A random variable is basically a mathematical postulate (rule) that allocates a numerical value to each outcome in a sample space. Random variables can either be a discrete random variable or continuous random variable. A random variable is said to be discrete when it assumes only particular values in an interval. Or else, it will be continuous. When X takes values 1, 2, 3, 4, 5, 6…, it is said to contain a discrete random variable.
Uses and Significance of Random Variable
As a function, a random variable is required to be computed, which enables probabilities to be allocated to a set of potential values. It is evident that the result is dependent upon some physical variables which are not foreseeable. Say, when we toss a fair coin, the ultimate outcome of occurring to be heads or tails will rely on the possible physical conditions. We are not able to foresee, which outcome will be noted. Although there are other probabilities like the coin could get lost or tampered, such contemplation is overlooked.
Types of Random Variables
There are mainly 2 types of random variables, as given below:
Continuous Random Variable
Discrete Random Variable
Random Variable In Probability
In probability, a real-valued function, described over the sample space of a random experiment, is known as a random variable. That is, the values of the random variable are in correspondence to the results of the random experiment. Random variables could either be continuous or discrete.
A random variable’s possible values may exhibit the possible results of an experiment, which is about to be carried out or the possible results of a preceding experiment whose existing value is not known. They may also theoretically define either the outcomes of an “objectively” random procedure (like rolling a die) or the “subjective” randomness that occurs as a consequence of insufficient knowledge of a quantity.
The domain of a random variable is a sample space, which is bespoke of an assemblage of possible outcomes from a random event. For example, when a coin is tossed, only two possible outcomes are addressed such as heads or tails.
Probability Distribution In Random Variable
A random variable and probability distribution can appear to be like:
Conceptual recording of outcomes as well as probabilities of the outcomes.
An experimental listing of outcomes linked with their distinguished relative frequencies.
A subjective listing of outcomes linked with their subjective probabilities.
The probability of a random variable X that takes the values x is described as a probability function of X which is represented by f (x) = f (X = x)
A probability distribution always fulfills two conditions that are as given:
f(x)≥0
∑f(x)=1
Important Probability Distributions
Following are the important probability distributions:
Binomial distribution
Bernoulli’s distribution
Exponential distribution
Normal distribution
Poisson distribution
Discrete Random Variable and Probability Distribution
Discrete probability distribution of a random variable X is a list of every possible value of X together with the probability that X gets hold of that value in one trial of the experiment. Each probability P(x) should be between 0 and 1 i.e.: 0≤P(x) ≤1. The sum of all the likely probabilities is 1: ∑P(x)=1.
Did You Know
Random Variables discrete or continuous can also be transformed, meaning that the value can be reassigned to another variable.
The transformation of random variable is actually incorporated to remap the number line from x to y
There is also a random variable that we call a geometric random variable
Solved Examples
Example:
Calculate the mean value for the continuous random variable, when assigned the function f(x) = x, 0 ≤ x ≤ 2.
Solution:
Given function: f(x) = x, 0 ≤ x ≤ 2
Using the formula to calculate the mean value: E(X) = \[\int_{-\infty}^{\infty}\] x f(x)dx
We get,
E(X) = \[\int_{0}^{2}\] xf(x) dx
E(X) = \[\int_{0}^{2}\] x. xdx
E(X) = \[\int_{-\infty}^{\infty}\] x\[^{2}\] dx
E(X)=(x³/3) \[_{0}^{2}\]
E(X)=(2³/3)−(0³/3)
E(X)=(8/3)−(0)
E(X)=8/3
Hence, we get the mean of the continuous random variable= E(X) = 8/3.
FAQs on Random Variables in Probability Theory
1. What is a random variable in probability?
A random variable is a numerical value assigned to each outcome of a random experiment. It converts outcomes into numbers so we can analyze them mathematically in probability and statistics.
- Denoted by capital letters like X or Y
- Maps outcomes from a sample space to real numbers
- Used to compute probabilities, mean, variance, and distributions
2. What are the types of random variables?
The two main types of random variables are discrete and continuous.
- Discrete random variable: Takes countable values (e.g., 0, 1, 2, 3)
- Continuous random variable: Takes any value in an interval (e.g., 2.5, 3.1)
3. What is the probability distribution of a random variable?
A probability distribution describes how probabilities are assigned to the values of a random variable.
- For discrete variables, it is given by a probability mass function (PMF)
- For continuous variables, it is given by a probability density function (PDF)
4. What is the expected value of a random variable?
The expected value of a random variable is its long-run average value, calculated as a weighted average of outcomes.
- For discrete variables: E(X) = Σ xP(x)
- For continuous variables: E(X) = ∫ x f(x) dx
5. What is the variance of a random variable?
The variance measures how much a random variable spreads around its mean and is calculated as Var(X) = E(X²) − [E(X)]².
- It quantifies dispersion
- The square root of variance is the standard deviation
6. What is the difference between discrete and continuous random variables?
The key difference is that a discrete random variable takes countable values, while a continuous random variable takes values from an interval.
- Discrete: Uses a PMF, probabilities found by summation
- Continuous: Uses a PDF, probabilities found by integration
- For continuous variables, P(X = a) = 0
7. How do you find the probability of a discrete random variable?
To find the probability of a discrete random variable, use its probability mass function (PMF) and substitute the given value.
- Step 1: Identify the PMF P(X = x)
- Step 2: Substitute the required value of x
- Step 3: Simplify to get the probability
8. What is a probability density function (PDF)?
A probability density function (PDF) describes the distribution of a continuous random variable.
- The total area under the curve equals 1
- Probabilities are found using integration over an interval
- P(a ≤ X ≤ b) = ∫[a to b] f(x) dx
9. Can you give an example of a random variable?
An example of a random variable is the number of heads obtained when tossing two coins.
- Possible values: 0, 1, 2
- P(X = 0) = 1/4
- P(X = 1) = 1/2
- P(X = 2) = 1/4
10. Why are random variables important in statistics?
Random variables are important because they allow us to model uncertainty numerically and apply statistical analysis.
- Used to compute mean, variance, and probabilities
- Form the basis of common distributions like binomial and normal distribution
- Essential in hypothesis testing and data analysis





















