Discrete and Continuous Random Variables, Distributions, Expectation, and Variance
Foundations of Random Variables
Concept and Motivation:
- In many probability experiments, the primary interest lies in a specific numerical quantity derived from an outcome rather than the full descriptive outcome itself.
- Coin Tossing Example: When flipping multiple coins, interest usually centers on the total count of heads observed rather than the specific ordered sequence of heads and tails (e.g., vs. ).
- Dice Rolling Example: When tossing two dice, interest typically lies in the sum of the face values. For instance, knowing the total sum is is often more relevant than distinguishing whether the individual dice showed , , , , , or .
Formal Definition:
- A Random Variable is a functional mapping that assigns a single real number to each outcome/element in a sample space .
- Because the numerical value taken by a random variable depends on the outcome of a probabilistic experiment, probabilities can be assigned directly to its possible values.
Example: Tossing Three Fair Coins:
- Let denote the random variable representing the total number of heads obtained in three flips of a fair coin.
- The sample space consists of equally likely outcomes:
- Mapping outcomes to values of :
- Probability distribution for each possible value:
Classification of Random Variables:
- Discrete Random Variables: Represent "count data", such as the number of defective items in a sample or the number of highway fatalities per year in a given region.
- Continuous Random Variables: Represent "measured data", such as heights, weights, temperatures, distances, and life periods or operational durations.
Discrete Random Variables and Probability Distributions
Definition:
- A random variable is defined as discrete if its set of possible values is finite or countably infinite.
Probability Mass Function (PMF):
- The PMF (also called the discrete probability distribution function) defines the probability associated with each specific value of the discrete random variable .
- A function is a valid PMF if and only if it satisfies the following three conditions:
- for all possible values
Cumulative Distribution Function (CDF):
- The CDF of a discrete random variable with PMF measures the cumulative probability that assumes a value less than or equal to :
- The graph of a discrete CDF is a step function that increases monotonically from to , with jump discontinuities occurring at each possible value of height equal to .
Worked Example 1: Distribution of Random Variable :
- Given PMF for discrete variable :
- Constructing the Cumulative Distribution Function :
- Given PMF for discrete variable :
Worked Example 2: Defective Computers Purchase:
- A shipment of computers contains defective units and non-defective units. A school randomly purchases computers from the shipment without replacement.
- Let be the random variable representing the number of defective computers purchased.
- Possible values of : .
- PMF derivation using combination formulas:
- CDF Formulation :
- For :
- For :
- For :
- For :
Worked Example 3: Given Discrete Distribution and Graphs:
- Given PMF for random variable :
- Corresponding CDF piecewise definition:
- Visual representation comparing the spike plot of the PMF and the step function plot of the CDF:
- Given PMF for random variable :

- Mean or Expected Value of a Discrete Random Variable:
- The expected value , denoted as , represents the weighted average of the values taken by :
- Sample Component Example: Let be the number of good components in a sample with PMF , , , and . The expected value is:
Continuous Random Variables and Density Functions
Definition:
- A random variable is continuous if it can take on any real value along a continuous scale or numerical interval.
Probability Density Function (PDF):
- A function is a probability density function for a continuous random variable defined over the real numbers if:
- for all
- A function is a probability density function for a continuous random variable defined over the real numbers if:
Common Density Function Shapes:
- Density curves can take various functional forms depending on the underlying distribution (e.g., positively or negatively skewed curves, uniform linear functions, symmetric normal bell curves, or parabolic shapes).

Probability at Single Point Values:
- For any continuous random variable , the probability of assuming any exact single point value is identically zero:
- Direct Implication: The probability distribution of a continuous random variable cannot be listed in tabular form.
Probabilities over Intervals:
- Because individual points carry zero probability mass, inclusion or exclusion of interval endpoints does not affect interval probabilities:
- Note: This property holds strictly for continuous random variables and is false for discrete random variables.
- Geometric Interpretation: The probability equals the area under the density curve bounded between the ordinates at and , lying above the horizontal axis.

Cumulative Distribution Function (CDF):
- The CDF of a continuous random variable with PDF is defined as:
- Computing interval probabilities using the CDF:
Mean or Expected Value of a Continuous Random Variable:
- The expected value , denoted as , is given by the integral:
Variance and Standard Deviation of Random Variables
Definition of Variance:
- The variance of a random variable , denoted as or , measures the expected squared deviation of from its mean :
Formulas by Random Variable Type:
- Discrete Random Variable:
- Continuous Random Variable:
Alternative Computational Formula:
- Expanding the squared term inside the expectation yields the shortcut formula:
- Where is computed as:
- Discrete:
- Continuous:
Definition of Standard Deviation:
- The standard deviation of a random variable is defined as the positive square root of its variance:
Detailed Worked Example: Official Business Automobiles Usage:
- Problem: Let represent the number of automobiles used for official business on any given workday. The PMF of is given as follows: | | | | :--- | :--- | | | | | | | | | | Find the mean, variance, and standard deviation of .
- Step 1: Compute Mean :
- Step 2: Compute Variance using Definition Formula :
- For :
- For :
- For :
- Summing deviations:
- Step 3: Compute Variance using Computational Formula :
- Compute :
- Subtract :
- Step 4: Compute Standard Deviation :