---
title: "Define random variables; properties"
subject: "Simulation and Modeling"
chapter: 6
key: "semester_8/simulation_and_modeling:rn-define-properties-variables"
source: https://www.bctengineer.com/q/semester_8/simulation_and_modeling/rn-define-properties-variables
site: BCT Engineering
---

# Define random variables; properties

Simulation and Modeling · Chapter 6: Random Number

- Asked in: 2070 Magh, 2+3 marks
- Video: [Random variables | Probability and Statistics | Khan Academy](https://www.youtube.com/watch?v=3v9w79NhsfI) — Khan Academy
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_8/simulation_and_modeling/rn-define-properties-variables
- Whole chapter: https://www.bctengineer.com/md/semester_8/simulation_and_modeling/chapter-6

## Question

Define random variables. Explain properties of random variables.

## Short answer

A random variable is a function mapping outcomes to real numbers; discrete with pmf p(x)=P(X=x), continuous with pdf f(x). Properties: p(x) in [0,1] (discrete), f(x) ≥ 0 (continuous); total probability sums/integrates to 1; CDF F(x)=P(X ≤ x) non‑decreasing; mean E(X) = Σ x p(x) or ∫ x f(x)dx, linear; variance V(X)=E(X²)−[E(X)]², V(aX+b)=a²V(X); if independent, E(XY)=E(X)E(Y) and V(X+Y)=V(X)+V(Y).

## Answer

#### Random variable
A random variable X is a function that assigns a real number to each outcome of a random experiment. Example: the number shown on a die, the inter-arrival time of customers, or the service time at a bank counter.

- **Discrete** random variable: takes countable values (number of arrivals in an hour). Described by a probability mass function p(x) = P(X = x).
- **Continuous** random variable: takes any value in an interval (service time). Described by a probability density function f(x), with P(a ≤ X ≤ b) = ∫ f(x) dx from a to b.

#### Properties of random variables
1. **Probability bounds.** 0 ≤ p(x) ≤ 1 for discrete X, and f(x) ≥ 0 for continuous X.
2. **Total probability is 1.** Σ p(x) = 1 (discrete), ∫ f(x) dx = 1 over the whole range (continuous).
3. **Cumulative distribution function.** F(x) = P(X ≤ x). It is non-decreasing, with F(−∞) = 0 and F(+∞) = 1.
4. **Expected value (mean).** E(X) = Σ x·p(x) or ∫ x·f(x) dx. It is the long-run average. Also E(aX + b) = aE(X) + b, and E(X + Y) = E(X) + E(Y).
5. **Variance.** V(X) = E(X²) − [E(X)]². The standard deviation is σ = √V(X). Also V(aX + b) = a²V(X).
6. **Independence.** X and Y are independent if P(X = x, Y = y) = P(X = x)·P(Y = y). Then E(XY) = E(X)E(Y) and V(X + Y) = V(X) + V(Y).

For example, the random number R uniform on [0, 1] has f(R) = 1, E(R) = 1/2 and V(R) = 1/12.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What is a random variable?
   A. A fixed constant chosen at random
   B. A function that assigns a real number to each outcome of a random experiment
   C. Any number between 0 and 1
   D. The sample mean
   Answer: B. A random variable maps each outcome of a random experiment to a real number. (Key point: Definition)

2. Which description of a continuous random variable is correct?
   A. Takes countable values and has a pmf
   B. Takes values in an interval and is described by a pdf with total area 1
   C. Has probabilities that sum to 2
   D. Always has f(x) <= 1
   Answer: B. A continuous variable takes any value in an interval; f(x) >= 0 and its integral over the range is 1. (Key point: Discrete vs continuous)

3. What is the variance of a random variable and how does it scale?
   A. V(X) = E(X^2) - [E(X)]^2 and V(aX + b) = a^2 V(X)
   B. V(X) = E(X) and V(aX + b) = aV(X) + b
   C. V(X) = E(X^2) + [E(X)]^2 and V(aX+b) = a^2 V(X) + b
   D. V(X) = [E(X)]^2 and V(aX+b) = a V(X)
   Answer: A. V(X) = E(X^2) - [E(X)]^2; adding b does not change spread and scaling by a multiplies variance by a^2. (Key point: Variance)

4. If X and Y are independent, which holds?
   A. E(XY) = E(X) + E(Y)
   B. V(X + Y) = V(X) + V(Y)
   C. V(X + Y) = V(X) - V(Y)
   D. E(XY) = 0
   Answer: B. For independent variables, E(XY) = E(X)E(Y) and V(X + Y) = V(X) + V(Y). (Key point: Independence results)

## Related in Simulation and Modeling

- [Random number properties and Gap test](https://www.bctengineer.com/question.md?key=semester_8%2Fsimulation_and_modeling%3Arn-properties-gap-test) — Simulation and Modeling, chapter 6, asked 4×
- [Random number properties; KS test algorithm](https://www.bctengineer.com/question.md?key=semester_8%2Fsimulation_and_modeling%3Arn-properties-ks-algorithm) — Simulation and Modeling, chapter 6
- [Properties of random numbers](https://www.bctengineer.com/question.md?key=semester_8%2Fsimulation_and_modeling%3Arn-properties) — Simulation and Modeling, chapter 6
- [Properties and generation techniques of RN](https://www.bctengineer.com/question.md?key=semester_8%2Fsimulation_and_modeling%3Arn-properties-generation-techniques) — Simulation and Modeling, chapter 6

## Related in other subjects

- [Discrete and continuous random variables](https://www.bctengineer.com/question.md?key=semester_5%2Fprobability_and_statistics%3Adiscrete-continuous-rv-mean-variance) — Probability and Statistics, chapter 2
- [Continuous random variable; pdf properties](https://www.bctengineer.com/question.md?key=semester_5%2Fprobability_and_statistics%3Acontinuous-rv-pdf-properties) — Probability and Statistics, chapter 3
- [Continuous vs discrete variables, return period formulae](https://www.bctengineer.com/question.md?key=semester_5%2Fengineering_hydrology%3Acontinuous-discrete-variables-return-period) — Engineering Hydrology, chapter 6
