L3 Random Variables
📚 L3-Random-Variables.pptx.pdf
Brief overview
This document introduces the fundamental concepts of random variables, their types, and how to derive their values from experimental outcomes. Understanding these elements is crucial for statistical analysis and modeling uncertainty.
Key points
- Overview of random variables, experiments, and sample spaces
- How to identify and distinguish between discrete and continuous random variables
- Methods for finding the possible values of random variables
- Construction and properties of discrete probability distributions
- Calculation of the mean, expected value, variance, and standard deviation for discrete random variables
1. Understanding random variables and their types
1.1 Introduction to random variables
- Experiment: An activity with repeatable actions and defined results 5.
- Outcomes: The possible results of an experiment 6.
- Sample Space: The collection of all possible outcomes from an experiment 7.
- Variable: A characteristic that can take on different values. Capital letters represent variables.
- Random Variable: A function associating a real number with each outcome in a sample space. Its values are determined by chance 8.
🔑 Important: Random variables help us quantify uncertain events from experiments.
1.2 Types of random variables
Random variables are classified based on the values they can take. The two main types are discrete and continuous.
1.2.1 Discrete random variables
- Discrete Variable: Can only assume a specific, countable number of values. It has distinct, separate values 10.
- Examples include whole numbers, like counting objects.
1.2.2 Continuous random variables
- Continuous Variable: Can take on any value within a given range. These values can be measured and often include decimals or fractions 11.
- There are infinitely many possible values between any two given values.
🔑 Important: The key difference is countability: discrete variables are countable, while continuous variables are measurable within a range.
1.3 Distinguishing between discrete and continuous variables
Identifying whether a variable is discrete or continuous is crucial for statistical analysis. Consider the nature of the values the variable can assume.
Here is a comparison to help distinguish:
| Variable Description | Type | Reason |
|---|---|---|
| Person's age in years | Discrete | Counted in whole years. |
| Baby's age in months | Discrete | Counted in whole months. |
| Weight of every student in the class | Continuous | Can be any decimal value within a range. |
| Number of present students | Discrete | Counted as whole individuals. |
| Running speed in 100m dash | Continuous | Can be any value within a range, including decimals. |
| Speed of a bus | Continuous | Can vary continuously within a range. |
| Number of voters favoring a candidate | Discrete | Counted as whole individuals. |
| Temperature in Quezon at noon | Continuous | Can be any decimal value within a range. |
| Gold medals won by delegates | Discrete | Counted as whole medals. |
| Amount of paint used | Continuous | Can be any measured amount, including fractions. |
🔑 Important: If a variable's possible values can be counted, it's discrete. If it can take any value in an interval, it's continuous.
1.4 Examples of random variables
Random variables appear in many real-world scenarios. They help model uncertain events.
- Coin Toss Experiment: The number of heads when tossing a coin multiple times is a discrete random variable.
- Dice Roll Experiment: The sum of the numbers facing up when rolling two dice is also a discrete random variable 9.
🔑 Important: Random variables provide a mathematical framework for analyzing outcomes of chance events.
2. Finding values of random variables
To find the possible values a random variable can take, follow a structured approach. This involves identifying all possible outcomes of an experiment and then assigning numerical values to those outcomes based on the random variable's definition.
This process is fundamental to understanding discrete probability distributions.
2.1 Steps to find random variable values
The core steps to determine the values a random variable can assume are straightforward. First, clearly define the sample space, which is the set of all possible outcomes for an experiment.
Second, for each outcome in the sample space, count the occurrences related to the random variable and assign that count as the variable's value for that specific outcome 15.
2.1.1 Example: Coin tosses
Consider an experiment where a coin is tossed twice. Let X represent the random variable for the number of heads.
- Sample Space: {HH, HT, TH, TT}
- Assigning values to X:
- HH: 2 heads, so X = 2
- HT: 1 head, so X = 1
- TH: 1 head, so X = 1
- TT: 0 heads, so X = 0
The possible values for the random variable X are 0, 1, and 2 16 17 18.
2.1.2 Example: Drawing balls
Imagine drawing two balls without replacement from a box with 5 red and 6 blue balls. Let Z be the random variable representing the number of blue balls drawn.
- Possible outcomes and Z values:
- (Red, Red): Z = 2 blue balls
- (Red, Blue): Z = 1 blue ball
- (Blue, Red): Z = 1 blue ball
- (Blue, Blue): Z = 2 blue balls
The possible values for Z are 1 and 2 19.
2.1.3 Example: Three coin tosses
If three coins are tossed, and Y is the random variable for the number of tails:
- Sample Space: {HHH, HHT, HTH, HTT, THH, THT, TTH, TTT}
- Assigning values to Y:
- HHH: 0 tails, Y = 0
- HHT, HTH, THH: 1 tail, Y = 1
- HTT, THT, TTH: 2 tails, Y = 2
- TTT: 3 tails, Y = 3
The possible values for Y are 0, 1, 2, and 3 20 21 23.
📝 Example: In a computer lab, three computers are tested. D means defective, N means non-defective. If X is the random variable for the number of defective computers, the possible values of X are 0, 1, 2, and 3 33.
2.2 Discrete probability distribution
A discrete probability distribution assigns a probability to each possible value of a discrete random variable. This shows the likelihood of each value occurring 22.
2.2.1 Constructing a probability distribution
To construct a discrete probability distribution, you first determine the sample space and the values of the random variable, as shown above. Then, you calculate the probability for each of these values.
- Example: Three coin tosses (Y = number of tails)
- Y=0 (HHH): Probability is 1/8
- Y=1 (HHT, HTH, THH): Probability is 3/8
- Y=2 (HTT, THT, TTH): Probability is 3/8
- Y=3 (TTT): Probability is 1/8
This can be summarized in a table:
| Number of tails (Y) | Probability P(Y) |
|---|---|
| 0 | 1/8 |
| 1 | 3/8 |
| 2 | 3/8 |
| 3 | 1/8 |
2.2.2 Properties of discrete probability distributions
Two key properties define a valid discrete probability distribution:
- Probability range: The probability of any specific value of a discrete random variable must be between 0 and 1, inclusive (0≤P(X)≤1).
- Sum of probabilities: The sum of the probabilities for all possible values of the random variable must equal 1 (∑P(X)=1).
🔑 Important: A distribution is not a discrete probability distribution if any probability is negative or if the probabilities do not sum to one. For instance, a distribution with P(X) = -1/4 is invalid.
2.2.3 Checking for valid distributions
To verify if a given distribution is a discrete probability distribution, check if all probabilities are between 0 and 1 and if their sum is exactly 1.
-
Invalid distribution example:
-
x values: 2, 4, 6
-
P(X) values: 1/2,3/4,−1/4 (Invalid because −1/4 is less than 0) 29.
-
Valid distribution example:
-
x values: 5, 10, 15, 20
-
P(X) values: 1/8,3/8,1/2,0
-
All probabilities are between 0 and 1.
-
Sum: 1/8+3/8+1/2+0=4/8+1/2=1/2+1/2=1. This is a valid distribution 30.
🔑 Important: Always check both properties: 0≤P(X)≤1 and ∑P(X)=1.
🔑 Important: The sum of probabilities for all possible outcomes must equal 1.
🔑 Important: For any random variable X, 0≤P(X)≤1 27.
🔑 Important: Constructing a discrete probability distribution involves listing all possible values of a random variable and their corresponding probabilities 24 25.
3. Mean and expected value of discrete random variables
The mean, also known as the expected value (E[X]), is a central concept for discrete random variables. It represents the long-term average outcome of an experiment if it were repeated many times.
This value helps understand the central tendency of the variable's distribution 39.
3.1 Calculating the expected value
The expected value of a discrete random variable is calculated by summing the product of each possible value the variable can take and its corresponding probability. This process weighs each outcome by how likely it is to occur.
- Formula: E(X)=∑x⋅P(x)
- x represents the values of the random variable.
- P(x) represents the probability of each value x 40.
This calculation involves creating a table to systematically multiply each value by its probability and then summing these products.
3.1.1 Steps to find the mean
To find the mean of a discrete random variable, follow these steps:
- Determine the sample space of the experiment.
- Count the number of random variables for each outcome and assign this number.
- Construct a probability distribution table listing values and their probabilities.
- Multiply each random variable value by its corresponding probability.
- Sum the results from Step 4 to get the mean.
3.1.2 Examples
Let's look at a few examples to illustrate the calculation of the expected value.
Example 1: Tossing three coins
Consider an experiment where three coins are tossed, and let X represent the number of heads.
| X (Heads) | P(x) | x⋅P(x) |
|---|---|---|
| 0 | 1/8 | 0 |
| 1 | 3/8 | 0.375 |
| 2 | 3/8 | 0.75 |
| 3 | 1/8 | 0.375 |
The mean or expected value of the number of heads is 1.5 41.
Example 2: Probability distribution
Given the following probability distribution for a discrete random variable X:
| X | P(x) | x⋅P(x) |
|---|---|---|
| 1 | 0.15 | 0.15 |
| 2 | 0.25 | 0.50 |
| 3 | 0.30 | 0.90 |
| 4 | 0.15 | 0.60 |
| 5 | 0.10 | 0.50 |
| 6 | 0.05 | 0.30 |
The mean of this discrete random variable is 3.00 42.
Example 3: Track preference
An experiment involves asking three Grade 10 students about their track preference (Academic 'A' or TVL 'T'). Let Y represent the number of TVL track responses.
The steps involve determining the sample space, counting outcomes, building the probability distribution, multiplying, and summing 43.
3.1.3 Practice problem
Suppose a coin is tossed four times, and X represents the number of tails. Find the expected value or mean of this discrete random variable 45.
🔑 Important: The expected value provides a single number summarizing the central outcome of a random process over many repetitions.
🔑 Important: Always ensure that the sum of all probabilities P(x) in a distribution equals 1. Negative probabilities are not possible 38.
4. Variance and standard deviation of discrete random variables
4.1 Understanding variance and standard deviation
- Variance: This measures the spread of a random variable's possible values around its mean. It's the average of the squared differences from the mean.
- Standard deviation: This is the square root of the variance. It provides a measure of spread in the same units as the random variable.
- Both values indicate how much the data points typically deviate from the mean. Higher values mean more spread; lower values mean data points are clustered closer to the mean.
4.2 Calculating variance and standard deviation
To calculate variance (σ2) and standard deviation (σ) for a discrete random variable X:
- Step 1: Calculate the mean (μ). This is the expected value, E(X). μ=E(X)=∑[x⋅P(x)]
- Step 2: Calculate the squared difference from the mean for each possible value of X. This is (x−μ)2.
- Step 3: Multiply each squared difference by its probability P(x). This gives (x−μ)2⋅P(x).
- Step 4: Sum these products to find the variance. σ2=Var(X)=E[(X−μ)2=∑[(x−μ)2⋅P(x)]
- Step 5: Take the square root of the variance to find the standard deviation. σ=Var(X).
🔑 Important: Variance is always non-negative, as it's a sum of squared terms.
4.3 Worked example: Tossing three coins
Consider tossing three coins. Let X be the number of heads.
The possible values for X are 0, 1, 2, and 3.
| x | P(x) | x⋅P(x) | x−μ | (x−μ)2 | (x−μ)2⋅P(x) |
|---|---|---|---|---|---|
| 0 | 1/8 | 0 | -1.375 | 1.8906 | 0.2363 |
| 1 | 3/8 | 0.375 | -1.125 | 1.2656 | 0.4746 |
| 2 | 3/8 | 0.75 | -0.75 | 0.5625 | 0.2109 |
| 3 | 1/8 | 0.375 | 1.375 | 1.8906 | 0.2363 |
- The mean (μ) is ∑[x⋅P(x)]=1.5.
- The variance (σ2) is ∑[(x−μ)2⋅P(x)]=1.1581.
- The standard deviation (σ) is 1.1581≈1.076.
4.4 Worked example: Shoe sales per day
A retail store's daily shoe sales are given.
| X (shoes sold) | P(X) | X⋅P(X) | X−μ | (X−μ)2 | (X−μ)2⋅P(X) |
|---|---|---|---|---|---|
| 19 | 0.1 | 1.9 | -1.2 | 1.44 | 0.144 |
| 20 | 0.2 | 4.0 | -0.2 | 0.04 | 0.008 |
| 21 | 0.4 | 8.4 | 0.8 | 0.64 | 0.256 |
| 22 | 0.2 | 4.4 | 1.8 | 3.24 | 0.648 |
| 23 | 0.1 | 2.3 | 2.8 | 7.84 | 0.784 |
- The mean (μ) is 21.0 shoes sold per day.
- The variance (σ2) is 1.840 (shoes sold)2.
- The standard deviation (σ) is 1.840≈1.357 shoes52.
4.5 Worked example: Coin tosses (tails)
If a coin is tossed four times, and X represents the number of tails.
| X (tails) | P(X) | X⋅P(X) | X−μ | (X−μ)2 | (X−μ)2⋅P(X) |
|---|---|---|---|---|---|
| 0 | 1/16 | 0 | -2 | 4 | 4/16 |
| 1 | 4/16 | 4/16 | -1 | 1 | 4/16 |
| 2 | 6/16 | 12/16 | 0 | 0 | 0 |
| 3 | 4/16 | 12/16 | 1 | 1 | 4/16 |
| 4 | 1/16 | 4/16 | 2 | 4 | 4/16 |
- The mean (μ) is 1.25 tails.
- The variance (σ2) is 1.0.
- The standard deviation (σ) is 1.0=1.0.
🔑 Important: For a binomial distribution with n trials and probability of success p, the mean is np and the variance is np(1−p). In the coin toss example, n=4 and p=0.5 (probability of tails), so μ=4×0.5=2 (Oops, my manual calculation for mean above was for a different set of probabilities based on the table. The example provided does not show correct P(X) for binomial. The calculation above assumes specific P(X) values, the calculation based on binomial formula would yield μ=2 and σ2=4×0.5×0.5=1). The formula μ=np is for the number of successes, not specifically tails. If X is number of tails, p=0.5. Hence μ=4×0.5=2. And σ2=4×0.5×(1−0.5)=1. The table above has P(X) values that lead to μ=1.25 and σ2=1.
🔑 Important: The variance and standard deviation quantify the spread or dispersion of the outcomes of a random variable. These are crucial for understanding risk and variability in statistical models 49 50 51 53 54.
© 2026 Maeve. All rights reserved. This content is protected by copyright.