0% found this document useful (0 votes)
10 views30 pages

Chapter 4 1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views30 pages

Chapter 4 1

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 30

AMS 507

Chapter 4. Random Variables


Weihao Wang
4.1 Random Variables

Def. Random variable (RV): a function from S to the real


space ℝ.

A random variable is a variable whose possible values are numerical outcomes of a


random phenomenon. There are two types of random variables:

Discrete Random Variable: Takes a countable number of distinct values.


Example: Number of heads in a series of coin flips.
Continuous Random Variable: Takes an infinite number of possible values within a given
range.
Example: The exact time a bus arrives at a stop.
Probability Distribution: Defines how probabilities are distributed over the values of the random
variable.

For discrete random variables, the distribution is typically given by a probability mass function (PMF).
For continuous random variables, the distribution is given by a probability density function (PDF).
Example 4.1.1

Let X be the number of heads obtained in three tosses of a


fair coin.
P(X=0) =
P(X=1) =
P(X=2) =
P(X=3) =

All of these eg are in chat


Types of RVs

A discrete random variable (RV) and a continuous


random variable (RV) are two types of random variables
that differ in the nature of the outcomes they can take.
Discrete Random Variable

• A discrete random variable takes on a countable number


of distinct values. These values can either be finite or
countably infinite (like the set of integers).
• Examples: The number of heads in 10 coin flips, the
number rolled on a six-sided die, or the number of
students in a classroom.
• A probability mass function (PMF) is used to describe the
probability distribution of a discrete random variable,
where the probability of each individual value is specified.
Continuous Random Variable

• A continuous random variable takes on an uncountable


number of values within a given range. These values are
typically associated with measurements that can take any
value in an interval.
• Examples: The height of a person, the time it takes for a
bus to arrive, or the temperature at a given location.
• A probability density function (PDF) is used to describe
the probability distribution of a continuous random
variable. The probability of any specific value is zero;
instead, probabilities are calculated over intervals.
In summary

• Discrete RV: Countable values (e.g., 0, 1, 2, ...).


• Continuous RV: Infinite possible values within a range
(e.g., real numbers between 0 and 1).
4.2 Discrete Random Variables

A Probability Mass Function (PMF) is a function that gives


the probability that a discrete random variable takes on a
specific value.
The PMF is used for discrete random variables, where the
possible outcomes are countable.
4.2 Discrete Random Variables

For the probability mass function (pmf) of discrete random


variable X, p(x) = P(X=x).
The PMF p(x) must satisfy two key properties:
Non-negativity:p(x)>=0 for all values of x
This property ensures that probabilities are never negative. Every possible value that the random
variable can take has a probability that is zero or greater.

Normalization (Total Probability Equals 1):

p(x)=1

The sum of the probabilities for all possible outcomes of the discrete random variable must equal
This is because the total probability of all possible outcomes must account for 100% of the
probability space.
Example 4.2.1

Which of the following is a pmf?


!"#
1. 𝑝 𝑥 = 𝑓𝑜𝑟 𝑥 = 0,1,2,3
$
!!
2. 𝑝 𝑥 = 𝑓𝑜𝑟 𝑥 = 0,1,2,3
#%
Example 4.2.2

Let X be a discrete random variable representing the


number of defective items in a batch of 3 items selected
from a production line. The probability mass function (PMF)
of X is given by:
P(X=0) = 0.4, P(X=1) = 0.3, P(X=2) = 0.2, P(X=3) = 0.1.
1. Verify that the given function is a valid PMF.
2. Find the probability that there are at least 2 defective
items in the batch.
Cumulative Distribution Function (CDF) OR (PDF)
Theorem 4.2.1

3 properties of the CDF:


1. Non-decreasing F(x) should be non-decreasing, meaning that as x
increases, F(x) should not decrease.
2. Limits LNR
3. Right-continuous
The CDF should approach 0 as x 0 and approach 1 as x .
Example 4.2.2 (continue)

P(X=0) = 0.4, P(X=1) = 0.3, P(X=2) = 0.2, P(X=3) = 0.1.


Find the CDF of X for x=0,1,2,3.
Example 4.2.3

Consider a discrete random variable X representing the


number of successful shots made by a basketball player in
3 attempts. The PMF is given by:
P(X=0) = 0.1, P(X=1) = 0.3, P(X=2) = 0.4, P(X=3) = 0.2.
1. Find the CDF of X
2. What is the probability that the player makes at least 2
successful shots?
Example 4.2.3 (continue)

P(X=0) = 0.1, P(X=1) = 0.3, P(X=2) = 0.4, P(X=3) = 0.2.


3. Calculate the following probabilities:
Example 4.2.3 (continue)
Example 4.2.4

Tossing a coin until a head appears, let p = P(H) and X is


the number of tosses required to get a head.
Is F(x) a cdf?
4.3 Expected Value

The expected value (or mean) of a discrete random


variable X is a measure of the central tendency of its
probability distribution.
Example 4.3.1

What is the expected number of heads in three tosses of a


fair coin?
4.4 Expectation as a Function of RV’s

For a discrete random variable X that takes values x1,x2,…,


with corresponding probabilities p(x1),p(x2),…, the
expectation of g(X) is:
Example 4.4.1(4.1.1 continue)

In flipping 3 balanced coins find 𝐸(𝑋 $ − 𝑋).


Example 4.4.2

ℎ 𝑥 = 10 + 2 + 𝑥 % . Find E ℎ 𝑥 .

x P(x)
2 0.5
3 0.3
4 0.2
total 1
Example 4.4.3

Let Y = 𝑔 𝑥 = 𝑎𝑋 + 𝑏.
Prove E(Y)
Transformation of Discrete RV
Example 4.4.4

Let X be a discrete RV with pmf

Let Y=n-X, find PY(y)


4.5 Variance
Example 4.5.1

x 1 2 5 9

P(x) 0.3 0.4 0.2 0.1

E(X) =
Var(X) =
Proof

Y=g(X)=aX+b, then prove that Var(Y)=a2Var(X)


Hw4
We will dedicate 2 weeks to Chapter 4,
with the deadline set for the Friday after next.
Chapter 4
Problems: 10, 14, 17, 18, 19
Theoretical Exercises: 2, 6, 8, 18, 25
In Theoretical Exercise 4.18(a) you need to use the result of
Theoretical Exercise 3.16 (4.15 is a typo).

You might also like