Random Variables Practice Problems

Last Updated : 14 Jul, 2026

A random variable is a rule that assigns a number to the outcome of a random experiment.

In simpler terms:

  • You perform a random experiment (like flipping a coin or rolling a die).
  • Each possible outcome is assigned a numerical value.
  • That numerical value is the random variable.

Problem 1: Let X be a random variable with the following probability mass function (pmf): P(X = 1) = 0.2, P(X = 2) = 0.5, and P(X = 3) = 0.3. Find the expected value E(X).

Solution:

E(X) = 1×0.2 + 2×0.5 + 3×0.3

= 0.2 + 1 + 0.9 = 2.1

Problem 2: A fair six-sided die is rolled. Let X be the outcome of the roll. Find the variance Var(X).

Solution:

E(X) = 1 + 2 + 3 + 4 + 5 + 6/6

= 3.5

E(X2) = 12 + 22 + 32 + 42 + 52 + 62

= 15.667

Var(X) = E(X2) - (E(X))2

= 15.667 -3.52

= 2.9167

Problem 3: Let Z be a random variable with the following probability mass function (pmf): P(Z = -1) = 0.3, P(Z = 0) = 0.4, and P(Z = 1) = 0.3. Find the expected value E(Z)and the variance Var(Z).

Solution:

E(Z) = (-1)×0.3 + 0×0.4 + 1×0.3

= 0

E(Z2) = (-1)2×0.3 + 02×0.4 + 12×0.3

= 0.6

Var(Z) = E(Z2)-(E(Z))2 = 0.6-0

= 0.6

Problem 4: A random variable W follows a uniform distribution on the interval [2, 4]. Find the expected value E(W) and the variance Var(W).

Solution:

E(W) = 2 + 4/2

= 3

Var(W) = (4-2)2 /12 = 4/12

= 1/3

Problem 5: Let X be a Bernoulli random variable with parameter p = 0.4. Find the expected value E(X) and the variance Var(X).

Solution:

E(X) = p = 0.4

Var(X) = p(1-p) = 0.4⋅(0.6)

= 0.24

Problem 6: Suppose X and Y are independent random variables with X following a normal distribution with mean 2 and variance 1, and Y following a normal distribution with mean 3 and variance 4. Find the distribution of Z = X + Y.

Solution:

Z∼N(μX + μY,σX2 + σY2)

= N(2 + 3,1 + 4)

= N(5,5)

Problem 7: A random variable X follows a geometric distribution with parameter p = 0.3. Find the expected value E(X).

Solution:

E(X) = 1/p

= 1/0.3

= 10/3≈3.33

Problem 8: If Z is a standard normal random variable, find P(Z > 1.96).

Solution:

Using standard normal distribution table:

P(Z > 1.96)

= 1 - P(Z ≤ 1.96)

= 1-0.975 = 0.025

Problem 9: Let X be a random variable with the following probability mass function (pmf): P(X = 0) = 0.4, P(X = 1) = 0.3, and P(X = 2) = 0.3. Find the expected value E(X) and the variance Var(X).

Solution:

E(X) = 0⋅0.4 + 1⋅0.3 + 2⋅0.3

= 0.9

E(X2) = 00.4 + 10.3 + 20.3 = 0 + 0.3 + 1.2

= 1.5

Var(X) = E(X2)-(E(X))2 = 1.5-0.92 = 1.5-0.81

= 0.69

Problem 10: If Z is a standard normal random variable, find P(-2 ≤ Z ≤ 2).

Solution:

Using standard normal distribution table

P(-2 ≤ Z ≤ 2 )

= P(Z ≤ 2) - P(Z ≤ -2)

= 0.9772 - 0.0228

= 0.9544

Practice Problems

Q1. Let X be a discrete random variable with the following pmf: P(X = 1) = 0.1, P(X = 2) = 0.3, P(X = 3) = 0.4, and P(X = 4) = 0.2. Find the expected value E(X).

Q2. A random variable Y follows a uniform distribution on the interval [1, 5]. Find the probability that Y is greater than 3.

Q3. If Z is an exponential random variable with rate parameter λ = 2, find the probability that Z is less than 1.

Q4. Let X be a normal random variable with mean μ = 4 and variance σ2 = 9. Find P(1 ≤ X ≤ 7).

Q5. A fair coin is flipped 10 times. Let X be the number of heads obtained. Find the probability that X equals 5.

Q6. Let Y be a continuous random variable with the pdf fY(y) = 1/2sin⁡(y) for 0 ≤ y ≤ π. Find the expected value E(Y).

Q7. A random variable Z follows a Poisson distribution with parameter λ = 6. Find the probability that Z equals 4.

Q8. Let X be a Bernoulli random variable with parameter p = 0.7. Find the expected value E(X) and the variance Var(X).

Q9. A random variable X follows a binomial distribution with parameters n = 8 and p = 0.4. Find the probability that X is at least 6.

Q10. If Z is a standard normal random variable, find P(Z ≤ -1.28).

Comment

Explore