Random Variable Practice Questions

Last Updated : 14 Jul, 2026

A random variable is a variable that assigns a numerical value to each possible outcome of a random experiment. It helps represent the outcomes of an experiment using numbers, making them easier to analyse mathematically.

Example:

Roll a fair die once.

Let the random variable X represent the number shown on the die.

Possible values of X are: X = {1, 2, 3, 4, 5, 6}

Here, X assigns a number to each possible outcome of the experiment, so X is a random variable.

Question 1: Find the mean value of the continuous random variable with probability density function,f(x) = \frac{3x^2}{26}, 1 ≤ x ≤ 3.
Solution:

Given,
f(x) = \frac{3x^2}{26} , 1 ≤ x ≤ 3

The mean (expected value) of a continuous random variable is: E(X)=\int_{1}^{3}x\cdot f(x)\,dx

Substitute the value of f(x): E(X)=\int_{1}^{3}x\cdot \frac{3x^2}{26}\,dx

E(X)=\frac{3}{26}\int_{1}^{3}x^3\,dx

Using integration,
E(X)=\frac{3}{26}\left[\frac{x^4}{4}\right]_{1}^{3}
E(X)=\frac{3}{26}\times \frac{3^4-1^4}{4}
E(X)=\frac{3}{26}\times \frac{81-1}{4}
E(X)=\frac{3}{26}\times \frac{80}{4}
E(X)=\frac{3}{26}\times 20
E(X)=\frac{60}{26}

Therefore, E(X)=\frac{30}{13}

Question 2: Find the mean value for the continuous random variable, f(x) = ex, 1 ≤ x ≤ 3
Solution:

Given,
f(x) = ex
1 ≤ x ≤ 3

E(x) = \int_{1}^{3} x \cdot f(x) \, dx
E(x) = \int_{1}^{3} x \cdot e^x \, dx
E(x) = [x.ex - ex]31
E(x) = [ex(x - 1)]31
E(x) = e3(2) - e(0)

Question 3: Given the discrete random variable X with the following probability distribution:

X

1

2

3

4

P(X)

0.1

0.2

0.4

0.3

Find the mean value (or expected value) of the random variable X.
Solution:

To find the mean value (expected value) of a discrete random variable X, we use the formula:
Using the relation: E(X) = μX = x1P(x1) + x2P(x2) + ... + xnP(xn)
E(X) = ∑i Xi · P(Xi)

The expected value E(X), or mean μX of a discrete random variable X
E(X) = μX = ∑ [ xi * P(xi) ]
E(X) = 1 * 0.1 + 2 * 0.2 + 3 * 0.4 + 4 * 0.3
E(X) = 0.100 + 0.400 + 1.200 + 1.200 = 2.900
E(X) = 2.900

Question 4: Given the discrete random variable X with the following probability distribution:
Suppose a discrete random variable X represents the number of defective items in a sample of 10 items from a batch of 100 items. The possible values of X are 0, 3, 5, and 7 defective items, with the following probability distribution:

X

0

3

5

7

P(X)

0.2

0.5

0.2

0.1

Find the mean value (or expected value) of the random variable X.
Solution:

The formula for the mean (or expected value) of a discrete random variable X is:
E(X) = ∑i Xi ⋅ P(Xi)

The expected value E(X), or mean μX of a discrete random variable X

E(X) = μX = ∑ [ xi * P(xi) ]
E(X) = 0 * 0.2 + 3 * 0.5 + 5 * 0.2 + 7 * 0.1
E(X) = 0.000 + 1.500 + 1.000 + 0.700 = 3.200
E(X) = 3.200

Practice Problems

Question 1: Find the mean value for the continuous random variable, f(x) = x3, 1 ≤ x ≤ 5
Question 2: Find the mean value for the continuous random variable, f(x) = x, 1 ≤ x ≤ 4.
Question 3: Given the discrete random variable X with the following probability distribution:

X

1

2

3

4

P(X)

0.2

0.3

0.4

0.1

Find the mean value (or expected value) of the random variable X.

Question 4: Given the discrete random variable X with the following probability distribution:

X

0

1

3

5

P(X)

0.3

0.3

0.3

0.1

Find the mean value (or expected value) of the random variable X.

Answer

  1. 624.8.
  2. 21.
  3. 2.4.
  4. 1.7.
Comment

Explore