Probability and Statistics for Engineering Lecture 3-5 Notes
Random Variables and Distributions
Introduction
Definition of Random Variable
To simplify the complex problems into functional operations and unify their studys, we need to use the random variable.
Definition : Random Variable
A random variable (or r.v. for short) is a real-valued
function defined on sample space (i.e.
Example
On Valentine’s Day a restaurant offers a Lucky Lovers discount. When the waiter brings the check, he’ll also bring the four aces from a deck of cards. He’ll shuffle them and lay them out face down on the table. The couple will then get to turn one card over.
- If it’s a black ace, they’ll owe the full amount,
- but if it’s the ace of hearts, the waiter will give them a $20 Lucky Lovers discount.
- If they first turn over the ace of diamonds, they’ll then get to turn over one of the remaining cards, earning a $10 discount for finding the ace of hearts this time.
How to defined the Lucky Lovers discount as a random variable?
Solution. It is not difficult to obtain the sample space of
the game of Lucky Lovers. Let H, D, C, S represent the aces of hearts,
diamonds, clubs, and spades, respectively, we have:
We can observe that: with r.v.s defined, we simplify the study of random events to the study of r.v.s. The study of r.v.s. essentially involves examining all possible values that the r.v. can take and the probability associated with each value, this is known as the probability distribution. With the distribution, we can then grasp the overall certainty of the random event, providing a foundation for further study of its underlying regularity.
Based on the possible values a r.v. can take, they can be classified into:
- Discrete random variable takes a finite or countable number of values.
- Continuous random variable takes continuous values.
The differences and similarities in how the probability distributions of these two types of r.v.s are described:
- Discrete r.v. can be described using a probability mass function (PMF).
- Continuous r.v. can be described using a probability density function (PDF).
- Both types of r.v.s can be described using a cumulative distribution function (CDF).
Definition : Probability Mass Function
Let
- Non-negativity:
. - Normalization:
.
Example
Suppose that the support of a r.v.
Solution. Using the normalization property of PMF, we have
Description of Probability Distribution
Definition : Continuous Random Variable and Probability Density Function
Similar to PMF, the function satisfies:
- Non-negativity:
. - Normalization:
.
It’s obvious that for any
Intuitively, the larger
Definition : Cumulative Distribution Function
For a r.v.
- For a discrete r.v., the CDF is a step function
. - For a continuous r.v., the CDF is a continuous function
. Consequently, . - The CDF is non-decreasing and right-continuous.
- The maximum of the CDF is
. - The minimum of the CDF is
. - For any real numbers
, .
Example
Suppose that the lifespan in years of a certain household appliance
is a r.v. with PDF given by
Solution. By the normalization property of the PDF, we have
Expectation and Variance
Sometimes we need a simple, clear, distinctive description of a r.v. One of the most commonly used numerical characteristics are the mathematical expectation and variance.
Definition : Mathematical Expectation
The mathematical expectation (also known as the
mean, expectation, or expected value) of a
r.v.
- If
is a discrete r.v. with PMF , given , then
- If
is a continuous r.v. with PDF , given , then
Simply put, the expectation is the weighted average of all possible values of a r.v. Expectation represents the average result or long-term value that we can anticipate from a series of random events.
Definition : Variance and Standard Deviation
If a r.v. satisfies that
Specifically:
If
is discrete with PMF , thenIf
is continuous with PDF , then More generally, the expectation of any function of is:
There are some basic properties of the expectation and variance:
- For any constants
, . - For any constants
, , and thus . , for any functions and .
Proof of property 3. w.l.o.g., show the case for a discrete
r.v. with PMF
Let
Common Discrete Distributions
Bernoulli Distribution
Definition: Bernoulli Trial and Bernoulli Distribution
If a random experiment only have two possible outocmes
If a r.v.
The Bernoulli distribution is the foundation of many classical probability distributions, such as the binomial distribution, the geometric distribution, etc.
Binomial Distribution
Definition:
An
- independently suggests that the result of each Bernoulli trial would not affect each other.
- repeat suggests that the probability of event
in each Bernoulli trial, i.e., , remains the same.
Let
The expectation and variance of
Example
A factory has 80 pieces of the same type of equipment, each operating
independently, with a failure probability of
- Allocate 4 maintainers, with each responsible for maintaining 20 pieces of equipment.
- Allocate 3 maintainers, with them jointly responsible for maintaining all 80 pieces of equipment.
Please compare these two strategies in terms of the probability that a piece of equipment cannot be repaired in time when a failure occurs.
Solution. For the first strategy, let
Geometric Distribution
Definition: Geometric Distribution
Suppose that a Bernoulli trial is repeated independently until
Poisson Distribution
Definition: Poisson Distribution
Let
Poisson distribution is used to describe the number of events occurring in a fixed interval of time/space if the event occur with a constant rate and independently.
The expectation and variance of
Example
A council is considering whether to base a recovery vehicle on a
stretch of road to help clear incidents as quickly as possible. Records
show that, on average, the number of incidents during the moring rush
hour is 5. The council won’t base a recovery vehicle on the road if the
probability of having more than 5 incidents during the morning rush hour
is less than
Solution. Let
Tip
The Poisson distribution can be obtained derived as the limit of the binomial distribution.
Proof. Consider the number of events within a unit time
interval
- Let
be large so that each subinterval is very short, making it impossible for two or more events to occur with the same subinterval. - The probability of an every occurring is proportional to the length
of the subinterval, i.e.,
. - Whether an event occurs in a subinterval is independent of the others.
Let
Tip
The theorem suggests that for an
A rule of thumb is that when
Example
An insurance company has launched a life insurance policy where each
participant is required to pay a premium of
Suppose 2,500 people participate in this insurance, and the probability of death for each person within the year is 0.002.What is the probability that the insurance company’s profit from this life insurance policy is no less than $20,000?
Solution. For the insurance company to make a profit no less
than
In summary, we introduced the following discrete distributions:
Summary
| Distribution | PMF | Expectation | Variance |
|---|---|---|---|
Common Continuous Distributions
Uniform Distribution
Definition: Uniform Distribution
If the PDF of a r.v.
The CDF of
The uniform distribution has a important property:
The expectation and variance of
Exponential Distribution
Definition: Exponential Distribution
If the PDF of a r.v.
The CDF of
The exponential distribution can be used to describe the distribution of the time intervals between events in a Poisson process:
A Poisson process can be simply understood as a process where random
events occur independently and with a constant rate along the time axis.
The number of events occurring within a unit time interval follows
Let
The expectation and variance of
The exponential distribution is the only continuous distribution with
the memoryless property, i.e., if
Tip
The ceiling of an exponential r.v. follows a geometric distribution.
Normal Distribution
Definition: Normal Distribution
If the PDF of a random variable
Specifically,
The PDF of
- The larger the
is, the more right the PDF is located at. - The larger the
is, the flatter the PDF is.
If
Proof: Consider the CDF of
The expectation and variance of
Example
A bus manufacturer is designing a bus. When determining the door
height, they must ensure that it is not too high but also allows 99% of
male passengers to pass through without bending. Assuming the height of
all males follows a normal distribution
Solution. Let
Summary
| Distribution | Expectation | Variance | |
|---|---|---|---|
Transformation of Random Variables
Transformation of R.V.
For a discrete r.v.
For a continuous r.v.
Proof for the continuous-to-continuous transformation.
Consider the CDF of
Example
Consider the time it takes to transfer a file over a network depends
on the network speed
Solution. We have
A famous application of r.v. transformation is based on the following results:
Tip
If the CDF of a continuous r.v.
On the other hand, if
Proof. Consider the CDF of
The second result can be used in the inverse transform sampling, which is a widely used technique for generating random samples from a complicated distribution.
If
Example
Assume that r.v.
Solution. Since
The r.v.
Example
Consider the time it takes to transfer a file over a network depends
on the network speed
Solution. By the definition of expectation, we have
We can also calculate the expectation of
Tip
If
Alternative solution.
We generalize this kind of process to the relationship between
Definition: Convex and Concave Function
A function
Jensen’s Inequality
Let
- for any convex function
,
- for any concave function
,
By the Jensen’s inequality, we have
Example
One of the applications of Jensen’s inequality is related to the Kullback-Leibler divergence. KL divergence is called the information gain in the context of decision trees and also called the relative entropy.
Simply put, if we have two probability distributions
Proof. Let
- Title: Probability and Statistics for Engineering Lecture 3-5 Notes
- Author: Zhige Chen
- Created at : 2025-10-15 21:46:16
- Updated at : 2025-11-01 21:33:29
- Link: https://nofe1248.github.io/2025/10/15/pse-2/
- License: This work is licensed under CC BY-NC-SA 4.0.